query
stringlengths 10
8.11k
| document
stringlengths 17
398k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
R A onetomany relationship between CriterionScore and AlternativeScore (Feature only). | public function featureOnAlternativeScores()
{
return $this->hasMany('App\Models\AlternativeScore', 'feature');
} | [
"public function getMatchedScore(){\n if($this->greScore) return $this->greScore;\n if($this->toeflScore) return $this->toeflScore;\n return false;\n }",
"abstract function score( $answer_object ): AutoScoreResult;",
"public function co2Score();",
"function skillcvrate($ratedobject, $cvr_arrays, $objects_array = array()) {\n \n // GET arrays of selected values\n $advanced_values = $cvr_arrays['advanced_values'];\n $skilltypes = $cvr_arrays['skilltypes'];\n \n // ACADEMIC DIFFICULTY LEVEL\n $level = $ratedobject->level;\n $difficulty = $advanced_values[$level];\n \n $typology = $ratedobject->skilltype;\n $skilltype = $skilltypes[$typology];\n \n // get object data\n \n $certs = $ratedobject->certs;\n $scores = $ratedobject->scores;\n \n $stdyear = $advanced_values[\"skillyear\"];\n $skillcoef = $advanced_values[\"skillcoef\"];\n $maxscore = $advanced_values[\"maxscore\"];\n $z = $advanced_values['z'];\n \n $ratemult = $advanced_values[\"ratemult\"];\n $rateadd = $advanced_values[\"rateadd\"];\n // RATING; right now, just set to minimum\n $netrating = $rateadd;\n \n // CVRANK ALGORITHM\n $B = 1/pow(10, $z + $difficulty + $netrating);\n \n $count_certs = count($certs);\n \n // COUNT same_skils (number of skills of the same type)\n $same_skills = 0;\n // from this object\n foreach ($scores as $sckey => $scvalue) {\n if (($scvalue) && ($scvalue != 0)) {\n $same_skills++;\n }\n }\n // from other objects of the same skilltype\n foreach ($objects_array as $key => $value) {\n $typology2 = $value->skilltype;\n $scores2 = $value->scores;\n if ($typology2 == $typology) {\n foreach ($scores2 as $sc2key => $sc2value) {\n if (($sc2value) && ($sc2value != 0)) {\n $same_skills++;\n }\n }\n }\n }\n \n for ($i = 0; $i < $count_certs; $i++) {\n \n // SCORE\n $score = $scores[$i];\n // loop only if $score is set and is not 0\n if (($score) && ($score != 0)) {\n \n // prove numbers are not over- or infraestimated\n if ($score > $maxscore) $score = $maxscore;\t\n elseif ($score < 0) $score = 0;\n \n // calculate each article's CVR\n\t $probability = $score/100;\n $CVR = 1/$B * ($probability / (1 - $probability) );\n \n $samecoef = pow($skillcoef, $same_skills);\n $CVR = $CVR * $samecoef;\n \n // correct by stdyear, and add each loop\n $totalCVR += $CVR * $stdyear;\n }\n }\n // apply weight\n $skillCVR = $totalCVR * $skilltype[0];\n \n // return the value!\n return $skillCVR;\n }",
"public function getScore();",
"public function supportsScore()\n {\n $contentObject = $this->getContentObject();\n\n return is_a(\n $contentObject, 'Chamilo\\Core\\Repository\\ContentObject\\Assessment\\Storage\\DataClass\\Assessment'\n ) || is_a(\n $contentObject, 'Chamilo\\Core\\Repository\\ContentObject\\Hotpotatoes\\Storage\\DataClass\\Hotpotatoes'\n ) || is_a(\n $contentObject, 'Chamilo\\Core\\Repository\\ContentObject\\Assignment\\Storage\\DataClass\\Assignment'\n ) || is_a(\n $contentObject, 'Chamilo\\Core\\Repository\\ContentObject\\ExternalTool\\Storage\\DataClass\\ExternalTool'\n );\n }",
"public function adaptiveScores() {\n\t\t$SQL = \"\n\t\t\tSELECT validvalue,\n score\n FROM webset_tx.std_fie_adaptivescore\n INNER JOIN webset.glb_validvalues ON area_id = refid\n WHERE stdrefid = \" . $this->tsrefid . \"\n\t\t\t AND iepyear = \" . $this->stdiepyear . \"\n ORDER BY sequence_number\n \";\n\n\t\treturn db::execSQL($SQL)->assocAll();\n\t}",
"public function mathScore(): array\n {\n $ads = $this->ads;\n $pictures = $this->pictures;\n foreach ($ads as $ad) {\n $score = 0;\n $score += $this->checkDescription($ad);\n $score += $this->checkPictures($ad, $pictures);\n $score += $this->isComplete($ad)? 40:0;\n $ad->score = $score;\n $ad->irrelevantSince = $ad->score < 40 ? (new \\DateTimeImmutable()):null;\n }\n\n return $ads;\n }",
"public function getMatchedScore()\n {\n if ($this->greScore) {\n return $this->greScore;\n }\n if ($this->toeflScore) {\n return $this->toeflScore;\n }\n\n return false;\n }",
"function score( $answer_object ): AutoScoreResult {\n\t\tif ( ! is_array( $answer_object ) ) {\n\t\t\tthrow new Exception( 'Input must be an array. Was: ' . $answer_object );\n\t\t}\n\n\t\t$answers = array_map( 'strtolower', $answer_object );\n\t\t$correct_answers = array_map( 'strtolower', $this->correct_answers );\n\t\t$incorrect_answers = array_map( 'strtolower', $this->incorrect_answers );\n\t\t$is_ordered = $this->score_type === self::GRADING_TYPE_ORDERED_PERCENT_OF;\n\n\t\t$correctness_percents = array_map(\n\t\t\tfunction ( $correctness_percent, $incorrectness_percent ) {\n\t\t\t\tif ( $incorrectness_percent > $correctness_percent ) {\n\t\t\t\t\t// The answer is (mostly) INCORRECT since it is more similar to one of the\n\t\t\t\t\t// INCORRECT values than one of the CORRECT ones.\n\n\t\t\t\t\t// We need to \"invert\" the \"correctness value\" since the submitted answer is actually incorrect.\n\t\t\t\t\treturn 100 - $incorrectness_percent;\n\t\t\t\t} else {\n\t\t\t\t\t// The answer is (mostly) CORRECT since it is more similar to one of the\n\t\t\t\t\t// CORRECT values than one of the INCORRECT ones.\n\t\t\t\t\treturn $correctness_percent;\n\t\t\t\t}\n\t\t\t},\n\t\t\t$this->calculate_correctness( $answers, $correct_answers, $is_ordered ),\n\t\t\t$this->calculate_correctness( $answers, $incorrect_answers, $is_ordered )\n\t\t);\n\n\t\t$count_correct_values = count(\n\t\t\tarray_filter(\n\t\t\t\t$correctness_percents,\n\t\t\t\tfunction ( $percent ) {\n\t\t\t\t\treturn $percent > self::THRESHOLD;\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\n\t\tswitch ( $this->score_type ) {\n\t\t\tcase self::GRADING_TYPE_ORDERED_PERCENT_OF:\n\t\t\t\t$confidence = array_sum(\n\t\t\t\t\tarray_map(\n\t\t\t\t\t\tfunction ( $percent ) {\n\t\t\t\t\t\t\treturn $percent > self::THRESHOLD ? 0.01 * $percent : 1.0 - ( 0.01 * $percent );\n\t\t\t\t\t\t},\n\t\t\t\t\t\t$correctness_percents\n\t\t\t\t\t)\n\t\t\t\t) / count( $answers );\n\n\t\t\t\treturn new AutoScoreResult( round( $this->score_max / count( $this->correct_answers ) * $count_correct_values ), $confidence );\n\t\t\tcase self::GRADING_TYPE_UNORDERED_PERCENT_OF:\n\t\t\t\t$confidence = 0.01 * array_sum( $correctness_percents ) / count( $correctness_percents );\n\n\t\t\t\treturn new AutoScoreResult( round( $this->score_max / count( $this->correct_answers ) * $count_correct_values ), $confidence );\n\t\t\tcase self::GRADING_TYPE_ONE_OF:\n\t\t\t\t// TODO: Should multiple answers be allowed?\n\t\t\t\t// TODO: Should we really use the average confidence here?\n\t\t\t\t$confidence = array_sum(\n\t\t\t\t\tarray_map(\n\t\t\t\t\t\tfunction ( $percent ) {\n\t\t\t\t\t\t\treturn $percent > self::THRESHOLD ? 0.01 * $percent : 1.0 - ( 0.01 * $percent );\n\t\t\t\t\t\t},\n\t\t\t\t\t\t$correctness_percents\n\t\t\t\t\t)\n\t\t\t\t) / count( $answers );\n\n\t\t\t\treturn $count_correct_values > 0\n\t\t\t\t\t? new AutoScoreResult( $this->score_max, $confidence )\n\t\t\t\t\t: new AutoScoreResult( 0, $confidence );\n\t\t\tcase self::GRADING_TYPE_ALL_OF:\n\t\t\t\tif ( count( $answers ) == count( $correct_answers ) ) {\n\t\t\t\t\t$confidence = array_sum(\n\t\t\t\t\t\tarray_map(\n\t\t\t\t\t\t\tfunction ( $percent ) {\n\t\t\t\t\t\t\t\treturn $percent > self::THRESHOLD ? 0.01 * $percent : 1.0 - ( 0.01 * $percent );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t$correctness_percents\n\t\t\t\t\t\t)\n\t\t\t\t\t) / count( $answers );\n\t\t\t\t\t$correct = $count_correct_values == count( $correct_answers );\n\n\t\t\t\t\treturn new AutoScoreResult(\n\t\t\t\t\t\t$correct ? $this->score_max : 0,\n\t\t\t\t\t\t$confidence\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn new AutoScoreResult( 0, 1.0 );\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn new AutoScoreResult( 0, 1.0 );\n\t\t}\n\t}",
"function minScore() {\r\n }",
"abstract public function getScore(Answer $answer);",
"public function matchScore(\\Jazzee\\Entity\\Answer $answer)\n {\n if ($answer->getPageStatus() == self::SKIPPED) {\n return;\n }\n if (!is_null($answer->getGREScore()) and !is_null($answer->getTOEFLScore())) {\n return; //we already have a match\n }\n $testType = $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_TYPE)->getJazzeeElement()->displayValue($answer);\n $registrationNumber = $this->_applicationPage->getPage()->getElementByFixedId(self::FID_REGISTRATION_NUMBER)->getJazzeeElement()->displayValue($answer);\n $testDate = $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_DATE)->getJazzeeElement()->formValue($answer);\n $testMonth = date('m', strtotime($testDate));\n $testYear = date('Y', strtotime($testDate));\n\n $parameters = array(\n 'registrationNumber' => $registrationNumber,\n 'testMonth' => $testMonth,\n 'testYear' => $testYear\n );\n switch ($testType) {\n case 'GRE/GRE Subject':\n $score = $this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\GREScore')->findOneBy($parameters);\n if ($score) {\n $answer->setGreScore($score);\n }\n break;\n case 'TOEFL':\n $score = $this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\TOEFLScore')->findOneBy($parameters);\n if ($score) {\n $answer->setTOEFLScore($score);\n }\n break;\n default:\n throw new \\Jazzee\\Exception(\"Unknown test type: {$testType} when trying to match a score\");\n }\n }",
"function calculateAllRecommendations() {\n\t\t$totalAssessmentScore = 0;\n\t\t$maxAssessmentScore = 0;\n\t\t\n\t\t$recommendations = array();\n\t\t$minValue = $this->getMinimumValue();\n\t\t$maxValue = $this->getMaximumValue();\n\t\t\n\t\t$result = $this->getResult();\n\t\t$answers = $result->getAnswers();\n\t\t\n\t\t// Build the category array\n\t\t$categoryArray = array();\n\t\tforeach((array) $answers as $answer) {\n\t\t\t$category = tx_wecassessment_category::find($answer->getCategoryUID());\n\t\t\tif(is_object($category)) {\n\t\t\t\t$sorting = $category->getSorting();\n\t\t\t\t$categoryArray[$sorting]['uid'] = $category->getUID();\n\t\t\t\t$categoryArray[$sorting]['answers'][$answer->getQuestionUID()] = $answer;\n\t\t\t\t$categoryArray[$sorting]['totalScore'] += $answer->getWeightedScore();\n\t\t\t\t\n\t\t\t\t$categoryArray[$sorting]['maxScore'] += abs($answer->getWeight()) * $this->getMaximumValue();\n\t\t\t\t$categoryArray[$sorting]['weightedAnswerCount'] += abs($answer->getWeight());\n\t\t\t\t$weightedAnswerCount += abs($answer->getWeight());\n\t\t\t\t\n\t\t\t\t$totalAssessmentScore += $answer->getWeightedScore();\n\t\t\t\t$maxAssessmentScore += abs($answer->getWeight()) * $this->getMaximumValue();\n\t\t\t}\n\t\t}\n\t\t\n\t\tksort($categoryArray);\n\n\t\t// Hack to include perfect score\n\t\tif($maxAssessmentScore == $totalAssessmentScore) {\n\t\t\t$totalAssessmentScore -= .0001;\n\t\t}\n\t\t\n\t\t// Total Assessment Recommendations\n\t\tif($weightedAnswerCount == 0) {\n\t\t\t$score = 0;\n\t\t} else {\n\t\t\t$score = $totalAssessmentScore / $weightedAnswerCount;\n\t\t}\n\t\t\n\t\t// Don't allow a score below the minimum (due to negative weighting)\n\t\tif($score < $minValue) {\n\t\t\t$score = $minValue;\n\t\t}\n\t\t\n\t\t$recommendation = &$this->calculateRecommendation($score);\n\t\tif(is_object($recommendation)) {\n\t\t\t$recommendation->setMaxScore($this->getMaximumValue());\n\t\t\t$recommendations[0] = $recommendation;\n\t\t}\n\t\t\n\t\t// Category Recommendations\n\t\tforeach((array) $categoryArray as $sorting => $children) {\n\t\t\t$category = tx_wecassessment_category::find($children['uid']);\n\t\t\t\n\t\t\t// Hack to include perfect score\n\t\t\tif($children['maxScore'] == $children['totalScore']) {\n\t\t\t\t$children['totalScore'] -= .0001;\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tif($children['weightedAnswerCount'] == 0) {\n\t\t\t\t$categoryScore = 0;\n\t\t\t} else {\n\t\t\t\t$categoryScore = $children['totalScore'] / ($children['weightedAnswerCount']);\n\t\t\t}\n\t\t\t\n\t\t\t// Don't allow a score below the minimum (due to negative weighting)\n\t\t\tif($categoryScore < $minValue) {\n\t\t\t\t$categoryScore = $minValue;\n\t\t\t}\n\t\t\t\n\t\t\t$recommendation = &$category->calculateRecommendation($categoryScore);\n\t\t\t\n\t\t\tif(is_object($recommendation)) {\n\t\t\t\t$recommendation->setMaxScore($this->getMaximumValue());\n\t\t\t\t$recommendations[] = $recommendation;\n\t\t\t}\n\t\t\t\n\t\t\tforeach((array) $children['answers'] as $answer) {\n\t\t\t\t$question = $answer->getQuestion();\n\t\t\t\t$questionScore = $answer->getValue();\n\t\t\t\t\n\t\t\t\t// Hack to include perfect score\n\t\t\t\tif($questionScore == $this->getMaximumValue()) {\n\t\t\t\t\t$questionScore -= .0001;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Don't allow a score below the minimum (due to negative weighting)\n\t\t\t\tif($questionScore < $minValue) {\n\t\t\t\t\t$questionScore = $minValue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$recommendation = $question->calculateRecommendation($questionScore);\n\t\t\t\tif(is_object($recommendation)) {\n\t\t\t\t\t$recommendation->setMaxScore($this->getMaximumValue());\n\t\t\t\t\t$recommendations[] = $recommendation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $recommendations;\n\t}",
"function average_score(){\n\n\tglobal $post;\n\t$entries = get_post_meta( get_the_ID(), 'review_criteria', true );\n\t$sum = 0;\n\tforeach ( (array) $entries as $key => $entry ) {\n\t $criteria = $score = '';\n\t if ( isset( $entry['crit_name'] ) )\n\t $criteria = esc_html( $entry['crit_name'] );\n\t if ( isset( $entry['crit_score'] ) )\n\t $score = esc_html( $entry['crit_score'] );\n\t\t$sum += $score;\n\t}\n\t$count_crit = count($entries);\n\t$avrge = ( $sum / $count_crit);\n\treturn $avrge;\n\t}",
"public function computeScore($scoreConfig, array $testResults): float;",
"function smarty_modifier_normalize_relevance($score, $maxScore)\n{\n $result = ($score / $maxScore) * 100;\n\n $modifier = 1;\n while(($maxScore * 10) < 1) {\n $modifier *= 2;\n $maxScore *= 10;\n }\n $result /= $modifier;\n\n $relevance = 25;\n if($result > 75) {\n $relevance = 100;\n }\n elseif($result > 50) {\n $relevance = 75;\n }\n elseif($result > 25) {\n $relevance = 50;\n }\n elseif($result > 12) {\n $relevance = 25;\n }\n\n return $relevance;\n}",
"static function cmp(Skill $a, Skill $b){return strcmp($b->score, $a->score);}",
"function findByScore($score) {\n\t\t$table = 'tx_wecassessment_recommendation';\n\t\t$where = tx_wecassessment_recommendation_assessment::getWhere($table, 'min_value <= '.$score.' AND max_value > '.$score.' AND type='.TX_WECASSESSMENT_RECOMMENDATION_ASSESSMENT);\n\t\t\n\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, $where);\n\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t$GLOBALS['TYPO3_DB']->sql_free_result($result);\n\t\t\n\t\tif(is_array($row)) {\n\t\t\t$recommendation = &tx_wecassessment_recommendation_assessment::newFromArray($row);\n\t\t\t$recommendation->setScore($score);\n\t\t} else {\n\t\t\t$recommendation = null;\n\t\t}\n\t\t\n\t\treturn $recommendation;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove some default sections from the Customizer. | function customizer_sections( $wp_customize ) {
$wp_customize->remove_section( 'static_front_page' );
$wp_customize->remove_section( 'custom_css' );
} | [
"private function remove_sections() {\n\t\t$this->customize->remove_section( 'themes' );\n\t\t$this->customize->remove_section( 'static_front_page' );\n\t}",
"function remove_all_customize_sections( $wp_customize ){\n $wp_customize->remove_panel( 'themes' );\n $wp_customize->remove_panel( 'widgets' );\n $wp_customize->remove_panel( 'menus' );\n $wp_customize->remove_section( 'title_tagline' );\n $wp_customize->remove_section( 'static_front_page' );\n $wp_customize->remove_section( 'nav_menus' );\n $wp_customize->remove_section( 'custom_css' );\n}",
"function dahz_remove_customizer_sections( $wp_customize ) {\r\n\t $wp_customize->remove_section( 'title_tagline' );\r\n\r\n\t}",
"function thtrs_remove_deafult_customizer( $wp_customize ) {\n $wp_customize->remove_section(\"static_front_page\");\n $wp_customize->remove_section(\"title_tagline\");\n $wp_customize->remove_section(\"custom_css\");\n $wp_customize->remove_section(\"nav\");\n}",
"function remove_sections($wp_customize)\n {\n $wp_customize->remove_section(\"colors\");\n }",
"function mycustomfunc_remove_css_section( $wp_customize ) {\t\n\t$wp_customize->remove_section( 'custom_css' );\n\t$wp_customize->remove_section( 'static_front_page' );\n\t$wp_customize->remove_panel( 'widgets' );\n}",
"function thrive_reset_customization() {\r\n\r\n\tthrive_set_default_customizer_options();\r\n}",
"function genesis_sample_remove_customizer_settings( $config ) {\n\n\tunset( $config['genesis']['sections']['genesis_header'] );\n\tunset( $config['genesis']['sections']['genesis_breadcrumbs']['controls']['breadcrumb_front_page'] );\n\treturn $config;\n\n}",
"function prop_remove_css_section($wp_customize)\n{\n\n $wp_customize->remove_section('custom_css');\n\n}",
"function progression_studios_change_default_customizer_panels ( $wp_customize ) {\n\t$wp_customize->remove_section(\"themes\"); //Remove Active Theme + Theme Changer\n $wp_customize->remove_section(\"static_front_page\"); // Remove Front Page Section\t\t\n}",
"function hello_pro_remove_customizer_settings( $config ) {\n\tunset( $config['genesis']['sections']['genesis_header'] );\n\tunset( $config['genesis']['sections']['genesis_breadcrumbs']['controls']['breadcrumb_front_page'] );\n\treturn $config;\n}",
"function wpc_cf_remove_default_metadata() {\n\tglobal $wpcargo_metabox;\n remove_action( 'wpcargo_shipper_meta_section', array( $wpcargo_metabox, 'wpc_shipper_meta_template' ), 10 );\n\tremove_action( 'wpcargo_receiver_meta_section', array( $wpcargo_metabox, 'wpc_receiver_meta_template' ), 10 );\n\tremove_action( 'wpcargo_shipment_meta_section', array( $wpcargo_metabox, 'wpc_shipment_meta_template' ), 10 );\n\tremove_filter( 'wpcargo_after_reciever_meta_section_sep', array( $wpcargo_metabox, 'wpc_after_reciever_meta_sep' ), 10 );\n}",
"function wd_theme_customizer($wp_customize) {\r\n //\r\n // Uncomment the below lines to remove the default customize sections \r\n\r\n // $wp_customize->remove_section('title_tagline');\r\n // $wp_customize->remove_section('colors');\r\n // $wp_customize->remove_section('background_image');\r\n // $wp_customize->remove_section('static_front_page');\r\n // $wp_customize->remove_section('nav');\r\n\r\n // Uncomment the below lines to remove the default controls\r\n // $wp_customize->remove_control('blogdescription');\r\n \r\n // Uncomment the following to change the default section titles\r\n // $wp_customize->get_section('colors')->title = __( 'Theme Colors' );\r\n // $wp_customize->get_section('background_image')->title = __( 'Images' );\r\n}",
"public function removeAllSections()\n {\n $this->sections = array();\n }",
"public static function reset(): void\n {\n static::$sectionContents = [];\n static::$sectionFallbackContent = [];\n }",
"function czr_fn_popul_remove_section_map( $_sections ) {\r\n //customizer option array\r\n $remove_section = array(\r\n 'static_front_page' ,\r\n 'nav',\r\n 'title_tagline',\r\n 'tc_page_comments'\r\n );\r\n return array_merge( $_sections, $remove_section );\r\n}",
"function klippe_mikado_remove_default_custom_fields() {\n\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\tforeach ( apply_filters( 'klippe_mikado_meta_box_post_types_remove', array( 'post', 'page' ) ) as $postType ) {\n\t\t\t\tremove_meta_box( 'postcustom', $postType, $context );\n\t\t\t}\n\t\t}\n\t}",
"function qode_startit_remove_default_custom_fields() {\n\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\tforeach ( array( \"page\", \"post\", \"portfolio_page\", \"testimonials\", \"slides\", \"carousels\", \"vacancy\" ) as $postType ) {\n\t\t\t\tremove_meta_box( 'postcustom', $postType, $context );\n\t\t\t}\n\t\t}\n\t}",
"function biagiotti_mikado_remove_default_custom_fields() {\n\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\tforeach ( apply_filters( 'biagiotti_mikado_filter_meta_box_post_types_remove', array( 'post', 'page' ) ) as $postType ) {\n\t\t\t\tremove_meta_box( 'postcustom', $postType, $context );\n\t\t\t}\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check the userid has access to $name. This is done by checking for 1. | function allow( $user_id, $name )
{
$db_data = array(
"query" => "
SELECT `id`
FROM `acl`
WHERE `user_id`=:user_id
AND `access`=:allow
AND `allow`=1
",
"query_data" => array(
"user_id" => $user_id,
"allow" => $name
)
);
$options = array( 'fetch'=>'', 'fetchmode'=>PDO::FETCH_COLUMN );
$item = db::get( $db_data, $options );
return ( !empty( $item ) ) ? true: false;
} | [
"function checkAccess () {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) return true;\n else { return false; }\n }",
"function username_existed($name) {\n\t$user = user_load_from_name($name);\n\tif (isset($user)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"protected function isPermittedUserLocation($name) {\n return in_array($name, $this->getAuthorizedLocations());\n }",
"function _hasAccess()\r\n {\r\n // create user object\r\n $user =& User::singleton();\r\n\r\n $timePoint =& TimePoint::singleton($_REQUEST['sessionID']);\r\n $candID = $timePoint->getCandID();\r\n\r\n $candidate =& Candidate::singleton($candID);\r\n\r\n // check user permissions\r\n return ($user->hasPermission('access_all_profiles') || $user->getData('CenterID') == $candidate->getData('CenterID') || $user->getData('CenterID') == $timePoint->getData('CenterID'));\r\n }",
"public function user_exist_by_name( $name ) {\n\t\treturn $this->user_exist_by_username($name);\n\t}",
"public function name_exists( $name ) {\n\t\n\t\t$query = $this->db->prepare(\"SELECT id FROM {$this->table_prefix}accounts WHERE name=:name\");\n\t\t$query->execute(array(\":name\" => $name));\n\t\t$member = $query->fetch();\n\t\t\t\n\t\tif(!empty($member['id'])) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}",
"function _hasAccess()\n {\n // create user object\n $user =& User::singleton();\n\n $timePoint =& TimePoint::singleton($_REQUEST['sessionID']);\n $candID = $timePoint->getCandID();\n\n $candidate =& Candidate::singleton($candID);\n\n // check user permissions\n return ($user->hasPermission('access_all_profiles') || $user->getData('CenterID') == $candidate->getData('CenterID') || $user->getData('CenterID') == $timePoint->getData('CenterID'));\n }",
"function xarPrivExists($name)\n{\n $priv = xarPrivileges::findPrivilege($name);\n if ($priv) return true;\n else return false;\n}",
"function checkUserByUserName($user_name){\n\t\t$rec\t= $this->query(\"SELECT `id` from `users` where `user_name` = '$user_name' \");\t\t\n\t\tif($rec && mysql_num_rows($rec)>0){\t\t\n\t\t\t//if user with the user_name got found\n\t\t\treturn true;\n\t\t}else{\n\t\t\t//if user with the user_name got not found\n\t\t\treturn false;\n\t\t}\n\t}",
"function authorized_user($member_name,$type) {\n global $db, $officer_name,$house_name;\n $attribs = user_privileges($member_name);\n return in_array($type,$attribs) || (isset($officer_name) && \n substr($officer_name,strlen($house_name)) == $type) ||\n check_admin_priv();\n}",
"public function has_permission($name, $username=''){\r\n\t\t return $this->module_has_permission($name,$username);\r\n\t }",
"public function has_access($owner, $name) {\n $stmt = $this->pdo->prepare('select * from share where owner_id = :owner_id and user_id = :id and file_id in (select id from file where owner_id = :owner_id and filename = :name)');\n $stmt->bindValue(':id', $this->id);\n $stmt->bindValue(':owner_id', $owner->id);\n $stmt->bindValue(':name', $name);\n $stmt->execute();\n $res = $stmt->fetchAll();\n return count($res) == 1;\n }",
"function checkAccessRight(){\r\n \t$res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*',$this->personTable,'feuser_id='.intval($GLOBALS['TSFE']->fe_user->user['uid']));\r\n \tif($res[0]['publadmin'] || $this->person['feuser_id']==intval($GLOBALS['TSFE']->fe_user->user['uid'])){\r\n \t\treturn true;\r\n \t}else{\r\n \t\treturn false;\r\n \t}\r\n }",
"function do_user_name_exist_check($ausername, $aw=user, $acl_id=0) {\n\t# Dim some Vars\n\t\tglobal $_DBCFG, $db_coin;\n\n\t# Set Query for select\n\t\tIF ($aw == 'admin') {\n\t\t\t$query = 'SELECT admin_id FROM '.$_DBCFG['admins'].\" WHERE admin_user_name='\".$db_coin->db_sanitize_data($ausername).\"'\";\n\t\t}\n\t\tIF ($aw == 'user') {\n\t\t\t$query = 'SELECT cl_id FROM '.$_DBCFG['clients'].\" WHERE cl_user_name='\".$db_coin->db_sanitize_data($ausername).\"'\";\n\t\t\tIF ($acl_id) {$query .= ' AND cl_id <> '.$acl_id;}\n\t\t}\n\n\t# Do select\n\t\t$result = $db_coin->db_query_execute($query);\n\t\treturn $db_coin->db_query_numrows($result);\n}",
"function is_user_id_available(){\n\t\t// checkPrivilegeForFunction( __FUNCTION__ );\n\t\t\n\t\t$user_id\t= $_REQUEST[ 'user_id' ];\n\t\t\n\t\t// Check if the user_name already exist\n\t\t$sql = \"SELECT user_id FROM users WHERE user_id='$user_id'\";\n\t\t$result_set = selectQuery( $sql );\n\t\tif( mysqli_num_rows( $result_set ) > 0 ){\n\t\t\techo createJSONMessage( GENERAL_ERROR_MESSAGE, __FUNCTION__, \"This User Name already exist, please try another !\" );\n\t\t\treturn;\n\t\t}\n\t\telse if ( mysqli_num_rows( $result_set ) == 0 ){\n\t\t\techo createJSONMessage( GENERAL_SUCCESS_MESSAGE, __FUNCTION__, \"User ID is available\" );\n\t\t\treturn;\n\t\t}\n\t\techo createJSONMessage( GENERAL_ERROR_MESSAGE, __FUNCTION__, \"Something went wrong. Please contact the Administrator !\" );\n\t}",
"function checkuser($user_name)\n\t{\n\t\t$checkid=mysql_query(\"select user_id from registration where user_name='$user_name' or user_id='$user_name'\");\n\t\t\tif(mysql_num_rows($checkid)>0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn true;\n\t}",
"function check_user_name()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($_POST['user_name'])){\n\t\t\t$check = $this->_account->valid_user_name($_POST['user_name']);\n\t\t\techo !empty($check['is_valid']) && $check['is_valid'] == 'Y'? 'VALID': 'INVALID';\n\t\t}\n\t}",
"function memberNameTaken($memberName){\r\n if(!get_magic_quotes_gpc()){\r\n $memberName = addslashes($memberName);\r\n }\r\n $q = \"SELECT memberName FROM \".TBL_USERS.\" WHERE memberName = '$memberName'\";\r\n $result = mysql_query($q, $this->connection);\r\n return (mysql_numrows($result) > 0);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the 'install` param and returns handle => version pairs. | private function _parseInstallParam(array $installParam): array
{
$install = [];
foreach ($installParam as $handle => $version) {
$handle = strip_tags($handle);
$version = strip_tags($version);
if ($this->_canUpdate($handle, $version)) {
$install[$handle] = $version;
}
}
return $install;
} | [
"private function parse_install($install) {\n if(is_array($install)) {\n if(empty($install)) {\n $this->install=array();\n } else {\n foreach($install as $lib => $obj) {\n //Check if library has object name\n if(!is_int($lib)) {\n list($system,$library)=explode('.',$lib);\n //Checking for valid library\n if(strtolower($system)==='system') {\n $this->install[$obj]=strtolower($library);\n } else {\n exit(\"'$library' : invalid system library or application\");\n }\n } else {\n list($system,$library)=explode('.',$obj);\n //Checking for valid library\n if(strtolower($system)==='system') {\n $this->install[$library]=strtolower($library);\n } else {\n exit(\"'$library' : invalid system library or application\");\n }\n }\n }\n }\n } else {\n exit(\"'install' : invalid array\");\n }\n }",
"function handle_install() {\n global $db_conn;\n \n list($version, $os, $lang, $first_use_ts) \n = array_map( get_request, array('version', 'os', 'lang', 'first_use_ts') );\n $env_id = find_or_add_env($os, $lang, $version);\n \n $sql = \"INSERT INTO installs (env, first_use_ts) VALUES ('$env_id', '$first_use_ts')\";\n $db_conn->exec($sql);\n \n $resp = array('type' => 'install', 'status' => 'ok');\n \n if (starts_with($lang, 'python')) {\n $resp['launch_url'] = WELCOME_PYTHON_URL;\n } elseif (starts_with($lang, 'java')) {\n $resp['launch_url'] = WELCOME_JAVA_URL;\n }\n \n header('Content-Type: application/json');\n echo json_encode($resp);\n die();\n}",
"public function get_installed_version();",
"public function getInstalledVersion() {}",
"private function store_install_info() {\n\t\t$installed = get_option( 'a16_rest_crud_installed', false );\n\t\tif ( ! $installed ) {\n\t\t\tupdate_option( 'a16_rest_crud_installed', time() );\n\t\t}\n\t\tupdate_option( 'a16_rest_crud_version', A16_REST_CRUD_VERSION );\n\t}",
"public function getInstallInfos()\n {\n // The package names as array keys are for internal use only\n return array_values($this->installInfos);\n }",
"public function getInstallInfo()\n {\n return $this->installInfo;\n }",
"function parseInstallNodes(&$installTree) {\n\t\tforeach ($installTree->getChildren() as $node) {\n\t\t\tswitch ($node->getName()) {\n\t\t\t\tcase 'schema':\n\t\t\t\tcase 'data':\n\t\t\t\tcase 'code':\n\t\t\t\tcase 'note':\n\t\t\t\t\t$this->addInstallAction($node);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'upgrade':\n\t\t\t\t\t$minVersion = $node->getAttribute('minversion');\n\t\t\t\t\t$maxVersion = $node->getAttribute('maxversion');\n\t\t\t\t\tif ((!isset($minVersion) || $this->currentVersion->compare($minVersion) >= 0) && (!isset($maxVersion) || $this->currentVersion->compare($maxVersion) <= 0)) {\n\t\t\t\t\t\t$this->parseInstallNodes($node);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public function plugin_install_info()\n {\n }",
"private static function is_new_install() {\n\t\treturn is_null( get_option( ENR_PREFIX . 'version', null ) ) ;\n\t}",
"function host_firmware_version()\n{\n global $config;\n\n return array(\n 'firmware' => array('version' => file_get_contents('/usr/local/opnsense/version/opnsense')),\n 'kernel' => array('version' => file_get_contents('/usr/local/opnsense/version/opnsense-update.kernel')),\n 'base' => array('version' => file_get_contents('/usr/local/opnsense/version/opnsense-update.base')),\n 'config_version' => $config['version']\n );\n}",
"abstract public function onInstall();",
"function getVersion(){\n exec('sw_vers', $version);\n $product = explode(\":\\t\", $version[1]);\n $build = explode(\":\\t\", $version[2]);\n return \"{$product[1]}:{$build[1]}\";\n}",
"private function getInstallFrom()\n\t{\n\t\tif ($this->installfrom === null)\n\t\t{\n\t\t\t$installfrom = base64_decode($this->app->input->getBase64('installfrom', ''));\n\n\t\t\t$field = new SimpleXMLElement('<field></field>');\n\n\t\t\tif ((new UrlRule)->test($field, $installfrom) && preg_match('/\\.xml\\s*$/', $installfrom))\n\t\t\t{\n\t\t\t\t$update = new Update;\n\t\t\t\t$update->loadFromXml($installfrom);\n\t\t\t\t$package_url = trim($update->get('downloadurl', false)->_data);\n\n\t\t\t\tif ($package_url)\n\t\t\t\t{\n\t\t\t\t\t$installfrom = $package_url;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->installfrom = $installfrom;\n\t\t}\n\n\t\treturn $this->installfrom;\n\t}",
"abstract protected function getInstallCommand();",
"public function getInstalledVersion()\n {\n return (string) Mage::getConfig()->getNode()->modules->Quickpay_Payment->version;\n }",
"public function post_install()\n\t{\n\t\t$slug = Input::get('slug', function()\n\t\t{\n\t\t\tthrow new Exception('Invalid slug provided.');\n\t\t});\n\n\t\ttry\n\t\t{\n\t\t\t$extension = Platform::extensions_manager()->install($slug);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t);\n\t\t}\n\n\t\treturn array(\n\t\t\t'status' => true,\n\t\t\t'extension' => $extension,\n\t\t);\n\t}",
"function install () {\n\n }",
"public function version( $args, $assoc_args ) {\n\n\t\t$slug = empty( $args[0] ) ? 'core' : $args[0];\n\t\tif ( in_array( $slug, array( 'core', 'lifterlms' ), true ) ) {\n\t\t\treturn \\WP_CLI::log( llms()->version );\n\t\t}\n\n\t\t$addon = $this->get_addon( $slug );\n\t\tif ( empty( $addon ) ) {\n\t\t\treturn \\WP_CLI::error( 'Invalid slug.' );\n\t\t}\n\n\t\tif ( $addon->is_installed() ) {\n\t\t\treturn \\WP_CLI::log( $addon->get_installed_version() );\n\t\t}\n\n\t\treturn \\WP_CLI::error(\n\t\t\tsprintf(\n\t\t\t\t\"The requested add-on is not installed. Run 'wp llms addon install %s.' to install it.\",\n\t\t\t\t$args[0]\n\t\t\t)\n\t\t);\n\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert a list of vendor IDs to ranges | public static function convertVendorsToRanges($vendors, $allowedVendorIds)
{
$range = $ranges = [];
if (is_null($allowedVendorIds)) {
$allowedVendorIds = [];
}
$idsInList = array_column($vendors, 'id');
for ($index = 0; $index < count($vendors); $index++) {
$id = $vendors[$index]['id'];
if (array_search($id, $allowedVendorIds) !== false) {
$range[] = $id;
}
// Do we need to close the current range?
if (
(
array_search($id, $allowedVendorIds) === false // The vendor we are evaluating is not allowed
|| $index === (count($vendors) - 1) // There is no more vendor to evaluate
|| array_search($id + 1, $idsInList) === false // There is no vendor after this one (ie there is a gap in the vendor IDs) ; we need to stop here to avoid including vendors that do not have consent
)
&& count($range)
) {
$startVendorId = array_shift($range);
$endVendorId = array_pop($range);
$range = [];
$ranges[] = [
'isRange' => is_int($endVendorId),
'startVendorId' => $startVendorId,
'endVendorId' => $endVendorId,
];
}
}
return $ranges;
} | [
"function create_ranges($min, $max, $count_ranges)\n {\n if ($max < $min) return -1;\n\n $dist = ((float)$max - $min) / $count_ranges;\n\n $ranges = array();\n\n for ($i=0; $i<$count_ranges; $i++)\n {\n $ranges[] = array($min + ($dist * $i), $min + ($dist * ($i + 1)));\n }\n\n return $ranges;\n }",
"function parse_range(string $str, Database $db) {\n $set = [];\n $junks = preg_split('/\\s*(?:,\\s*)+/', trim($str));\n foreach ($junks as $j) {\n $ranges = preg_split('/\\s*(?:-|\\.\\.|:)\\s*/', $j);\n switch (count($ranges)) {\n case 0:\n break;\n case 1:\n $tmp = parse_codepoint($ranges[0], true);\n if (is_int($tmp)) {\n $set[] = get_codepoint($tmp, $db);\n }\n break;\n case 2:\n $low = parse_codepoint($ranges[0], true);\n $high = parse_codepoint($ranges[1], true);\n if (is_int($low) && is_int($high)) {\n $set[] = new Range([\n 'first' => min($low, $high),\n 'last' => max($high, $low)], $db);\n }\n break;\n default:\n /* the strange case of U+1234..U+4567..U+7890. We try to handle\n * it gracefully. */\n $max = -1;\n $min = 0x110000;\n foreach ($ranges as $r) {\n $tmp = parse_codepoint($r, true);\n if (is_int($tmp) && $tmp > $max) {\n $max = $tmp;\n }\n if (is_int($tmp) && $tmp < $min) {\n $min = $tmp;\n }\n }\n if ($min < 0x110000 && $max > -1) {\n $set[] = new Range([\n 'first' => min($min, $max),\n 'last' => max($max, $min)], $db);\n }\n }\n }\n return $set;\n}",
"private static function _range_array($list)\n {\n return preg_split('/\\s*,+\\s*/', $list);\n }",
"function getValuesFromRanges(string $range): array\n{\n $allRanges = explode(\",\", $range);\n $allValues = [];\n foreach ($allRanges as $miniRange) {\n if (str_contains($miniRange, \"-\")) {\n $miniRangeArray = explode(\"-\", $miniRange);\n $rangeStart = $miniRangeArray[0];\n $rangeEnd = $miniRangeArray[1];\n for ($i = $rangeStart; $i <= $rangeEnd; $i++) {\n $allValues[] = $i;\n }\n } else {\n $allValues[] = $miniRange;\n }\n }\n return $allValues;\n}",
"function expand_ranges($str)\n {\n \tif (strstr($str, \",\"))\n \t{\n \t\t$tmp1 = explode(\",\", $str);\n\n \t\t$count = count($tmp1);\n\n \t\t//Loop through each comma-separated value\n\n \t\tfor ($i = 0; $i < $count; $i++)\n \t\t{\n \t\t\tif (strstr($tmp1[$i], \"-\"))\n \t\t\t{\n \t\t\t\t// Expand Any Ranges\n $tmp2 = explode(\"-\", $tmp1[$i]);\n\n for ($j = $tmp2[0]; $j <= $tmp2[1]; $j++)\n {\n \t$ret[] = $j;\n }\n\n }\n else\n {\n \t$ret[] = $tmp1[$i];\n }\n }\n\n\t\t}\n\t\telseif(strstr($str, \"-\"))\n\t\t{\n\t\t\t// Range Only, No Commas\n\t\t\t$range = explode(\"-\", $str);\n\n\t\t\tfor ($i = $range[0]; $i <= $range[1]; $i++)\n\t\t\t{\n\t\t\t\t$ret[] = $i;\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n \t// Single Value, Only\n \t$ret[] = $str;\n }\n\n\t\treturn $ret;\n\t}",
"function expand_ranges($str)\n\t{\n\t\tif (strstr($str, \",\"))\n\t\t{\n\t\t\t$tmp1 = explode(\",\", $str);\n\n\t\t\t$count = count($tmp1);\n\n\t\t\t//Loop through each comma-separated value\n\n\t\t\tfor ($i = 0; $i < $count; $i++)\n\t\t\t{\n\t\t\t\tif (strstr($tmp1[$i], \"-\"))\n\t\t\t\t{\n\t\t\t\t\t// Expand Any Ranges\n\t\t\t\t\t$tmp2 = explode(\"-\", $tmp1[$i]);\n\n\t\t\t\t\tfor ($j = $tmp2[0]; $j <= $tmp2[1]; $j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$ret[] = $j;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$ret[] = $tmp1[$i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\telseif(strstr($str, \"-\"))\n\t\t{\n\t\t\t// Range Only, No Commas\n\t\t\t$range = explode(\"-\", $str);\n\n\t\t\tfor ($i = $range[0]; $i <= $range[1]; $i++)\n\t\t\t{\n\t\t\t\t$ret[] = $i;\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Single Value, Only\n\t\t\t$ret[] = $str;\n\t\t}\n\n\t\treturn $ret;\n\t}",
"function common_cidr_to_range($cidr) {\n\t\treturn v_format::cidr_to_range($cidr);\n\t}",
"public static function ranges(array $list)\n {\n $ranges = [];\n\n $currentRange = null;\n foreach ($list as $item) {\n if ($currentRange === null) {\n $currentRange[] = $item;\n } else {\n $currentRange[] = $item;\n $ranges[] = $currentRange;\n $currentRange = [$item];\n }\n }\n if (count($currentRange) === 1) {\n $currentRange[] = null;\n $ranges[] = $currentRange;\n }\n\n return $ranges;\n }",
"function explodeCidr($range)\n{\n\t$ip_arr = explode('/', $range);\n\n\tif (!isset($ip_arr[1])) {\n\t\treturn array($range);\n\t}\n\t\n\t$blow = ( \n\t\tstr_pad(decbin(ip2long($ip_arr[0])), 32, \"0\", STR_PAD_LEFT) &\n\t\tstr_pad(str_pad(\"\", $ip_arr[1], \"1\"), 32, \"0\") \n\t\t);\n\t$bhigh = ($blow | str_pad(str_pad(\"\", $ip_arr[1], \"0\"), 32, \"1\"));\n\n\t$list = array();\n\n\t$bindecBHigh = bindec($bhigh);\n\tfor ($x = bindec($blow); $x <= $bindecBHigh; $x++) {\n\t\t$list[] = long2ip($x);\n\t}\n\n\treturn $list;\n}",
"function formatRanges($ranges) {\n\n\t\t\t$ranges_array = array();\n\t\t\t$ranges_array = explode(',', $ranges);\n\t\t\t$ranges_array = array_filter($ranges_array);\n\n\t\t\tforeach($ranges_array as &$range) {\n\n\t\t\t\t// if there is a range\n\t\t\t\tif(strpos($range, '-') !== false) {\n\n\t\t\t\t\t// Explode by the hyphen\n\t\t\t\t\t$numbers = explode('-', $range);\n\n\t\t\t\t\t// Ensure the data is numeric, there are only 2 numbers, and the number on the left is less than the right\n\t\t\t\t\tif((is_numeric($numbers[0]) && is_numeric($numbers[1]) && count($numbers) == 2) && ($numbers[0] < $numbers[1])) {\n\t\t\t\t\t\t$new_range = '';\n\n\t\t\t\t\t\t// Create the new page numbers with comma delimmitted values\n\t\t\t\t\t\tfor($i = $numbers[0]; $i<= $numbers[1]; $i++) {\n\t\t\t\t\t\t\t$new_range .= $i;\n\n\t\t\t\t\t\t\tif($i != $numbers[1]) {\n\t\t\t\t\t\t\t\t$new_range .= ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$range = $new_range;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// there was an error with the data\n\t\t\t\t\t\t$this->throw_range_error();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// implode by comma\n\t\t\t$ranges = implode(',', $ranges_array);\n\n\t\t\t// explode again by comma\n\t\t\t$ranges = explode(',', $ranges);\n\n\t\t\t// make ranges unique (remove duplicates so that same pages dont appear twice)\n\t\t\t$ranges = array_unique($ranges);\n\n\t\t\t// sort ranges so pages appear in order\n\t\t\tsort($ranges, SORT_NUMERIC );\n\n\t\t\t// reimplode and return\n\t\t\t$ranges = implode(',', $ranges);\n\n\t\t\treturn $ranges;\n\t}",
"function range() {\n $ranges = explode(',', $_GET[Q_RANGE]);\n $result = array();\n\n $nextYear = 1 + (int) date('Y');\n $nextYear2D = $nextYear % 100;\n $thisCentury = $nextYear - $nextYear2D;\n\n foreach ($ranges as $range) {\n $range = trim($range);\n preg_match('/([0-9]*)([^0-9]*)([0-9]*)/', $range, $matches);\n array_shift($matches);\n\n // If the number is empty, leave it empty - dont put it to 0\n // If the number is two-digit, assume it to be within the last century or next year\n if ($matches[0] === \"\") {\n $lower = \"\";\n } else if ($matches[0] < 100) {\n if ($matches[0] > $nextYear2D) {\n $lower = $thisCentury + $matches[0] - 100;\n\t} else {\n\t $lower = $thisCentury + $matches[0];\n\t}\n } else {\n $lower = $matches[0];\n }\n\n // If no separator to indicate a range of years was supplied,\n // the upper and lower boundaries are the same.\n //\n // Otherwise, again:\n // If the number is empty, leave it empty - dont put it to 0\n // If the number is two-digit, assume it to be within the last century or next year\n if ($matches[1] === \"\")\n $upper = $lower;\n else {\n if ($matches[2] === \"\") {\n $upper = \"\";\n } else if ($matches[2] < 100) {\n if ($matches[2] > $nextYear2D) {\n $upper = $thisCentury + $matches[2] - 100;\n\t } else {\n\t $upper = $thisCentury + $matches[2];\n }\n } else {\n $upper = $matches[2];\n }\n }\n\n $result[] = array($lower, $upper);\n }\n $this->query[Q_RANGE] = $result;\n }",
"public static function rangesToNumbers($ranges)\n {\n $numbers = [];\n\n foreach ($ranges as $item) {\n if (is_array($item)) {\n for ($i = $item[0]; $i <= $item[1]; $i++) {\n $numbers[] = $i;\n }\n } else {\n $numbers[] = $item;\n }\n }\n\n return $numbers;\n }",
"function fdry5GenPortRange ($from, $to)\n{\n\t$matches = array();\n\tif (1 !== preg_match ('@^([[:digit:]]+/)?([[:digit:]]+/)?([[:digit:]]+)$@', $from, $matches))\n\t\treturn array();\n\t$prefix = 'e' . $matches[1] . $matches[2];\n\t$from_idx = $matches[3];\n\tif (1 !== preg_match ('@^([[:digit:]]+/)?([[:digit:]]+/)?([[:digit:]]+)$@', $to, $matches))\n\t\treturn array();\n\t$to_idx = $matches[3];\n\tfor ($i = $from_idx; $i <= $to_idx; $i++)\n\t\t$ret[] = $prefix . $i;\n\treturn $ret;\n}",
"private function makeRanges()\n {\n if (isset($this->settings['campaigns']) && count($this->settings['campaigns'])) {\n foreach ($this->settings['campaigns'] as $key => $campaign) {\n $offset = 0;\n foreach ($campaign['variations'] as $vkey => $variation) {\n $limit = Bucketer::getLimit($variation['weight']);\n $max_range = $offset + $limit;\n $this->settings['campaigns'][$key]['variations'][$vkey]['min_range'] = $offset + 1;\n $this->settings['campaigns'][$key]['variations'][$vkey]['max_range'] = $max_range;\n $offset = $max_range;\n }\n }\n } else {\n self::addLog(Logger::ERROR, 'unable to fetch campaign data from settings in makeRanges function');\n throw new \\Exception();\n }\n }",
"function splitrange( $range ) {\n\tif( strpos( $range, \":\" ) !== FALSE ) { return array( $range ); }\n $range = explode( \"/\", $range );\n\tif( $range[1] < 16 ) {\n\t\t$rangeoct = \"/\" . 16;\n\t} else {\n\t\t$rangeoct = \"/\" . $range[1];\n\t}\n $octet = ip2long( $range[0] ); \n $sixteens = pow( 2, (16 - $range[1] ) ) - 1;\n $out = array();\n for ( $i = -65536; $i < 65536 * $sixteens; $out[] = ( long2ip( $octet + ( $i += 65536 ) ) ) . $rangeoct );\n return $out;\n}",
"protected function determineRanges(){\n\t\t// Parse flexform settings\n\t\t$rangeSettings = explode(',', $this->settings['rangesArray']);\n\n\t\t$ranges = array();\n\t\tforeach($rangeSettings as $setting){\n\t\t\tswitch($setting){\n\t\t\t\tcase 'current':\n\t\t\t\t\t$ranges[\\CIC\\Cicevents\\Domain\\Repository\\EventRepository::RANGE_CURRENT] = 'Upcoming Events';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'thisMonth':\n\t\t\t\t\t$ranges[\\CIC\\Cicevents\\Domain\\Repository\\EventRepository::RANGE_THIS_MONTH] = 'This Month';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'nextMonth':\n\t\t\t\t\t$ranges[\\CIC\\Cicevents\\Domain\\Repository\\EventRepository::RANGE_NEXT_MONTH] = 'Next Month';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'nextThreeMonths':\n\t\t\t\t\t$ranges[\\CIC\\Cicevents\\Domain\\Repository\\EventRepository::RANGE_THREE_MONTHS] = 'Next Three Months';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'past':\n\t\t\t\t\t$ranges[\\CIC\\Cicevents\\Domain\\Repository\\EventRepository::RANGE_PAST] = 'Past Events';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn $ranges;\n\t}",
"protected function listRange() {\n $listRange = $this->request()->meta('range');\n if ( !$listRange ) {\n $listRange = $this->request()->header('List-Range');\n }\n\n if ( preg_match('/\\s*(\\d+)(?:-(\\d+))?\\s*/', $listRange, $listRange) ) {\n $listRange = [(int) $listRange[1], (int) @$listRange[2]];\n }\n else {\n $listRange = [0];\n }\n\n if ( !@$listRange[1] ) {\n $listRange[1] = WebService::DEFAULT_LIST_LENGTH;\n }\n\n $listRange[1] = min((int) $listRange[1], WebService::MAXIMUM_LIST_LENGTH);\n\n return $listRange;\n }",
"public function getRangeOrderBundleAttribute(): array\n {\n return range($this->minimum_order_bundle, $this->maximum_order_bundle);\n }",
"private function orderedRange(): array {\n\t\treturn [\n\t\t\tself::FROM => min($this->range),\n\t\t\tself::TO => max($this->range),\n\t\t];\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This function draw a radar graph centered on the graph area | function drawRadar($Data, $DataDescription, $BorderOffset = 10, $MaxValue = -1) {
/*
* Validate the Data and DataDescription array
*/
$this->validateDataDescription ( "drawRadar", $DataDescription );
$this->validateData ( "drawRadar", $Data );
$Points = count ( $Data );
$Radius = ($this->GArea_Y2 - $this->GArea_Y1) / 2 - $BorderOffset;
$XCenter = ($this->GArea_X2 - $this->GArea_X1) / 2 + $this->GArea_X1;
$YCenter = ($this->GArea_Y2 - $this->GArea_Y1) / 2 + $this->GArea_Y1;
/*
* Search for the max value
*/
if ($MaxValue == - 1) {
foreach ( $DataDescription ["Values"] as $Key2 => $ColName ) {
foreach ( $Data as $Key => $Values ) {
if (isset ( $Data [$Key] [$ColName] ))
if ($Data [$Key] [$ColName] > $MaxValue) {
$MaxValue = $Data [$Key] [$ColName];
}
}
}
}
$GraphID = 0;
foreach ( $DataDescription ["Values"] as $Key2 => $ColName ) {
$ID = 0;
foreach ( $DataDescription ["Description"] as $keyI => $ValueI ) {
if ($keyI == $ColName) {
$ColorID = $ID;
}
;
$ID ++;
}
$Angle = - 90;
$XLast = - 1;
foreach ( $Data as $Key => $Values ) {
if (isset ( $Data [$Key] [$ColName] )) {
$Value = $Data [$Key] [$ColName];
$Strength = ($Radius / $MaxValue) * $Value;
$XPos = cos ( $Angle * self::PI / 180 ) * $Strength + $XCenter;
$YPos = sin ( $Angle * self::PI / 180 ) * $Strength + $YCenter;
if ($XLast != - 1)
$this->drawLine ( $XLast, $YLast, $XPos, $YPos, $this->Palette [$ColorID]->R, $this->Palette [$ColorID]->G, $this->Palette [$ColorID]->B );
if ($XLast == - 1) {
$FirstX = $XPos;
$FirstY = $YPos;
}
$Angle = $Angle + (360 / $Points);
$XLast = $XPos;
$YLast = $YPos;
}
}
$this->drawLine ( $XPos, $YPos, $FirstX, $FirstY, $this->Palette [$ColorID]->R, $this->Palette [$ColorID]->G, $this->Palette [$ColorID]->B );
$GraphID ++;
}
} | [
"public function drawRadarAxis($Mosaic = TRUE, $BorderOffset = 10, $A_R = 60, $A_G = 60, $A_B = 60, $S_R = 200, $S_G = 200, $S_B = 200, $MaxValue = NULL) {\r\n $this->validateDataDescription('drawRadarAxis');\r\n $this->validateData('drawRadarAxis');\r\n\r\n $C_TextColor = $this->AllocateColor($this->Picture, $A_R, $A_G, $A_B);\r\n\r\n // Draw the radar axis\r\n $Points = count($this->Data);\r\n $Radius = ($this->GArea_Y2 - $this->GArea_Y1) / 2 - $BorderOffset;\r\n $XCenter = ($this->GArea_X2 - $this->GArea_X1) / 2 + $this->GArea_X1;\r\n $YCenter = ($this->GArea_Y2 - $this->GArea_Y1) / 2 + $this->GArea_Y1;\r\n\r\n // Search for the maximum value\r\n if(is_null($MaxValue)) {\r\n $MaxValue = $this->MaximumValue($this->Data, $this->DataDescription);\r\n }\r\n\r\n // Draw mosaic\r\n if($Mosaic) {\r\n $RadiusScale = $Radius / $MaxValue;\r\n for($t = 1; $t <= $MaxValue - 1; $t++) {\r\n $TRadius = $RadiusScale * $t;\r\n $LastX1 = NULL;\r\n\r\n for($i = 0; $i <= $Points; ++$i) {\r\n $Angle = -90 + $i * 360 / $Points;\r\n $X1 = cos($Angle * M_PI / 180) * $TRadius + $XCenter;\r\n $Y1 = sin($Angle * M_PI / 180) * $TRadius + $YCenter;\r\n $X2 = cos($Angle * M_PI / 180) * ($TRadius + $RadiusScale) + $XCenter;\r\n $Y2 = sin($Angle * M_PI / 180) * ($TRadius + $RadiusScale) + $YCenter;\r\n\r\n if($t % 2 == 1 && isset($LastX)) {\r\n $Plots = array();\r\n $Plots[] = $X1;\r\n $Plots[] = $Y1;\r\n $Plots[] = $X2;\r\n $Plots[] = $Y2;\r\n $Plots[] = $LastX2;\r\n $Plots[] = $LastY2;\r\n $Plots[] = $LastX1;\r\n $Plots[] = $LastY1;\r\n\r\n $C_Graph = $this->AllocateColor($this->Picture, 250, 250, 250);\r\n imagefilledpolygon($this->Picture, $Plots, (count($Plots) + 1) / 2, $C_Graph);\r\n }\r\n\r\n $LastX1 = $X1;\r\n $LastY1= $Y1;\r\n $LastX2 = $X2;\r\n $LastY2= $Y2;\r\n }\r\n }\r\n }\r\n\r\n // Draw the spider web\r\n for($t = 1; $t <= $MaxValue; ++$t) {\r\n $TRadius = ($Radius / $MaxValue) * $t;\r\n $LastX = NULL;\r\n\r\n for($i = 0; $i <= $Points; ++$i) {\r\n $Angle = -90 + $i * 360/$Points;\r\n $X = cos($Angle * M_PI / 180) * $TRadius + $XCenter;\r\n $Y = sin($Angle * M_PI / 180) * $TRadius + $YCenter;\r\n\r\n if(isset($LastX)) {\r\n $this->drawDottedLine($LastX, $LastY, $X, $Y, 4, $S_R, $S_G, $S_B);\r\n }\r\n\r\n $LastX = $X;\r\n $LastY= $Y;\r\n }\r\n }\r\n\r\n // Draw the axis\r\n for($i = 0; $i <= $Points; ++$i) {\r\n $Angle = -90 + $i * 360 / $Points;\r\n $X = cos($Angle * M_PI / 180) * $Radius + $XCenter;\r\n $Y = sin($Angle * M_PI / 180) * $Radius + $YCenter;\r\n\r\n $this->drawLine($XCenter, $YCenter, $X, $Y, $A_R, $A_G, $A_B);\r\n\r\n $XOffset = 0;\r\n $YOffset = 0;\r\n if(isset($this->Data[$i][$this->DataDescription['Position']])) {\r\n $Label = $this->Data[$i][$this->DataDescription['Position']];\r\n\r\n $Positions = imagettfbbox($this->FontSize, 0, $this->FontName, utf8_decode($Label));\r\n $Width = $Positions[2] - $Positions[6];\r\n $Height = $Positions[3] - $Positions[7];\r\n\r\n if($Angle >= 0 && $Angle <= 90) {\r\n $YOffset = $Height;\r\n }\r\n\r\n if($Angle > 90 && $Angle <= 180) {\r\n $YOffset = $Height;\r\n $XOffset = -$Width;\r\n }\r\n\r\n if($Angle > 180 && $Angle <= 270) {\r\n $XOffset = -$Width;\r\n }\r\n\r\n imagettftext($this->Picture, $this->FontSize, 0, $X + $XOffset, $Y + $YOffset, $C_TextColor, $this->FontName, utf8_decode($Label));\r\n }\r\n }\r\n\r\n // Write the values\r\n for($t = 1; $t <= $MaxValue; ++$t) {\r\n $TRadius = ($Radius / $MaxValue) * $t;\r\n\r\n $Angle = -90 + 360 / $Points;\r\n $X1 = $XCenter;\r\n $Y1 = $YCenter - $TRadius;\r\n $X2 = cos($Angle * M_PI / 180) * $TRadius + $XCenter;\r\n $Y2 = sin($Angle * M_PI / 180) * $TRadius + $YCenter;\r\n\r\n $XPos = floor(($X2-$X1) / 2) + $X1;\r\n $YPos = floor(($Y2-$Y1) / 2) + $Y1;\r\n\r\n $Positions = imagettfbbox($this->FontSize, 0, $this->FontName, utf8_decode($t));\r\n $X = $XPos - ($X + $Positions[2] - $X + $Positions[6]) / 2;\r\n $Y = $YPos + $this->FontSize;\r\n\r\n $this->drawFilledRoundedRectangle($X + $Positions[6] - 2, $Y + $Positions[7] - 1, $X + $Positions[2] + 4, $Y + $Positions[3] + 1, 2, 240, 240, 240);\r\n $this->drawRoundedRectangle($X + $Positions[6] - 2, $Y + $Positions[7] - 1, $X + $Positions[2] + 4, $Y + $Positions[3] + 1, 2, 220, 220, 220);\r\n imagettftext($this->Picture, $this->FontSize, 0, $X, $Y, $C_TextColor, $this->FontName, utf8_decode($t));\r\n }\r\n }",
"function drawarc($r, $startAngle, $endAngle) {}",
"function drawRadarAxis($Data, $DataDescription,$Mosaic=TRUE,$BorderOffset=10,$A_R=60,$A_G=60,$A_B=60,$S_R=200,$S_G=200,$S_B=200,$MaxValue=-1)\r\n\t{\r\n\t\t/* Validate the Data and DataDescription array */\r\n\t\t$this->validateDataDescription('drawRadarAxis',$DataDescription);\r\n\t\t$this->validateData('drawRadarAxis',$Data);\r\n\r\n\t\t$C_TextColor = $this->AllocateColor($this->Picture,$A_R,$A_G,$A_B);\r\n\r\n\t\t/* Draw radar axis */\r\n\t\t$Points = count($Data);\r\n\t\t$Radius = ( $this->GArea_Y2 - $this->GArea_Y1 ) / 2 - $BorderOffset;\r\n\t\t$XCenter = ( $this->GArea_X2 - $this->GArea_X1 ) / 2 + $this->GArea_X1;\r\n\t\t$YCenter = ( $this->GArea_Y2 - $this->GArea_Y1 ) / 2 + $this->GArea_Y1;\r\n\r\n\t\t/* Search for the max value */\r\n\t\tif ( $MaxValue == -1 )\r\n\t\t{\r\n\t\t\tforeach ( $DataDescription['Values'] as $ColName )\r\n\t\t\t{\r\n\t\t\t\tforeach ( $Data as $Key => $Values )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( isset($Data[$Key][$ColName]))\r\n\t\t\t\t\tif ( $Data[$Key][$ColName] > $MaxValue ) { $MaxValue = $Data[$Key][$ColName]; }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* Draw the mosaic */\r\n\t\tif ( $Mosaic )\r\n\t\t{\r\n\t\t\t$RadiusScale = $Radius / $MaxValue;\r\n\t\t\tfor ( $t=1; $t<=$MaxValue-1; $t++)\r\n\t\t\t{\r\n\t\t\t\t$TRadius = $RadiusScale * $t;\r\n\t\t\t\t$LastX1 = -1;\r\n\r\n\t\t\t\tfor ( $i=0; $i<=$Points; $i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$Angle = -90 + $i * 360/$Points;\r\n\t\t\t\t\t$X1 = cos($Angle * 3.1418 / 180 ) * $TRadius + $XCenter;\r\n\t\t\t\t\t$Y1 = sin($Angle * 3.1418 / 180 ) * $TRadius + $YCenter;\r\n\t\t\t\t\t$X2 = cos($Angle * 3.1418 / 180 ) * ($TRadius+$RadiusScale) + $XCenter;\r\n\t\t\t\t\t$Y2 = sin($Angle * 3.1418 / 180 ) * ($TRadius+$RadiusScale) + $YCenter;\r\n\r\n\t\t\t\t\tif ( $t % 2 == 1 && $LastX1 != -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$Plots = '';\r\n\t\t\t\t\t\t$Plots[] = $X1; $Plots[] = $Y1;\r\n\t\t\t\t\t\t$Plots[] = $X2; $Plots[] = $Y2;\r\n\t\t\t\t\t\t$Plots[] = $LastX2; $Plots[] = $LastY2;\r\n\t\t\t\t\t\t$Plots[] = $LastX1; $Plots[] = $LastY1;\r\n\r\n\t\t\t\t\t\t$C_Graph = $this->AllocateColor($this->Picture,250,250,250);\r\n\t\t\t\t\t\timagefilledpolygon($this->Picture,$Plots,(count($Plots)+1)/2,$C_Graph);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$LastX1 = $X1; $LastY1= $Y1;\r\n\t\t\t\t\t$LastX2 = $X2; $LastY2= $Y2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t/* Draw the spider web */\r\n\t\tfor ( $t=1; $t<=$MaxValue; $t++)\r\n\t\t{\r\n\t\t\t$TRadius = ( $Radius / $MaxValue ) * $t;\r\n\t\t\t$LastX = -1;\r\n\r\n\t\t\tfor ( $i=0; $i<=$Points; $i++)\r\n\t\t\t{\r\n\t\t\t\t$Angle = -90 + $i * 360/$Points;\r\n\t\t\t\t$X = cos($Angle * 3.1418 / 180 ) * $TRadius + $XCenter;\r\n\t\t\t\t$Y = sin($Angle * 3.1418 / 180 ) * $TRadius + $YCenter;\r\n\r\n\t\t\t\tif ( $LastX != -1 )\r\n\t\t\t\t$this->drawDottedLine($LastX,$LastY,$X,$Y,4,$S_R,$S_G,$S_B);\r\n\r\n\t\t\t\t$LastX = $X; $LastY= $Y;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* Draw the axis */\r\n\t\tfor ( $i=0; $i<=$Points; $i++)\r\n\t\t{\r\n\t\t\t$Angle = -90 + $i * 360/$Points;\r\n\t\t\t$X = cos($Angle * 3.1418 / 180 ) * $Radius + $XCenter;\r\n\t\t\t$Y = sin($Angle * 3.1418 / 180 ) * $Radius + $YCenter;\r\n\r\n\t\t\t$this->drawLine($XCenter,$YCenter,$X,$Y,$A_R,$A_G,$A_B);\r\n\r\n\t\t\t$XOffset = 0; $YOffset = 0;\r\n\t\t\tif (isset($Data[$i][$DataDescription['Position']]))\r\n\t\t\t{\r\n\t\t\t\t$Label = $Data[$i][$DataDescription['Position']];\r\n\r\n\t\t\t\t$Positions = imagettfbbox($this->FontSize,0,$this->FontName,$Label);\r\n\t\t\t\t$Width = $Positions[2] - $Positions[6];\r\n\t\t\t\t$Height = $Positions[3] - $Positions[7];\r\n\r\n\t\t\t\tif ( $Angle >= 0 && $Angle <= 90 )\r\n\t\t\t\t$YOffset = $Height;\r\n\r\n\t\t\t\tif ( $Angle > 90 && $Angle <= 180 )\r\n\t\t\t\t{ $YOffset = $Height; $XOffset = -$Width; }\r\n\r\n\t\t\t\tif ( $Angle > 180 && $Angle <= 270 )\r\n\t\t\t\t{ $XOffset = -$Width; }\r\n\r\n\t\t\t\timagettftext($this->Picture,$this->FontSize,0,$X+$XOffset,$Y+$YOffset,$C_TextColor,$this->FontName,$Label);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* Write the values */\r\n\t\tfor ( $t=1; $t<=$MaxValue; $t++)\r\n\t\t{\r\n\t\t\t$TRadius = ( $Radius / $MaxValue ) * $t;\r\n\r\n\t\t\t$Angle = -90 + 360 / $Points;\r\n\t\t\t$X1 = $XCenter;\r\n\t\t\t$Y1 = $YCenter - $TRadius;\r\n\t\t\t$X2 = cos($Angle * 3.1418 / 180 ) * $TRadius + $XCenter;\r\n\t\t\t$Y2 = sin($Angle * 3.1418 / 180 ) * $TRadius + $YCenter;\r\n\r\n\t\t\t$XPos = floor(($X2-$X1)/2) + $X1;\r\n\t\t\t$YPos = floor(($Y2-$Y1)/2) + $Y1;\r\n\r\n\t\t\t$Positions = imagettfbbox($this->FontSize,0,$this->FontName,$t);\r\n\t\t\t$X = $XPos - ( $X+$Positions[2] - $X+$Positions[6] ) / 2;\r\n\t\t\t$Y = $YPos + $this->FontSize;\r\n\r\n\t\t\t$this->drawFilledRoundedRectangle($X+$Positions[6]-2,$Y+$Positions[7]-1,$X+$Positions[2]+4,$Y+$Positions[3]+1,2,240,240,240);\r\n\t\t\t$this->drawRoundedRectangle($X+$Positions[6]-2,$Y+$Positions[7]-1,$X+$Positions[2]+4,$Y+$Positions[3]+1,2,220,220,220);\r\n\t\t\timagettftext($this->Picture,$this->FontSize,0,$X,$Y,$C_TextColor,$this->FontName,$t);\r\n\t\t}\r\n\t}",
"function drawRadarAxis($Data, $DataDescription, $Mosaic = TRUE, $BorderOffset = 10, $A_R = 60, $A_G = 60, $A_B = 60, $S_R = 200, $S_G = 200, $S_B = 200, $MaxValue = -1) {\r\n\t\t/*\r\n\t\t * Validate the Data and DataDescription array\r\n\t\t */\r\n\t\t$this->validateDataDescription ( \"drawRadarAxis\", $DataDescription );\r\n\t\t$this->validateData ( \"drawRadarAxis\", $Data );\r\n\t\t\r\n\t\t$C_TextColor = self::AllocateColor ( $this->Picture, $A_R, $A_G, $A_B );\r\n\t\t\r\n\t\t/*\r\n\t\t * Draw radar axis\r\n\t\t */\r\n\t\t$Points = count ( $Data );\r\n\t\t$Radius = ($this->GArea_Y2 - $this->GArea_Y1) / 2 - $BorderOffset;\r\n\t\t$XCenter = ($this->GArea_X2 - $this->GArea_X1) / 2 + $this->GArea_X1;\r\n\t\t$YCenter = ($this->GArea_Y2 - $this->GArea_Y1) / 2 + $this->GArea_Y1;\r\n\t\t\r\n\t\t/*\r\n\t\t * Search for the max value\r\n\t\t */\r\n\t\tif ($MaxValue == - 1) {\r\n\t\t\tforeach ( $DataDescription [\"Values\"] as $Key2 => $ColName ) {\r\n\t\t\t\tforeach ( $Data as $Key => $Values ) {\r\n\t\t\t\t\tif (isset ( $Data [$Key] [$ColName] ))\r\n\t\t\t\t\t\tif ($Data [$Key] [$ColName] > $MaxValue) {\r\n\t\t\t\t\t\t\t$MaxValue = $Data [$Key] [$ColName];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Draw the mosaic\r\n\t\t */\r\n\t\tif ($Mosaic) {\r\n\t\t\t$RadiusScale = $Radius / $MaxValue;\r\n\t\t\tfor($t = 1; $t <= $MaxValue - 1; $t ++) {\r\n\t\t\t\t$TRadius = $RadiusScale * $t;\r\n\t\t\t\t$LastX1 = - 1;\r\n\t\t\t\t\r\n\t\t\t\tfor($i = 0; $i <= $Points; $i ++) {\r\n\t\t\t\t\t$Angle = - 90 + $i * 360 / $Points;\r\n\t\t\t\t\t$X1 = cos ( $Angle * self::PI / 180 ) * $TRadius + $XCenter;\r\n\t\t\t\t\t$Y1 = sin ( $Angle * self::PI / 180 ) * $TRadius + $YCenter;\r\n\t\t\t\t\t$X2 = cos ( $Angle * self::PI / 180 ) * ($TRadius + $RadiusScale) + $XCenter;\r\n\t\t\t\t\t$Y2 = sin ( $Angle * self::PI / 180 ) * ($TRadius + $RadiusScale) + $YCenter;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($t % 2 == 1 && $LastX1 != - 1) {\r\n\t\t\t\t\t\t$Plots = \"\";\r\n\t\t\t\t\t\t$Plots [] = $X1;\r\n\t\t\t\t\t\t$Plots [] = $Y1;\r\n\t\t\t\t\t\t$Plots [] = $X2;\r\n\t\t\t\t\t\t$Plots [] = $Y2;\r\n\t\t\t\t\t\t$Plots [] = $LastX2;\r\n\t\t\t\t\t\t$Plots [] = $LastY2;\r\n\t\t\t\t\t\t$Plots [] = $LastX1;\r\n\t\t\t\t\t\t$Plots [] = $LastY1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$C_Graph = self::AllocateColor ( $this->Picture, 250, 250, 250 );\r\n\t\t\t\t\t\timagefilledpolygon ( $this->Picture, $Plots, (count ( $Plots ) + 1) / 2, $C_Graph );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$LastX1 = $X1;\r\n\t\t\t\t\t$LastY1 = $Y1;\r\n\t\t\t\t\t$LastX2 = $X2;\r\n\t\t\t\t\t$LastY2 = $Y2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Draw the spider web\r\n\t\t */\r\n\t\tfor($t = 1; $t <= $MaxValue; $t ++) {\r\n\t\t\t$TRadius = ($Radius / $MaxValue) * $t;\r\n\t\t\t$LastX = - 1;\r\n\t\t\t\r\n\t\t\tfor($i = 0; $i <= $Points; $i ++) {\r\n\t\t\t\t$Angle = - 90 + $i * 360 / $Points;\r\n\t\t\t\t$X = cos ( $Angle * self::PI / 180 ) * $TRadius + $XCenter;\r\n\t\t\t\t$Y = sin ( $Angle * self::PI / 180 ) * $TRadius + $YCenter;\r\n\t\t\t\t\r\n\t\t\t\tif ($LastX != - 1)\r\n\t\t\t\t\t$this->drawDottedLine ( $LastX, $LastY, $X, $Y, 4, $S_R, $S_G, $S_B );\r\n\t\t\t\t\r\n\t\t\t\t$LastX = $X;\r\n\t\t\t\t$LastY = $Y;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Draw the axis\r\n\t\t */\r\n\t\tfor($i = 0; $i <= $Points; $i ++) {\r\n\t\t\t$Angle = - 90 + $i * 360 / $Points;\r\n\t\t\t$X = cos ( $Angle * self::PI / 180 ) * $Radius + $XCenter;\r\n\t\t\t$Y = sin ( $Angle * self::PI / 180 ) * $Radius + $YCenter;\r\n\t\t\t\r\n\t\t\t$this->drawLine ( $XCenter, $YCenter, $X, $Y, $A_R, $A_G, $A_B );\r\n\t\t\t\r\n\t\t\t$XOffset = 0;\r\n\t\t\t$YOffset = 0;\r\n\t\t\tif (isset ( $Data [$i] [$DataDescription [\"Position\"]] )) {\r\n\t\t\t\t$Label = $Data [$i] [$DataDescription [\"Position\"]];\r\n\t\t\t\t\r\n\t\t\t\t$Positions = imagettfbbox ( $this->FontSize, 0, $this->FontName, $Label );\r\n\t\t\t\t$Width = $Positions [2] - $Positions [6];\r\n\t\t\t\t$Height = $Positions [3] - $Positions [7];\r\n\t\t\t\t\r\n\t\t\t\tif ($Angle >= 0 && $Angle <= 90)\r\n\t\t\t\t\t$YOffset = $Height;\r\n\t\t\t\t\r\n\t\t\t\tif ($Angle > 90 && $Angle <= 180) {\r\n\t\t\t\t\t$YOffset = $Height;\r\n\t\t\t\t\t$XOffset = - $Width;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ($Angle > 180 && $Angle <= 270) {\r\n\t\t\t\t\t$XOffset = - $Width;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\timagettftext ( $this->Picture, $this->FontSize, 0, $X + $XOffset, $Y + $YOffset, $C_TextColor, $this->FontName, $Label );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Write the values\r\n\t\t */\r\n\t\tfor($t = 1; $t <= $MaxValue; $t ++) {\r\n\t\t\t$TRadius = ($Radius / $MaxValue) * $t;\r\n\t\t\t\r\n\t\t\t$Angle = - 90 + 360 / $Points;\r\n\t\t\t$X1 = $XCenter;\r\n\t\t\t$Y1 = $YCenter - $TRadius;\r\n\t\t\t$X2 = cos ( $Angle * self::PI / 180 ) * $TRadius + $XCenter;\r\n\t\t\t$Y2 = sin ( $Angle * self::PI / 180 ) * $TRadius + $YCenter;\r\n\t\t\t\r\n\t\t\t$XPos = ( int ) (($X2 - $X1) / 2) + $X1;\r\n\t\t\t$YPos = ( int ) (($Y2 - $Y1) / 2) + $Y1;\r\n\t\t\t\r\n\t\t\t$Positions = imagettfbbox ( $this->FontSize, 0, $this->FontName, $t );\r\n\t\t\t$X = $XPos - ($X + $Positions [2] - $X + $Positions [6]) / 2;\r\n\t\t\t$Y = $YPos + $this->FontSize;\r\n\t\t\t\r\n\t\t\t$this->drawFilledRoundedRectangle ( $X + $Positions [6] - 2, $Y + $Positions [7] - 1, $X + $Positions [2] + 4, $Y + $Positions [3] + 1, 2, 240, 240, 240 );\r\n\t\t\t$this->drawRoundedRectangle ( $X + $Positions [6] - 2, $Y + $Positions [7] - 1, $X + $Positions [2] + 4, $Y + $Positions [3] + 1, 2, 220, 220, 220 );\r\n\t\t\timagettftext ( $this->Picture, $this->FontSize, 0, $X, $Y, $C_TextColor, $this->FontName, $t );\r\n\t\t}\r\n\t}",
"public function radar($options = array(), $datasetName = 'default', $chartId = null)\n\t{\n\t\tif (!is_null($chartId))\n\t\t{\n\t\t\t$this->chartId = $chartId;\n\t\t}\n\t\t\n\t\tif (empty($this->data[$datasetName])) {\n\t\t\treturn false;\n\t\t}\t\n\t\t$this->Chart->set_bg_colour($this->bg_colour);\n\t\t\n\t\tif (isset($options['type']) && $options['type'] == 'filled') {\n\t\t\t$line = new area_hollow();\n\t\t\t\n\t\t} else {\n\t\t\t$line = new line_hollow();\n\t\t\tif (!isset($options['loop']) || (isset($options['loop']) && $options['loop'])) {\n\t\t\t\t$line->loop();\n\t\t\t}\n\t\t\tif (isset($options['loop'])) {\n\t\t\t\tunset($options['loop']);\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t$values = $this->getNumbers($datasetName);\n\t\t/* @todo code below is not getting expected result\n\t\tif (isset($options['tooltip_path'])) {\n\t\t\t$numbers = $values;\n\t\t\t$values = array();\n\t\t\t$tooltips = Set::extract($xpath,$this->data[$datasetName]);\n\t\t\tif (isset($options['tooltip_colour'])) {\n\t\t\t\t$colour = $options['tooltip_colour'];\n\t\t\t\tunset($options['tooltip_colour']);\t\n\t\t\t} else {\n\t\t\t\t$colour = $this->grid_colour;\n\t\t\t}\n\t\t\tforeach ($numbers as $key => $number) {\n\t\t\t\t$tmp = new dot_value( $number, $colour );\n\t\t \t$tmp->set_tooltip($tooltips[$key]);\n\t\t \t$values[] = $tmp;\n\t\t\t}\t\t\t\n\t\t\tunset($options['tooltip_path']);\t\n\t\t}*/\n\t\t\n\t\tif (isset($options['type'])) {\n\t\t\tunset($options['type']);\t\n\t\t}\n\t\tforeach ($options as $key => $setting) {\n\t\t\t$set_method = 'set_' . $key;\n\t\t\tif (is_array($setting)) {\n\t\t\t\t$line->$set_method($setting[0], $setting[1]);\n\t\t\t} else {\n\t\t\t\t$line->$set_method($setting);\n\t\t\t}\t\t\t\n\t\t}\t\t\n\t\t$radar_axis_object = new radar_axis($this->radarAxis['max']);\n\t\t$radar_axis_object->set_steps($this->radarAxis['steps']);\n\t\t$radar_axis_object->set_colour($this->radarAxis['colour']);\n\t\t$radar_axis_object->set_grid_colour($this->radarAxis['grid_colour']);\n\t\tif (!empty($this->radarAxis['labels'])) {\n\t\t\t$labels = new radar_axis_labels($this->radarAxis['labels']);\n\t\t\t$labels->set_colour($this->radarAxis['label_colour']);\n\t\t\t$radar_axis_object->set_labels($labels);\n\t\t}\t\t\n\t\tif (!is_null($this->spoke_labels)) {\n\t\t\t$radar_axis_object->set_spoke_labels($this->spoke_labels);\n\t\t}\n\t\t$this->Chart->set_radar_axis($radar_axis_object);\t\n\t\t\n\t\t$line->set_values($values);\t\t\n\t\t$this->Chart->add_element($line);\n\t\treturn $this->data($chartId);\n\t}",
"function DrawArc($xStart, $yStart, $xEnd, $yEnd, $xc, $yc, wxPoint $ptStart, wxPoint $ptEnd, wxPoint $centre){}",
"public function drawFilledRadar($Alpha = 50, $BorderOffset = 10, $MaxValue = NULL) {\r\n $this->validateDataDescription('drawFilledRadar');\r\n $this->validateData('drawFilledRadar');\r\n\r\n $Points = count($this->Data);\r\n $LayerWidth = $this->GArea_X2 - $this->GArea_X1;\r\n $LayerHeight = $this->GArea_Y2 - $this->GArea_Y1;\r\n $Radius = ($this->GArea_Y2 - $this->GArea_Y1) / 2 - $BorderOffset;\r\n $XCenter = ($this->GArea_X2 - $this->GArea_X1) / 2;\r\n $YCenter = ($this->GArea_Y2 - $this->GArea_Y1) / 2;\r\n\r\n // Search for the maximum value\r\n if(is_null($MaxValue)) {\r\n $MaxValue = $this->MaximumValue($this->Data, $this->DataDescription);\r\n }\r\n\r\n $GraphID = 0;\r\n foreach($this->DataDescription['Values'] as $Key2 => $ColName) {\r\n $ID = 0;\r\n foreach($this->DataDescription['Description'] as $keyI => $ValueI) {\r\n if($keyI == $ColName) {\r\n $ColorID = $ID;\r\n }\r\n ++$ID;\r\n }\r\n\r\n $Angle = -90;\r\n $XLast = NULL;\r\n $Plots = array();\r\n\r\n foreach($this->Data as $Key => $Values) {\r\n if(isset($this->Data[$Key][$ColName])) {\r\n $Value = $this->Data[$Key][$ColName];\r\n if(!is_numeric($Value)) {\r\n $Value = 0;\r\n }\r\n $Strength = ($Radius / $MaxValue) * $Value;\r\n\r\n $XPos = cos($Angle * M_PI / 180) * $Strength + $XCenter;\r\n $YPos = sin($Angle * M_PI / 180) * $Strength + $YCenter;\r\n\r\n $Plots[] = $XPos;\r\n $Plots[] = $YPos;\r\n\r\n $Angle = $Angle + (360 / $Points);\r\n $XLast = $XPos;\r\n $YLast = $YPos;\r\n }\r\n }\r\n\r\n if(isset($Plots[0])) {\r\n $Plots[] = $Plots[0];\r\n $Plots[] = $Plots[1];\r\n\r\n $this->Layers[0] = imagecreatetruecolor($LayerWidth, $LayerHeight);\r\n $C_White = $this->AllocateColor($this->Layers[0], 255, 255, 255);\r\n imagefilledrectangle($this->Layers[0], 0, 0, $LayerWidth, $LayerHeight, $C_White);\r\n imagecolortransparent($this->Layers[0], $C_White);\r\n\r\n $C_Graph = $this->AllocateColor($this->Layers[0], $this->Palette[$ColorID]['R'], $this->Palette[$ColorID]['G'], $this->Palette[$ColorID]['B']);\r\n imagefilledpolygon($this->Layers[0], $Plots, (count($Plots) + 1) / 2, $C_Graph);\r\n\r\n imagecopymerge($this->Picture, $this->Layers[0], $this->GArea_X1, $this->GArea_Y1, 0, 0, $LayerWidth, $LayerHeight, $Alpha);\r\n imagedestroy($this->Layers[0]);\r\n\r\n for($i = 0; $i <= count($Plots) - 4; $i += 2) {\r\n $this->drawLine($Plots[$i] + $this->GArea_X1, $Plots[$i+1] + $this->GArea_Y1, $Plots[$i+2] + $this->GArea_X1, $Plots[$i+3] + $this->GArea_Y1, $this->Palette[$ColorID]['R'], $this->Palette[$ColorID]['G'], $this->Palette[$ColorID]['B']);\r\n }\r\n }\r\n\r\n ++$GraphID;\r\n }\r\n }",
"public function draw() {\r\n $g = $this->chart->getGraphics3D();\r\n $e = $g->getGraphics();\r\n\r\n $r = new Rectangle($this->x0,$this->y0,$this->x1-$this->x0,$this->y1-$this->y0);\r\n\r\n if($this->chart->getParent()!=null) {\r\n if ($this->bBrush != null && $this->bBrush->getVisible()) {\r\n $brushXOR = -1 ^ $this->bBrush->getColor()->getRGB();\r\n $e->setXORMode($this->Color->fromArgb($brushXOR));\r\n $e->fillRect($this->x0, $this->y0, $this->x1 - $this->x0, $this->y1 - $this->y0);\r\n\r\n if ($this->pen!= null && $this->pen->getVisible()) {\r\n $penXOR = -1 ^ $this->pen->getColor()->getRGB();\r\n $e->setXORMode($this->Color->fromArgb($penXOR));\r\n $e->drawRect($this->x0-1,$this->y0-1,$this->x1+1-$this->x0,$this->y1+1-$this->y0);\r\n }\r\n }\r\n else if($this->pen!= null && $this->pen->getVisible()) {\r\n $this->chart->invalidate();\r\n $g->setPen($this->getPen());\r\n $g->getBrush()->setVisible(false);\r\n $g->rectangle($r);\r\n $g->getBrush()->setVisible(true);\r\n }\r\n else {\r\n $this->chart->invalidate();\r\n $tmpColor = new Color();\r\n $tmpLineCap = new LineCap();\r\n $tmpDashStyle = new DashStyle();\r\n $g->setPen(new ChartPen($this->chart, $tmpColor->BLACK, true, 1, $tmpLineCap->BEVEL, $tmpDashStyle->DASH));\r\n $g->getBrush()->setVisible(false);\r\n $g->rectangle($r);\r\n $g->getBrush()->setVisible(true);\r\n }\r\n }\r\n }",
"function arc($x1, $y1, $x2, $y2, $x3, $y3, $x4, $y4)\r\n {\r\n $this->forcePen();\r\n //echo \"$this->_canvas.drawArc($x1, $y1, $r * 2, $r * 2, 180, 270);\\n\";\r\n }",
"public function drawCircle($r)\n {\n }",
"protected function drawChart()\n {\n parent::drawChart();\n\n // draw pie chart in the middle of graph area\n $middleX = ($this->chart->GArea_X1 + $this->chart->GArea_X2) / 2;\n $middleY = ($this->chart->GArea_Y1 + $this->chart->GArea_Y2) / 2;\n\n $this->chart->drawPieGraph(\n $this->dataSet->GetData(),\n $this->dataSet->GetDataDescription(),\n $middleX,\n // pie graph is skewed. Upper part is shorter than the\n // lower part. This is why we set an offset to the\n // Y middle coordiantes.\n $middleY - 15,\n 120, PIE_PERCENTAGE, FALSE, 60, 30, 10, 1);\n }",
"function LineGraph($w, $h, $data, $options='', $colors=null, $maxVal=0, $nbDiv=4){\n$this->SetDrawColor(0,0,0);\n$this->SetLineWidth(0);\n$keys = array_keys($data);\n$ordinateWidth = 10;\n$w -= $ordinateWidth;\n$valX = $this->getX()+$ordinateWidth;\n$valY = $this->getY();\n$margin = 1;\n$titleH = 8;\n$titleW = $w;\n$lineh = 5;\n$keyH = count($data)*$lineh;\n$keyW = $w/5;\n$graphValH = 5;\n$graphValW = $w-$keyW-3*$margin;\n$graphH = $h-(3*$margin)-$graphValH;\n$graphW = $w-(2*$margin)-($keyW+$margin);\n$graphX = $valX+$margin;\n$graphY = $valY+$margin;\n$graphValX = $valX+$margin;\n$graphValY = $valY+2*$margin+$graphH;\n$keyX = $valX+(2*$margin)+$graphW;\n$keyY = $valY+$margin+.5*($h-(2*$margin))-.5*($keyH);\n//draw graph frame border\nif(strstr($options,'gB')){\n$this->Rect($valX,$valY,$w,$h);\n}\n//draw graph diagram border\nif(strstr($options,'dB')){\n$this->Rect($valX+$margin,$valY+$margin,$graphW,$graphH);\n}\n//draw key legend border\nif(strstr($options,'kB')){\n$this->Rect($keyX,$keyY,$keyW,$keyH);\n}\n//draw graph value box\nif(strstr($options,'vB')){\n$this->Rect($graphValX,$graphValY,$graphValW,$graphValH);\n}\n//define colors\nif($colors===null){\n$safeColors = array(0,51,102,153,204,225);\nfor($i=0;$i<count($data);$i++){\n$colors[$keys[$i]] = array($safeColors[array_rand($safeColors)],$safeColors[array_rand($safeColors)],$safeColors[array_rand($safeColors)]);\n}\n}\n//form an array with all data values from the multi-demensional $data array\n$ValArray = array();\nforeach($data as $key => $value){\nforeach($data[$key] as $val){\n$ValArray[]=$val;\n}\n}\n//define max value\nif($maxVal<ceil(max($ValArray))){\n$maxVal = ceil(max($ValArray));\n}\n//draw horizontal lines\n$vertDivH = $graphH/$nbDiv;\nif(strstr($options,'H')){\nfor($i=0;$i<=$nbDiv;$i++){\nif($i<$nbDiv){\n // $this->Line($graphX,$graphY+$i*$vertDivH,$graphX+$graphW,$graphY+$i*$vertDivH);\n} else{\n//$this->Line($graphX,$graphY+$graphH,$graphX+$graphW,$graphY+$graphH);\n}\n}\n}\n//draw vertical lines\n$horiDivW = floor($graphW/(count($data[$keys[0]])-1));\nif(strstr($options,'V')){\nfor($i=0;$i<=(count($data[$keys[0]])-1);$i++){\nif($i<(count($data[$keys[0]])-1)){\n // $this->Line($graphX+$i*$horiDivW,$graphY,$graphX+$i*$horiDivW,$graphY+$graphH);\n} else {\n//$this->Line($graphX+$graphW,$graphY,$graphX+$graphW,$graphY+$graphH);\n}\n}\n}\n//draw graph lines\nforeach($data as $key => $value){\n$this->setDrawColor($colors[$key][0],$colors[$key][1],$colors[$key][2]);\n$this->SetLineWidth(0.7);\n$valueKeys = array_keys($value);\nfor($i=0;$i<count($value);$i++){\nif($i==count($value)-2){\n$this->Line(\n$graphX+($i*$horiDivW),\n$graphY+$graphH-($value[$valueKeys[$i]]/$maxVal*$graphH),\n$graphX+$graphW,\n$graphY+$graphH-($value[$valueKeys[$i+1]]/$maxVal*$graphH)\n);\n} else if($i<(count($value)-1)) {\n$this->Line(\n$graphX+($i*$horiDivW),\n$graphY+$graphH-($value[$valueKeys[$i]]/$maxVal*$graphH),\n$graphX+($i+1)*$horiDivW,\n$graphY+$graphH-($value[$valueKeys[$i+1]]/$maxVal*$graphH)\n);\n}\n}\n//Set the Key (legend)\n$this->SetFont('Courier','',9);\nif(!isset($n))$n=0;\n$this->Line($keyX+1,$keyY+$lineh/2+$n*$lineh,$keyX+2,$keyY+$lineh/2+$n*$lineh);\n$this->SetXY($keyX+2,$keyY+$n*$lineh);\n$this->Cell($keyW,$lineh,$key,0,1,'L');\n$n++;\n}\n//print the abscissa values\nforeach($valueKeys as $key => $value){\nif($key==0){\n$this->SetXY($graphValX,$graphValY);\n$this->Cell(30,$lineh,$value,0,0,'L');\n} else if($key==count($valueKeys)-1){\n$this->SetXY($graphValX+$graphValW-30,$graphValY);\n$this->Cell(30,$lineh,$value,0,0,'R');\n} else {\n$this->SetXY($graphValX+$key*$horiDivW-15,$graphValY);\n$this->Cell(30,$lineh,$value,0,0,'C');\n}\n}\n//print the ordinate values\nfor($i=0;$i<=$nbDiv;$i++){\n$this->SetXY($graphValX-10,$graphY+($nbDiv-$i)*$vertDivH-3);\n$this->Cell(8,6,sprintf('%.1f',$maxVal/$nbDiv*$i),0,0,'L');\n}\n// $this->SetDrawColor(0,0,0);\n// $this->SetLineWidth(0.2);\n}",
"public function arc(int $x, int $y, int $d): PlotBuilder;",
"function RadialTicks ( $x_center, $y_center, $radius, $length, $start_angle, $end_angle, $ticks_count, $thickness, $color ){\n\t\t\n\t\tfor ( $i=$start_angle; $i<=$end_angle; $i+=($end_angle-$start_angle)/($ticks_count-1) ){\n\t\t\t$ret .= \"\t<line x1='\".($x_center+sin(deg2rad($i))*$radius).\"' y1='\".($y_center-cos(deg2rad($i))*$radius).\"' x2='\".($x_center+sin(deg2rad($i))*($radius+$length)).\"' y2='\".($y_center-cos(deg2rad($i))*($radius+$length)).\"' thickness='\".$thickness.\"' color='\".$color.\"' />\";\n\t\t\n\t\t}\n\t\t\n\t\treturn ($ret);\n\t}",
"function drawChart(&$viewer) {\n #\n # For simplicity, in this demo, the data arrays are filled with hard coded data. In a real\n # application, you may use a database or other data source to load up the arrays, and only\n # visible data (data within the view port) need to be loaded.\n #\n $dataX0 = array(10, 15, 6, -12, 14, -8, 13, -3, 16, 12, 10.5, -7, 3, -10, -5, 2, 5);\n $dataY0 = array(130, 150, 80, 110, -110, -105, -130, -15, -170, 125, 125, 60, 25, 150, 150, 15,\n 120);\n $dataX1 = array(6, 7, -4, 3.5, 7, 8, -9, -10, -12, 11, 8, -3, -2, 8, 4, -15, 15);\n $dataY1 = array(65, -40, -40, 45, -70, -80, 80, 10, -100, 105, 60, 50, 20, 170, -25, 50, 75);\n $dataX2 = array(-10, -12, 11, 8, 6, 12, -4, 3.5, 7, 8, -9, 3, -13, 16, -7.5, -10, -15);\n $dataY2 = array(65, -80, -40, 45, -70, -80, 80, 90, -100, 105, 60, -75, -150, -40, 120, -50, -30\n );\n\n # Create an XYChart object 500 x 480 pixels in size, with light blue (c0c0ff) background\n $c = new XYChart(500, 480, 0xc0c0ff);\n\n # Set the plotarea at (50, 40) and of size 400 x 400 pixels. Use light grey (c0c0c0) horizontal\n # and vertical grid lines. Set 4 quadrant coloring, where the colors alternate between lighter\n # and deeper grey (dddddd/eeeeee).\n $plotAreaObj = $c->setPlotArea(50, 40, 400, 400, -1, -1, -1, 0xc0c0c0, 0xc0c0c0);\n $plotAreaObj->set4QBgColor(0xdddddd, 0xeeeeee, 0xdddddd, 0xeeeeee, 0x000000);\n\n # As the data can lie outside the plotarea in a zoomed chart, we need enable clipping\n $c->setClipping();\n\n # Set 4 quadrant mode, with both x and y axes symetrical around the origin\n $c->setAxisAtOrigin(XYAxisAtOrigin, XAxisSymmetric + YAxisSymmetric);\n\n # Add a legend box at (450, 40) (top right corner of the chart) with vertical layout and 8pt\n # Arial Bold font. Set the background color to semi-transparent grey (40dddddd).\n $legendBox = $c->addLegend(450, 40, true, \"arialbd.ttf\", 8);\n $legendBox->setAlignment(TopRight);\n $legendBox->setBackground(0x40dddddd);\n\n # Add titles to axes\n $c->xAxis->setTitle(\"Alpha Index\");\n $c->yAxis->setTitle(\"Beta Index\");\n\n # Set axes line width to 2 pixels\n $c->xAxis->setWidth(2);\n $c->yAxis->setWidth(2);\n\n # The default ChartDirector settings has a denser y-axis grid spacing and less-dense x-axis grid\n # spacing. In this demo, we want the tick spacing to be symmetrical. We use around 40 pixels\n # between major ticks and 20 pixels between minor ticks.\n $c->xAxis->setTickDensity(40, 20);\n $c->yAxis->setTickDensity(40, 20);\n\n #\n # In this example, we represent the data by scatter points. You may modify the code below to use\n # other layer types (lines, areas, etc).\n #\n\n # Add scatter layer, using 11 pixels red (ff33333) X shape symbols\n $c->addScatterLayer($dataX0, $dataY0, \"Group A\", Cross2Shape(), 11, 0xff3333);\n\n # Add scatter layer, using 11 pixels green (33ff33) circle symbols\n $c->addScatterLayer($dataX1, $dataY1, \"Group B\", CircleShape, 11, 0x33ff33);\n\n # Add scatter layer, using 11 pixels blue (3333ff) triangle symbols\n $c->addScatterLayer($dataX2, $dataY2, \"Group C\", TriangleSymbol, 11, 0x3333ff);\n\n #\n # In this example, we have not explicitly configured the full x and y range. In this case, the\n # first time syncLinearAxisWithViewPort is called, ChartDirector will auto-scale the axis and\n # assume the resulting range is the full range. In subsequent calls, ChartDirector will set the\n # axis range based on the view port and the full range.\n #\n $viewer->syncLinearAxisWithViewPort(\"x\", $c->xAxis);\n $viewer->syncLinearAxisWithViewPort(\"y\", $c->yAxis);\n\n # Output the chart\n $chartQuery = $c->makeSession($viewer->getId());\n\n # Include tool tip for the chart\n $imageMap = $c->getHTMLImageMap(\"\", \"\",\n \"title='[{dataSetName}] Alpha = {x|G}, Beta = {value|G}'\");\n\n # Set the chart URL, image map and chart metrics to the viewer\n $viewer->setImageUrl(\"getchart.php?\".$chartQuery);\n $viewer->setImageMap($imageMap);\n $viewer->setChartMetrics($c->getChartMetrics());\n}",
"protected function draw_axis()\n {\n $max_val = max($this->data_set);\n $tick = $this->calculate_tick($max_val);\n $ticks = floor($max_val / $tick);\n $this->axis_ratio = $this->bounds->height / $max_val;\n\n $axis_style = array('stroke' => '#999', 'stroke-width' => 1, 'fill' => 'none');\n $tick_style = array('stroke' => '#bbb', 'stroke-width' => 1);\n $y_axis_text_style = array('text-anchor' => 'end', 'font-size' => 10);\n\n $axis_g = $this->canvas->addGroup(0, 0);\n\n // x and y axis\n $axis = $axis_g->addPolyline($axis_style);\n $axis->addPoint($this->bounds->left + .5, $this->bounds->top);\n $axis->addPoint($this->bounds->left + .5, $this->bounds->bottom + .5);\n $axis->addPoint($this->bounds->right, $this->bounds->bottom + .5);\n\n // draw the tick lines\n for ($i = 1; $i < $ticks; $i++) {\n $tick_line_y = $this->bounds->bottom - ($this->axis_ratio * $tick * $i) + .5;\n $axis_g->addLine(\n $this->bounds->left,\n $tick_line_y,\n $this->bounds->right,\n $tick_line_y,\n $tick_style\n );\n $axis_g->addText($tick * $i, $this->bounds->left-5, $tick_line_y+5, $y_axis_text_style);\n }\n\n // top line\n $axis_g->addLine(\n $this->bounds->left,\n $this->bounds->top + .5,\n $this->bounds->right,\n $this->bounds->top + .5,\n $tick_style\n );\n\n // top and bottom numbers\n $axis_g->addText('0', $this->bounds->left-5, $this->bounds->bottom+5, $y_axis_text_style);\n $axis_g->addText($max_val, $this->bounds->left-5, $this->bounds->top+5, $y_axis_text_style);\n\n // x axis labels\n if ($this->data_is_labeled) {\n $label_style = array('text-anchor' => 'middle', 'font-size' => 10);\n $values = count($this->data_values);\n $section_width = $this->bounds->width / $values;\n $half_section = $section_width / 2;\n $label_g = $this->canvas->addGroup(\n $this->bounds->left + $half_section,\n $this->bounds->bottom + 15,\n $label_style\n );\n\n foreach ($this->data_labels as $i => $label) {\n $label_g->addText(\n $label,\n $section_width * $i,\n 0\n );\n }\n }\n }",
"function drawGraph($title_graph,$color_background,$color_axes,$title_axe_x,$title_axe_y,$color_graph,$type_graph,$color_text,$array){\r\n \r\n if($type_graph == \"line\" || $type_graph == \"bar\"){\r\n // the svg tag allows us to create graphic formats \r\n echo '\r\n <svg viewbox=\"0 2 500 370\" style=\"background-color:'. $color_background .' ; font-size:12px ; width:53%;\"> \r\n <rect x=\"30\" y=\"-10\" width=\"490\" height=\"280\" style=\"fill:transparent ; stroke:'. $color_axes .' ; stoke-width:1 ;\"/>\r\n <text x=\"0\" y=\"15\" fill=\"'.$color_text.'\">'. $title_axe_y .'</text>\r\n <text x=\"470\" y=\"290\" fill=\"'.$color_text.'\">'. $title_axe_x .'</text>\r\n <g class=\"graph-x\">';\r\n\r\n \r\n // determine the type of keys\r\n foreach ($array as $key => $value){\r\n $type=gettype($key);} \r\n // if the type is an integer the array will be sorted\r\n if($type == \"integer\"){\r\n //sort of data\r\n ksort($array);\r\n }\r\n //sinon c-a-d si le type est String\r\n\r\n // Calculations for obtaining the coordinates of points to draw the graph\r\n $nb = max($array); \r\n if ($nb <= 50){\r\n $mdata = 10 ;\r\n }else {\r\n $mdata = 20 ;\r\n }\r\n \r\n $max_data=max($array) + $mdata;\r\n $max_width =500;\r\n $max_height =270;\r\n\r\n $xgap = $max_width / (count($array) + 1);\r\n $ygap = $max_height / (count($array) + 1);\r\n $plz= $xgap;\r\n $plz2= $ygap;\r\n \r\n $one_unit =$max_height / $max_data ;\r\n foreach ($array as $key => $value){\r\n // diplay the keys of axis X\r\n echo '\r\n <text x='. $plz .' y=\"295\" fill=\"'.$color_text.'\" >'. $key.'</text>';\r\n $plz +=$xgap;\r\n }\r\n //l'axe des ordonnees\r\n echo'\r\n </g>\r\n <g class=\"graph-y\">';\r\n\r\n foreach ($array as $key => $value){\r\n $ye = $max_height - ($value * $one_unit );\r\n $xe = $ye ;\r\n // diplay the values of axis Y\r\n echo'\r\n <text x=\"0\" y='. $xe .' fill=\"'.$color_text.'\" >'. $value .'</text>';\r\n $xe += $one_unit ;\r\n }\r\n echo '</g>';\r\n\r\n $num = $xgap;\r\n $num2 = $ygap;\r\n $points=\"\";\r\n $elements= \"\";\r\n foreach ($array as $key => $value){\r\n $y = $max_height - ($value * $one_unit );\r\n $y = $y ;\r\n $elements .= \"<polyline points='$num,0 $num,$max_height' style='stroke:#ffffff22;' />\";\r\n $elements .= \"<polyline points='0,$y $max_width,$y' style='stroke:#ffffff22;' />\";\r\n // $elements .= \"<text x='$num' y='12' style='fill:white;' >$key</text>\";\r\n $elements .= \"<text x='$num' y='\".($y - 10).\"' style='fill:$color_text;' >$value</text>\";\r\n $points .= \" $num,$y \";\r\n if($type_graph==\"line\"){ // To draw a line-chart\r\n echo \"<polyline points='$points' style='stroke:$color_graph;' />\";\r\n $elements .= \"<circle r='5' cx='$num' cy='$y' style='stroke:white;fill:black ;' />\";\r\n }elseif($type_graph==\"bar\"){ // To draw a bar-chart\r\n $height = $max_height - $y; // calculate the height of the bars\r\n echo \"<rect x='$num' y='$y' width='50' height='$height' style='fill:$color_graph;;stroke-width:5;' />\";\r\n }\r\n $points = \" $num,$y \";\r\n $num +=$xgap;\r\n $num2 +=$ygap; \r\n }\r\n // dispay of the graph\r\n echo $elements; \r\n }elseif($type_graph==\"pie\"){//pour tracer Pie-Chart\r\n //Title of the graph\r\n echo '<p class=\"title\">'. $title_graph .'</p>';\r\n\r\n // array contains the sum of values\r\n $sumValues = array();\r\n // array contains values\r\n $values = array();\r\n $sum = 0;\r\n $sumValues[0] = 0;\r\n //filling of arrays\r\n foreach ($array as $key => $value) {\r\n $values[] = $value;\r\n $sum += $value;\r\n $sumValues[] = $sum;\r\n }\r\n if($sum == 100){\r\n echo'\r\n <svg viewBox=\"0 0 64 64\" class=\"pie\">\r\n ';\r\n // array to fill colors used\r\n $tabColor = array();\r\n for($i = 0; $i < count($values); $i++) { \r\n // generate random colors for the pie\r\n $rand1=rand(0,250);\r\n $rand2=rand(0,250);\r\n $rand3=rand(0,250);\r\n $color=\"rgb($rand1,$rand2,$rand3)\";\r\n // draw the pie\r\n echo '<circle r=\"25%\" cx=\"50%\" cy=\"50%\" style=\"stroke-dasharray: '.($values[$i]+10).' 100; stroke: '.$color.'; stroke-dashoffset: -'.$sumValues[$i].';animation-delay: 0.25s\">\r\n </circle>\r\n ';\r\n $tabColor[] = $color; \r\n \r\n }\r\n // style of the pie\r\n echo'\r\n <style>\r\n .pie {\r\n width: 300px;\r\n border-radius: 50%;\r\n }\r\n \r\n .pie circle {\r\n fill: none;\r\n stroke: gold;\r\n stroke-width: 32;\r\n animation: rotate 1.5s ease-in;\r\n }\r\n \r\n @keyframes rotate {\r\n to {\r\n x\r\n } \r\n }\r\n </style>';\r\n // this part is for generate the legend of the pie\r\n for($i = 0; $i < count($values); $i++) {\r\n echo '\r\n <div class=\"canvas\"> \r\n <div class=\"legend\"> \r\n <ul class=\"caption-list\">\r\n <li style=\"background-color: '.$tabColor[$i].';\" class=\"caption-item\"> '.array_search($values[$i],$array).'=>'.$values[$i].'</li>\r\n </ul>\r\n </div>\r\n </div>\r\n <style>\r\n @keyframes render {\r\n 0% {\r\n stroke-dasharray: 0 100;\r\n }\r\n }\r\n \r\n .canvas {\r\n display: inline;\r\n justify-content: space-between;\r\n align-items: center;\r\n max-width: 800px;\r\n }\r\n \r\n .legend {\r\n max-width: 10px;\r\n margin-left: 30px;\r\n }\r\n \r\n .title { \r\n font-family: \"Verdana\", sans-serif;\r\n font-size: 18px;\r\n line-height: 21px;\r\n color: #591d48;\r\n margin: 20px;\r\n }\r\n \r\n .caption-list {\r\n margin: 0;\r\n padding: 0;\r\n list-style: none;\r\n }\r\n \r\n .caption-item {\r\n position: relative;\r\n \r\n margin: 20px 0;\r\n padding-left: 20px;\r\n border-radius: 5px;\r\n font-family: \"Verdana\", sans-serif;\r\n font-size: 16px;\r\n line-height: 18px;\r\n color: #591d48; \r\n cursor: pointer;\r\n }\r\n \r\n .caption-item:hover {\r\n opacity: 0.8;\r\n }\r\n \r\n </style>\r\n ';\r\n }\r\n }else{\r\n echo 'Impossible! the sum of values must equal to 100';\r\n } \r\n \r\n }\r\n\r\n \r\n \r\n \r\n }",
"function create_pie_chart($data)\n{\n\tif (!defined('PIE_RADIUS')) define('PIE_RADIUS',190);\n\n\tarsort($data);\n\n\t// Work out some stats about our graph\n\t$_max_degrees=0.0;\n\tforeach ($data as $value)\n\t{\n\t\tif (is_array($value)) $value=array_shift($value);\n\n\t\t$_max_degrees+=$value;\n\t}\n\t$max_degrees=round($_max_degrees);\n\tif (($max_degrees<355.0) || ($max_degrees>365.0)) fatal_exit(do_lang_tempcode('_BAD_INPUT',float_format($max_degrees)));\n\n\t// Start of output\n\t$output=_start_svg();\n\n\t$angle=0.0;\n\t$colour='333333';\n\t$data2=array();\n\t$plot='';\n\tforeach ($data as $key=>$value)\n\t{\n\t\tif (is_array($value)) $value=array_shift($value);\n\n\t\t// We're using degrees again\n\t\t$start_angle=$angle;\n\t\t$angle+=$value;\n\t\t$end_angle=$angle;\n\n\t\t$plot.=_draw_segment($colour,intval($value),PIE_RADIUS,PIE_RADIUS+intval(cos(deg2rad($start_angle))*PIE_RADIUS),PIE_RADIUS+intval(sin(deg2rad($start_angle))*PIE_RADIUS),PIE_RADIUS+intval((cos(deg2rad($end_angle))*PIE_RADIUS)),PIE_RADIUS+intval((sin(deg2rad($end_angle))*PIE_RADIUS)));\n\t\t$colour=_get_next_colour($colour);\n\t\t$data2[$key]=round(($value/360.0)*100.0,1);\n\t}\n\n\t$output.=_draw_key($data2,'333333',intval(2*PIE_RADIUS+3*X_PADDING),intval(Y_PADDING),'%');\n\t$output.=_finish_svg($plot);\n\n\treturn _filter_svg_css($output);\n}",
"public static function polarLineArrayRad($cx=100, $cy=100, $r=50, $n=6, $alpha=M_PI/8, \r\n$style='stroke:black;stroke-width:1;') {\r\nfor ($i = 1; $i <= $n; $i++) {\r\n$array=fm::returnCartesianRad($r,$i*$alpha);\r\n$x = $array[0]; $y = $array[1];\r\n//point($cx,$cy);\r\n$x1=$cx+$x; $y1=$cy+$y;\r\n//point($x1,$y1);\r\nfs::line($cx,$cy,$x1,$y1,$style);\r\n\t}\r\nreturn array($cx,$cy,$r,$n,$alpha);\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a new endCreationTime Used as end of date range filter. If specified, filters the returned messages to only those with a creation date less than or equal to the specified date and time. For Contact eBay Member (CEM) messages, StartCreationTime and EndCreationTime must be provided. For Ask Seller a Question (ASQ) messages, either the ItemID, or a date range (specified with StartCreationTime and EndCreationTime), or both must be included. | public function setEndCreationTime(\DateTime $endCreationTime)
{
$this->endCreationTime = $endCreationTime;
return $this;
} | [
"public function setEndCreationDate(?string $endCreationDate = null): self\n {\n // validation for constraint: string\n if (!is_null($endCreationDate) && !is_string($endCreationDate)) {\n throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($endCreationDate, true), gettype($endCreationDate)), __LINE__);\n }\n if (is_null($endCreationDate) || (is_array($endCreationDate) && empty($endCreationDate))) {\n unset($this->EndCreationDate);\n } else {\n $this->EndCreationDate = $endCreationDate;\n }\n \n return $this;\n }",
"public function setEndDateTime($var)\n {\n GPBUtil::checkString($var, True);\n $this->end_date_time = $var;\n\n return $this;\n }",
"public function setTimeEnd($timeEnd = null)\n {\n // validation for constraint: string\n if (!is_null($timeEnd) && !is_string($timeEnd)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($timeEnd)), __LINE__);\n }\n if (is_null($timeEnd) || (is_array($timeEnd) && empty($timeEnd))) {\n unset($this->timeEnd);\n } else {\n $this->timeEnd = $timeEnd;\n }\n return $this;\n }",
"public function setEndTs($end_ts)\n {\n $this->end_ts = $end_ts;\n\n return $this;\n }",
"public function setEndDateTime($timestamp);",
"public function setEndTime($end_time)\n\t{\n\t\t$column = self::COL_END_TIME;\n\t\t$this->$column = $end_time;\n\n\t\treturn $this;\n\t}",
"function setTimeEnd($time_end);",
"protected function setEndTime($end_time) {\r\n $this->end_time = strtotime($end_time);\r\n }",
"public function setEndDate( \\DateTime $end ){\n $this->endDTO = $end;\n return $this;\n }",
"public function setEndDate(DrupalDateTime $end_date = NULL);",
"public function setEnd(?TimeRange $end): void\n {\n $this->end = $end;\n }",
"public function setEndDateTime($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\StringValue::class);\n $this->end_date_time = $var;\n\n return $this;\n }",
"public function setDateEnd($DateEnd){\n $this->DateEnd = $DateEnd;\n }",
"public function setMeetingEndDateTime($val)\n {\n $this->_propDict[\"meetingEndDateTime\"] = $val;\n return $this;\n }",
"public function setEndUserId($var)\n {\n GPBUtil::checkString($var, True);\n $this->end_user_id = $var;\n\n return $this;\n }",
"public function extend_endtime($endtime) {\n if ($endtime > $this->end) {\n $this->end = $endtime;\n }\n }",
"public function filterByTimeEnd($timeEnd = null, $comparison = null)\n {\n if (is_array($timeEnd)) {\n $useMinMax = false;\n if (isset($timeEnd['min'])) {\n $this->addUsingAlias(IssuerHistoryTableMap::COL_TIME_END, $timeEnd['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($timeEnd['max'])) {\n $this->addUsingAlias(IssuerHistoryTableMap::COL_TIME_END, $timeEnd['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(IssuerHistoryTableMap::COL_TIME_END, $timeEnd, $comparison);\n }",
"public function setUsageEndDate(\\DateTime $usageEndDate)\n {\n $this->usageEndDate = $usageEndDate;\n return $this;\n }",
"function set_end_time( $end ) {\n\t\t$this->end_time = $end;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Purpose : Shows ticket list from sources in which the user is associated by priority | private function getTicketListByPriority()
{
$settings = Utils::getPersonalizedSettings($this->db);
$params['priority'] = isset($this->param[2]) ? $this->param[2] : 3 ;
$params['source_id'] = isset($this->param[3]) ? $this->param[3] : 0 ;
$params['start'] = 0;
$params['size'] = 1;
// $param = array(
// 'user_id' => null,
// 'source_id' => null,
// 'start' => 0,
// 'size' => 1
// );
//
$TicketListRenderer = new TicketListRenderer($this->db, $this->template);
$sql = $this->getTicketListSQL($params);
$total_ticket = $TicketListRenderer->countTicketList($sql);
$data = array();
$data['pagger_action_url'] = 'Ticket/piority_ajax_list/'.$this->param[2]."/".$this->param[3];
$data['total_ticket'] = $total_ticket;
$html = $TicketListRenderer->getTicketListView($data);
return $html;
} | [
"protected function getSources()\n {\n foreach ($this->ticket_unsorted as $ticket) {\n $this->sources[] = $ticket->getSource();\n }\n }",
"function getUserOpenTicketList()\n\t\t{\n\t\t\t//for getting list of tickets which are open\n\t\t\t$ticket_list=$this->manage_content->getValueMultipleCondtnDesc('submit_ticket','*', array('status'), array('0'));\n\t\t\tif(!empty($ticket_list[0]))\n\t\t\t{\n\t\t\t\tforeach($ticket_list as $ticket)\n\t\t\t\t{\n\t\t\t\t\t//for getting the matched userid\n\t\t\t\t\t$userDetails=$this->manage_content->getValue_where('user_credentials','*','user_id', $ticket['user_id']);\n\t\t\t\t\t\n\t\t\t\t\techo '<tr>\n\t\t\t\t\t\t\t<td>'.$userDetails[0]['email_id'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['title'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['subject'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['date'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['time'].'</td>\n\t\t\t\t\t\t\t<td><a href=\"ticketDetails.php?tid='.$ticket_list[0]['ticket_id'].'&id='.$ticket_list[0]['user_id'].'\"><button class=\"btn btn-info\">Details</button></a></td>\n\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private function getTicketListForAjax()\n { \n $settings = Utils::getPersonalizedSettings($this->db);\n // Utils::dumpvar($settings);\n $page = isset($this->param[2]) ? $this->param[2] : 0;\n\n $page_size = $settings->show_issues_per_page ? \n $settings->show_issues_per_page : \n SQL_PAGE_SIZE;\n\n /*$user_id = $settings->enable_issues_created_by_me ? \n $settings->enable_issues_created_by_me :\n null;*/\n\n $param = array(\n 'user_id' => null,\n 'source_id' => null,\n 'start' => $page,\n 'size' => $page_size\n );\n//print_r( $this->template);\n $TicketListRenderer = new TicketListRenderer($this->db, $this->template);\n $sql = $this->getTicketListSQL($param);\n \n $list = $TicketListRenderer->getTicketList($sql);\n//utils::dumpvar($list);\n if($list)\n {\n echo implode(\"\", $list);\n }\n else\n {\n echo \"No results found.\";\n }\n\n exit; \n }",
"function getGuestOpenTicketList()\n\t\t{\n\t\t\t//for getting list of tickets which are open\n\t\t\t$ticket_list=$this->manage_content->getValueMultipleCondtnDesc('contact_us','*', array('status'), array('0'));\n\t\t\tif(!empty($ticket_list[0]))\n\t\t\t{\n\t\t\t\tforeach($ticket_list as $ticket)\n\t\t\t\t{\n\t\t\t\t\techo '<tr>\n\t\t\t\t\t\t\t<td>'.$ticket['email'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['name'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['title'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['subject'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['date'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['time'].'</td>\n\t\t\t\t\t\t\t<td><a href=\"ticketDetails.php?rid='.$ticket['request_id'].'\"><button class=\"btn btn-info\">Details</button></a></td>\n\t\t\t\t\t\t</tr>' ;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function getTickets() {\n\n /* Fetch all included ticket IDs */\n $ticketIDs = $this->getIncludedTicketIDs();\n\n\n /* Include assigned tickets */ \n if($this->user->getTicketApproval()->count())\n $ticketIDs = array_merge($ticketIDs, $this->user->getTicketApproval()->pluck('id')->toArray());\n\n\n /* Set whereIn variables */\n array_push($this->whereIn, [\n 'column' => 'ticket_id',\n 'array' => $ticketIDs\n ]); \n }",
"public function getTickets()\n {\n return parent::search('Ticket', ['OwnerID' => $this->id, 'Status' => '!=:closed'], ['Priority', 'DueDate DESC'], $this->getDatabase());\n }",
"function adminBugtrackerTicketForList()\n\t{\n\t\t$ticket = $this->model->getOneTicket();\n\t\t//$api = $this->tlgrm;\n\t\t//Self::sendMeTelegram(\"Хэй, Кеша 😊\\r\\nНовый тикет😱 от \".$ticket['author'].\"!\\r\\nВот -> \".$_SERVER['HTTP_HOST'].\"/admin/bugtracker/ticket/\".$ticket['id']);\n\t\t$this->view->simpleGet(\n\t\t\t\t\t\t'/admin/bugtracker_ticket_for_list_view.php',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'ticket'=>$ticket,\n\t\t\t\t\t\t\t\t\t)\n\t\t);\n\t}",
"private function getOtherTypeTicketList($sourceId)\n {\n $query = \" SELECT TS.ticket_id FROM \" . TICKET_SOURCES_TBL . \n \" AS TS LEFT JOIN \" . TICKETS_TBL . \" AS T \n on(TS.ticket_id = T.ticket_id)\n WHERE TS.source_id =\" . $sourceId . \"\n AND T.status IN (7,8,9,10,11)\" ;\n\n return $this->dbLink->select($query);\n }",
"protected function actionTicketList() {\n\n\t\tif(!\\GO::user())\n\t\t\t$this->redirect(array('tickets/site/ticketlogin'));\n\t\t\n\t\t// Build the findparams to retreive the ticketlist from the DB\n\t\t$findParams = \\GO\\Base\\Db\\FindParams::newInstance();\n\t\t$findParams->getCriteria()->addCondition('user_id', \\GO::user()->id);\n\t\t$findParams->order('mtime', 'DESC');\n\t\t\n\t\tif(!isset(\\GO::session()->values['sites_ticketlist']))\n\t\t\t\\GO::session()->values['sites_ticketlist']='openprogress';\n\t\t\n\t\tif(isset($_GET['filter']))\n\t\t\t\\GO::session()->values['sites_ticketlist']=$_GET['filter'];\n\n\t\t// Option to filter the tickets\n\n\t\tswitch(\\GO::session()->values['sites_ticketlist']){\n\t\t\tcase 'open':\n\t\t\t\t$findParams->getCriteria()->addCondition('status_id', 0,'=');\n\t\t\t\tbreak;\n\n\t\t\tcase 'progress':\n\t\t\t\t$findParams->getCriteria()->addCondition('status_id', 0,'>');\n\t\t\t\tbreak;\n\n\t\t\tcase 'openprogress':\n\t\t\t\t$findParams->getCriteria()->addCondition('status_id', 0,'>=');\n\t\t\t\tbreak;\n\n\t\t\tcase 'closed':\n\t\t\t\t$findParams->getCriteria()->addCondition('status_id', 0,'<');\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\t\t\t\n\t\t// Create the pager for the ticket messages\n\t\t$pager = new \\GO\\Site\\Widgets\\Pager('p', $_REQUEST, \\GO\\Tickets\\Model\\Ticket::model(), $findParams, \\GO::user()->max_rows_list, 2);\n\n\t\t// Render the ticketlist page\n\t\t$this->render('ticketlist', array('pager' => $pager));\n\t}",
"public function getTicketByPriority() {\n $priorityTypes = array(\n 'Year/Month' => 'string', \n 'Critical' => 'number',\n 'Major' => 'number',\n 'Minor' => 'number',\n 'Blocker' => 'number',\n 'Trivial' => 'number',\n 'Waiting' => 'number',\n 'Nicetohave' => 'number',\n );\n $googleVis = new Googlevis();\n $columns = $googleVis->createColumns($priorityTypes);\n \n\n $tracData = $this->getTracData();\n $defects = array();\n // Get rid of year/month\n array_shift($priorityTypes);\n foreach($tracData AS $date => $tickets) {\n \n // Setup the index\n $defects[$date] = array();\n foreach ($priorityTypes AS $label => $type) {\n $defects[$date][strtolower($label)] = 0;\n }\n \n // Pump in teh data\n foreach($tickets AS $ticket) {\n $defects[$date][strtolower($ticket['priority'])] += 1;\n }\n }\n \n // Now, create the google vis\n $rows = array();\n foreach($defects AS $date => $priority) {\n $rows[] = $googleVis->createDataRow($date, $priority);\n }\n \n return array('cols' => $columns, 'rows' => $rows);\n }",
"public function getAdminTicketPrioritys() {\n $_status = array();\n $_collection = Mage::getModel('supportticket/supportticketpriority')->getCollection();\n $_collection->addFieldToSelect('entity_id');\n $_collection->addFieldToSelect('title');\n foreach ($_collection as $key => $val) {\n $_status[$val['entity_id']] = $val['title'];\n }\n return $_status;\n }",
"public function getTickets() {\n $priorityId = $this->priority_id;\n $tagId = $this->tag->id;\n return \\App\\Ticket::whereIn('id', function($q) use($tagId){\n return $q->from('taggables')->join('escalation_rules', 'taggables.tag_id', 'escalation_rules.tag_id')->where('taggables.tag_id', $tagId)->select('taggables.taggable_id');\n })->where('priority_id', $priorityId)->get();\n }",
"public function ticketlistAction(){\n\n\t $this->view->session_data = $this->ModelObj->Useconfig;\n\n\t $this->view->ticketdetails = $this->ModelObj->ticketinformation();\n\n\t $this->view->countries = $this->ModelObj->getCountryList();\n\n\t $this->view->helpdeskstatus = $this->ModelObj->getstatuslist(); \n\n\t $this->view->allcustomers = $this->ModelObj->getCustomerList();\n\n\t $this->view->forwarders = $this->ModelObj->getForwarderList();\n\n }",
"public function showTicketSearchResult($tickets)\n {\n echo PHP_EOL;\n $table = new ConsoleTable();\n $table->setHeaders([\"Assignee name\", \"Submitter name\", \"Organization name\"]);\n foreach ($tickets as $ticket) {\n $table->addRow([\n $ticket['submitterUserName'],\n $ticket['assigneeUserName'],\n $ticket['organizationName']\n ]);\n }\n $table->setPadding(2)->display();\n echo PHP_EOL;\n }",
"public function pending_tickets() {\r\n\t\t// Required models\r\n\t\t$this->load_model_combo();\r\n\t\t\r\n\t\t// Get user id\r\n\t\t$userid = $this->users_model->get_user_id($this->session->tickerr_logged[0]);\r\n\t\t\r\n\t\t// Get user info\r\n\t\t$config['user_info'] = $this->users_model->get_user_info($userid);\r\n\t\t\r\n\t\t$this->client_model->set_client_id($config['user_info']->id);\r\n\t\t\r\n\t\t// Pass base and models to the view\r\n\t\t$config['base_url'] = $this->config->base_url();\r\n\t\t$config['users_model'] = $this->users_model;\r\n\t\t$config['tickets_model'] = $this->tickets_model;\r\n\t\t\r\n\t\t// Different sort for client and agent\r\n\t\t$client_sort = array('last_update','id','subject','priority','department_name','last_update');\r\n\t\t$agent_sort = array('last_update','id','subject','priority','client_final_name','department_name','last_update');\r\n\t\t\r\n\t\t// Sort...\r\n\t\tif(isset($_GET['sort']) && isset($_GET['w'])) {\r\n\t\t\tif($config['user_info']->role == '1')\r\n\t\t\t\t$sort = $this->sorter($_GET['sort'], $client_sort);\r\n\t\t\telse\r\n\t\t\t\t$sort = $this->sorter($_GET['sort'], $agent_sort);\r\n\t\t\t$config['sort'] = $_GET['sort'];\r\n\t\t\t$sort_direction = $this->sort_direction($_GET['w']);\r\n\t\t}else{\r\n\t\t\t$sort_direction = 'DESC';\r\n\t\t\t$config['sort'] = 6;\r\n\t\t\t$sort = 'last_update';\r\n\t\t}\r\n\t\t$config['sort_direction'] = $sort_direction;\r\n\t\t\r\n\t\t// Records to show per page\r\n\t\t$records_per_page = 20;\r\n\t\t\r\n\t\t// Pagination\r\n\t\tif(!isset($_GET['page'])) $page = 1;\r\n\t\telse $page = $_GET['page'];\r\n\t\tif($page == 1) $from = 0;\r\n\t\telse $from = (($page-1)*$records_per_page);\r\n\t\t\r\n\t\t// Admin stats\r\n\t\tif($config['user_info']->role == '3')\r\n\t\t\t$this->load_admin_sidebar_stats($config);\r\n\t\t\r\n\t\t// Only for clients\r\n\t\tif($config['user_info']->role == 1) {\r\n\t\t\t// Current page for the sidebar\r\n\t\t\t$config['current_page'] = 31;\r\n\t\t\t\r\n\t\t\t// Load sidebar stats\r\n\t\t\t$this->client_model->set_client_id($userid);\r\n\t\t\t$this->load_client_sidebar_stats($config);\r\n\t\t\t\r\n\t\t\t// Partially load view\r\n\t\t\t$this->load_partial_view_combo($config);\r\n\t\t\t\r\n\t\t\t// Search?\r\n\t\t\tif(isset($_GET['search'])) {\r\n\t\t\t\t$config['search'] = $_GET['search'];\r\n\t\t\t\t$config['all_tickets'] = $this->client_model->get_pending_tickets($records_per_page,$from,$sort,$sort_direction,$_GET['search']);\r\n\t\t\t\t$config['all_tickets_count'] = $this->client_model->count_search_pending_tickets($_GET['search']);\r\n\t\t\t}else{\r\n\t\t\t\t$config['search'] = false;\r\n\t\t\t\t$config['all_tickets'] = $this->client_model->get_pending_tickets($records_per_page,$from,$sort,$sort_direction);\r\n\t\t\t\t$config['all_tickets_count'] = $this->client_model->count_pending_tickets();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Total pages\r\n\t\t\t$config['total_pages'] = round($config['all_tickets_count'] / $records_per_page);\r\n\t\t\t$config['page'] = $page;\r\n\t\t\t\r\n\t\t\t// Finish loading view\r\n\t\t\t$this->load->view('client/tickets/pending_tickets', $config);\r\n\t\t}elseif($config['user_info']->role == '2'|| $config['user_info']->role == '3') {\r\n\t\t\t// Current page for the sidebar\r\n\t\t\t$config['current_page'] = 6;\r\n\t\t\t\r\n\t\t\t$this->agent_model->set_agent_id($userid);\r\n\t\t\t\r\n\t\t\t// Load sidebar stats\r\n\t\t\t$this->load_agent_sidebar_stats($config);\r\n\t\t\t\r\n\t\t\t// Partially load view\r\n\t\t\t$this->load_partial_view_combo($config);\r\n\t\t\t\r\n\t\t\t// Search?\r\n\t\t\tif(isset($_GET['search'])) {\r\n\t\t\t\t$config['search'] = $_GET['search'];\r\n\t\t\t\t$config['all_tickets'] = $this->agent_model->get_pending_tickets($records_per_page,$from,$sort,$sort_direction,$_GET['search']);\r\n\t\t\t\t$config['all_tickets_count'] = $this->agent_model->count_search_pending_tickets($_GET['search']);\r\n\t\t\t}else{\r\n\t\t\t\t$config['search'] = false;\r\n\t\t\t\t$config['all_tickets'] = $this->agent_model->get_pending_tickets($records_per_page,$from,$sort,$sort_direction);\r\n\t\t\t\t$config['all_tickets_count'] = $this->agent_model->count_pending_tickets_();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Total pages\r\n\t\t\t$config['total_pages'] = round($config['all_tickets_count'] / $records_per_page);\r\n\t\t\t$config['page'] = $page;\r\n\t\t\t\r\n\t\t\t// Finish loading view\r\n\t\t\t$this->load->view('agent/tickets/pending_tickets', $config);\r\n\t\t}\r\n\t}",
"public function all_bugs() {\r\n\t\t// Required models\r\n\t\t$this->load_model_combo();\r\n\t\t\r\n\t\t// Get user id\r\n\t\t$userid = $this->users_model->get_user_id($this->session->tickerr_logged[0]);\r\n\t\t\r\n\t\t// Get user info\r\n\t\t$config['user_info'] = $this->users_model->get_user_info($userid);\r\n\t\t\r\n\t\t$this->client_model->set_client_id($config['user_info']->id);\r\n\t\t\r\n\t\t// Pass base and models to the view\r\n\t\t$config['base_url'] = $this->config->base_url();\r\n\t\t$config['users_model'] = $this->users_model;\r\n\t\t$config['tickets_model'] = $this->tickets_model;\r\n\t\t\r\n\t\t// Sort only for clients\r\n\t\t$client_sort = array('date','id','subject','priority','status','agent_final_name','department_name','date');\r\n\t\t\r\n\t\t// Sort...\r\n\t\tif(isset($_GET['sort']) && isset($_GET['w'])) {\r\n\t\t\tif($config['user_info']->role == '1')\r\n\t\t\t\t$sort = $this->sorter($_GET['sort'], $client_sort);\r\n\t\t\telse\r\n\t\t\t\t$sort = $this->sorter($_GET['sort'], $client_sort);\r\n\t\t\t$config['sort'] = $_GET['sort'];\r\n\t\t\t$sort_direction = $this->sort_direction($_GET['w']);\r\n\t\t}else{\r\n\t\t\t$sort_direction = 'DESC';\r\n\t\t\t$config['sort'] = 7;\r\n\t\t\t$sort = 'date';\r\n\t\t}\r\n\t\t$config['sort_direction'] = $sort_direction;\r\n\t\t\r\n\t\t// Records to show per page\r\n\t\t$records_per_page = 20;\r\n\t\t\r\n\t\t// Pagination\r\n\t\tif(!isset($_GET['page'])) $page = 1;\r\n\t\telse $page = $_GET['page'];\r\n\t\tif($page == 1) $from = 0;\r\n\t\telse $from = (($page-1)*$records_per_page);\r\n\t\t\r\n\t\t// Admin stats\r\n\t\tif($config['user_info']->role == '3')\r\n\t\t\t$this->load_admin_sidebar_stats($config);\r\n\t\t\r\n\t\t// Only for clients\r\n\t\tif($config['user_info']->role == 1) {\r\n\t\t\t// Current page for the sidebar\r\n\t\t\t$config['current_page'] = 32;\r\n\t\t\t\r\n\t\t\t// Load sidebar stats\r\n\t\t\t$this->client_model->set_client_id($userid);\r\n\t\t\t$this->load_client_sidebar_stats($config);\r\n\t\t\t\r\n\t\t\t// Partially load view\r\n\t\t\t$this->load_partial_view_combo($config);\r\n\t\t\t\r\n\t\t\t// Search?\r\n\t\t\tif(isset($_GET['search'])) {\r\n\t\t\t\t$config['search'] = $_GET['search'];\r\n\t\t\t\t$config['all_bugs'] = $this->client_model->get_all_bugs($records_per_page,$from,$sort,$sort_direction,$_GET['search']);\r\n\t\t\t\t$config['all_bugs_count'] = $this->client_model->count_search_all_bugs($_GET['search']);\r\n\t\t\t}else{\r\n\t\t\t\t$config['search'] = false;\r\n\t\t\t\t$config['all_bugs'] = $this->client_model->get_all_bugs($records_per_page,$from,$sort,$sort_direction);\r\n\t\t\t\t$config['all_bugs_count'] = $this->client_model->count_all_bugs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Total pages\r\n\t\t\t$config['total_pages'] = round($config['all_bugs_count'] / $records_per_page);\r\n\t\t\t$config['page'] = $page;\r\n\t\t\t\r\n\t\t\t// Finish loading view\r\n\t\t\t$this->load->view('client/bugs/all_bugs', $config);\r\n\t\t}\r\n\t}",
"public function Tickets() {\n\t$filter = array(\"Status\"=>\"Open\");\n\treturn self::get_tickets($filter);\n\t\n \n \n \n \n\t}",
"function get_tickets($member,$ticket_type=NULL,$override_view_others_tickets=false,$silent_error_handling=false)\n{\n\tif ((!is_null($ticket_type)) && (!has_category_access(get_member(),'tickets',get_translated_text($ticket_type))))\n\t\treturn array();\n\n\t$restrict='';\n\t$restrict_description='';\n\t$view_others_tickets=(!$override_view_others_tickets) && (has_specific_permission($member,'view_others_tickets'));\n\n\tif (!$view_others_tickets)\n\t{\n\t\t$restrict=strval($member).'\\_%';\n\t\t$restrict_description=do_lang('SUPPORT_TICKET').': #'.$restrict;\n\t}\n\n\tif ((get_option('ticket_member_forums')=='1') || (get_option('ticket_type_forums')=='1'))\n\t{\n\t\tif (get_forum_type()=='ocf')\n\t\t{\n\t\t\t$fid=($view_others_tickets)?get_ticket_forum_id(NULL,NULL,false,$silent_error_handling):get_ticket_forum_id(get_member(),NULL,false,$silent_error_handling);\n\t\t\tif (is_null($fid)) return array();\n\n\t\t\tif (is_null($ticket_type))\n\t\t\t{\n\t\t\t\trequire_code('ocf_forums');\n\t\t\t\t$forums=ocf_get_all_subordinate_forums($fid);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query='SELECT id FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_forums WHERE '.db_string_equal_to('f_name',get_translated_text($ticket_type)).' AND ';\n\t\t\t\tif ($view_others_tickets) $query.='f_parent_forum IN (SELECT id FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_forums WHERE f_parent_forum='.strval((integer)$fid).')';\n\t\t\t\telse $query.='f_parent_forum='.strval((integer)$fid);\n\n\t\t\t\t$rows=$GLOBALS['FORUM_DB']->query($query);\n\t\t\t\t$forums=collapse_2d_complexity('id','id',$rows);\n\t\t\t}\n\t\t}\n\t\telse $forums=array(get_ticket_forum_id($member,$ticket_type,false,$silent_error_handling));\n\t}\n\telse $forums=array(get_ticket_forum_id(NULL,NULL,false,$silent_error_handling));\n\n\tif ((count($forums)==1) && (array_key_exists(0,$forums)) && (is_null($forums[0]))) return array();\n\t$max_rows=0;\n\t$topics=$GLOBALS['FORUM_DRIVER']->show_forum_topics(array_flip($forums),100,0,$max_rows,$restrict,true,'lasttime',false,$restrict_description);\n\tif (is_null($topics)) return array();\n\tif (!is_null($ticket_type))\n\t{\n\t\t$filtered_topics=array();\n\t\tforeach ($topics as $topic)\n\t\t{\n\t\t\tif (strpos($topic['firstpost']->evaluate(),do_lang('TICKET_TYPE').': '.get_translated_text($ticket_type))!==false)\n\t\t\t{\n\t\t\t\t$filtered_topics[]=$topic;\n\t\t\t}\n\t\t}\n\t\treturn $filtered_topics;\n\t}\n\treturn $topics;\n}",
"public function actionListownedtickets()\n {\n $ownedTicketSearch = new OwnedTicketSearch();\n $dataProvider = $ownedTicketSearch->search(Yii::$app->request->queryParams);\n //$id = Yii::$app->user->identity->getId();\n\n return $this->render('listownedtickets', [\n 'ownedTicketSearch' => $ownedTicketSearch,\n 'dataProvider' => $dataProvider,\n ]);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get base final unit display price including tax, this will add Weee amount to unit price include tax | public function getBaseFinalUnitDisplayPriceInclTax()
{
$basePriceInclTax = $this->getItem()->getBasePriceInclTax();
if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
return $basePriceInclTax;
}
return $basePriceInclTax + $this->weeeHelper->getBaseWeeeTaxInclTax($this->getItem());
} | [
"public function getBaseUnitDisplayPriceInclTax()\n {\n $basePriceInclTax = $this->getItem()->getBasePriceInclTax();\n\n if (!$this->weeeHelper->isEnabled($this->getStoreId())) {\n return $basePriceInclTax;\n }\n\n if ($this->getIncludeWeeeFlag()) {\n return $basePriceInclTax + $this->weeeHelper->getBaseWeeeTaxInclTax($this->getItem());\n }\n\n return $basePriceInclTax;\n }",
"protected function taxAddition()\n {\n return round($this->price * 0.05,2);\n }",
"public function getUnitPrice();",
"public function getUnitNetPrice();",
"public function getBasePrice()\n {\n return $this->base_price;\n }",
"function calculateTotalPrice()\n {\n return round(self::$tax + self::$total_price, 2);\n }",
"public function getUnitPrice()\n {\n return $this->unit_price;\n }",
"public function getPriceIncludingTax()\r\n {\r\n return round($this->getPrice() + $this->getPrice() * $this->getSalesTaxPercent() / 100, 2);\r\n }",
"function invoice_item_unit_price($item) {\n\treturn display_currency($item->item_price);\n\t\n}",
"public function getPriceWithTax()\n {\n $value = $this->price->add($this->getTax());\n return $value;\n }",
"public function getGwBaseTaxAmount();",
"public function getUnitAmountWithTax() {\n\t\treturn $this->unit_amount_with_tax;\n\t}",
"public function getUnitPricingUnit();",
"public function getBaseTaxAmount();",
"public function totalAmountWithOutTaxes()\n {\n $order_price = 0;$order_price1 = 0;\n $order_details = MyOrderDetailModel::where('order', $this->id)->get();\n foreach ($order_details as $order_detail) {\n $order_price = $order_price + ($order_detail->units * ($order_detail->unit_price / (1 + ($order_detail->tax / 100))));\n }\n return number_format($order_price, 2, '.', '');\n }",
"public function getUnitAmount();",
"private function setup_total() {\n\t\t$amount = $this->get_meta( '_give_payment_total', true );\n\n\t\treturn round( floatval( $amount ), give_get_price_decimals( $this->ID ) );\n\t}",
"public function getUnitPrice()\n {\n return $this->unitPrice;\n }",
"public function getBasePrice();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Output only. HTTP URI to the thumbnail image. Generated from protobuf field string thumbnail_uri = 4; | public function getThumbnailUri()
{
return $this->thumbnail_uri;
} | [
"public function getThumbnailUrl();",
"public function getThumbnail(): string\n {\n return $this->thumbnail;\n }",
"public function getThumbnailUrl() {\n return $this->thumbnailURL;\n }",
"public function getThumbnailUrl()\n {\n return $this->thumbnail_url;\n }",
"function getThumbnail()\n {\n if ($this->version == 'APIFRONT')\n {\n return $this->getMeta('thumbnail')->getValue();\n }\n else if ($this->version == '4.6')\n {\n return $this->baseApiUrl\n . '?action=getthumbnail'\n . '&documentid=' . urlencode($this->infos['uri'])\n . '&documentmime=' . urlencode($this->infos['mime'])\n . '&documentextension=' . urlencode($this->infos['ext'])\n . '&documentsource=' . urlencode($this->infos['source'])\n . '&documentdetectedext=' . urlencode($this->infos['detectedExt']);\n }\n else if ($this->version == '5.0')\n {\n return $this->baseApiUrl . '/search-api/fetch/thumbnail'\n . '?source=' . urlencode($this->infos['source'])\n . '&uri=' . urlencode($this->infos['uri']);\n }\n return null;\n }",
"public function getThumbnailUrl()\n {\n if ('image' == $this->type) {\n return $this->getMediaPath();\n }\n\n return $this->thumbnail->getMediaPath();\n }",
"public function getThumbnailUrl()\n {\n return $this->_thumbnailUrl;\n }",
"public function getThumbnail();",
"public function renderUri() {\n\n\t\t// Makes sure the width and the height of the thumbnail is not bigger than the actual file\n\t\t$configuration = $this->getConfiguration();\n\t\tif (!empty($configuration['width']) && $configuration['width'] > $this->getFile()->getProperty('width')) {\n\t\t\t$configuration['width'] = $this->getFile()->getProperty('width');\n\t\t}\n\t\tif (!empty($configuration['height']) && $configuration['height'] > $this->getFile()->getProperty('height')) {\n\t\t\t$configuration['height'] = $this->getFile()->getProperty('height');\n\t\t}\n\n\t\t$configuration = $this->computeFinalImageDimension($configuration);\n\t\t$this->processedFile = $this->getFile()->process($this->getProcessingType(), $configuration);\n\t\t$result = $this->processedFile->getPublicUrl(TRUE);\n\n\t\t// Update time stamp of processed image at this stage. This is needed for the browser to get new version of the thumbnail.\n\t\tif ($this->processedFile->getProperty('originalfilesha1') != $this->getFile()->getProperty('sha1')) {\n\t\t\t$this->processedFile->updateProperties(array('tstamp' => $this->getFile()->getProperty('tstamp')));\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function buildThumbnail();",
"public function getUrlThumbnail() {\r\n if ($this->urlThumbnail === NULL) {\r\n $this->urlThumbnail = Paperclip_Utils::createUrlThumbnail($this->imageId);\r\n if ($this->urlThumbnail === NULL) {\r\n $this->urlThumbnail = '';\r\n }\r\n }\r\n return $this->urlThumbnail;\r\n }",
"protected function thumbnailPath()\n {\n \treturn $this->basePath() . '/' . $this->thumbnail;\n }",
"public function getFullThumbnailUrl()\n {\n return strlen($this->thumbnailPath) ? static::getBannersPath() . $this->thumbnailPath : null;\n }",
"public function returnThumbnail() {\r\n\t\t$this->setOutputFormat();\r\n\t\t$this->createThumbnail();\r\n\t\treturn $this->thumbnail;\r\n\t}",
"public function gen_thumbnail()\n {\n }",
"public function getThumbnailLink() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"thumbnailLink\");\n\t}",
"public function getPhotoThumbnailUrl() {\n return $this->photoThumbnailUrl;\n }",
"public function getThumbnail()\n\t{\n if( !$this->_thumbnail )\n\t\t{\n jimport( 'joomla.filter.filterinput' );\n JLoader::register('JHtmlString', JPATH_LIBRARIES.'/joomla/html/html/string.php');\n\n // We will apply the most strict filter to the variable\n $noHtmlFilter = JFilterInput::getInstance();\n\n $thumbnail = false;\n\n // Check Open Graph tag\n preg_match('/<meta property=\"og:image\" content=\"([^\"]+)/', $this->_buffer, $match);\n if (!empty($match[1]))\n {\n $thumbnail = $match[1];\n $thumbnail = (string)str_replace(array(\"\\r\", \"\\r\\n\", \"\\n\"), '', $thumbnail);\n $thumbnail = $noHtmlFilter->clean($thumbnail);\n $thumbnail = JHtmlString::truncate($thumbnail, 5120);\n $thumbnail = trim($thumbnail);\n }\n }\n hwdMediaShareFactory::load('utilities');\n $utilities = hwdMediaShareUtilities::getInstance();\n $isValid = $utilities->validateUrl( $thumbnail );\n\n if ($isValid)\n {\n $this->_thumbnail = $thumbnail;\n return $this->_thumbnail;\n }\n }",
"public function getThumbnail() {\r\n\treturn $this->thumbnail;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Exports data into file if output path was set. Forces file download otherwise. | public function export()
{
if (empty($this->outputPath)) {
$this->download();
} else {
$this->exportFile();
}
} | [
"function exportSearch(){\r\n // output headers so that the file is downloaded\r\n header('Content-Type: text/csv; charset=utf-8');\r\n header('Content-Disposition: attachment; filename='.get('search').'.csv');\r\n\r\n //create output stream\r\n $output = fopen('php://output', 'w'); \r\n $handle = fopen('temp_search_results.csv','r');\r\n\r\n //loop through file where data is stored and copy to output file\r\n while($data = fgetcsv($handle)){ \r\n fputcsv($output,$data);\r\n }\r\n fclose($output);\r\n fclose($handle);\r\n}",
"public function single_entry_export_download_file() {\n\n\t\t$args = $this->export->data['get_args'];\n\n\t\tif ( 'wpforms_tools_single_entry_export_download' !== $args['action'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Check for form_id.\n\t\t\tif ( empty( $args['form_id'] ) ) {\n\t\t\t\tthrow new \\Exception( $this->export->errors['unknown_form_id'] );\n\t\t\t}\n\n\t\t\t// Check for entry_id.\n\t\t\tif ( empty( $args['entry_id'] ) ) {\n\t\t\t\tthrow new \\Exception( $this->export->errors['unknown_entry_id'] );\n\t\t\t}\n\n\t\t\t// Security check.\n\t\t\tif (\n\t\t\t\t! wp_verify_nonce( $args['nonce'], 'wpforms-tools-single-entry-export-nonce' ) ||\n\t\t\t\t! wpforms_current_user_can()\n\t\t\t) {\n\t\t\t\tthrow new \\Exception( $this->export->errors['security'] );\n\t\t\t}\n\n\t\t\t// Get stored request data.\n\t\t\t$request_data = $this->export->ajax->get_request_data( $args );\n\n\t\t\t$this->export->ajax->request_data = $request_data;\n\n\t\t\t// Get export data.\n\t\t\t$export_data = $this->export->ajax->get_data();\n\n\t\t\t// Writing to csv file.\n\t\t\t$this->write_csv( $export_data, $request_data );\n\n\t\t\t$export_file = $this->get_tmpfname( $request_data );\n\n\t\t\tclearstatcache( true, $export_file );\n\n\t\t\tif ( ! is_readable( $export_file ) ) {\n\t\t\t\tthrow new \\Exception( $this->export->errors['file_not_readable'] );\n\t\t\t}\n\n\t\t\tif ( @filesize( $export_file ) === 0 ) { //phpcs:ignore\n\t\t\t\tthrow new \\Exception( $this->export->errors['file_empty'] );\n\t\t\t}\n\n\t\t\t$file_name = 'wpforms-' . $request_data['db_args']['form_id'] . '-' . sanitize_file_name( get_the_title( $request_data['db_args']['form_id'] ) ) . '-entry-' . $request_data['db_args']['entry_id'] . '-' . date( 'Y-m-d-H-i-s' ) . '.csv';\n\t\t\t$this->http_headers( $file_name );\n\n\t\t\treadfile( $export_file ); // phpcs:ignore\n\t\t\texit;\n\n\t\t} catch ( \\Exception $e ) {\n\n\t\t\t$error = $this->export->errors['common'] . '<br>' . $e->getMessage();\n\t\t\tif ( wpforms_debug() ) {\n\t\t\t\t$error .= '<br><b>WPFORMS DEBUG</b>: ' . $e->__toString();\n\t\t\t}\n\n\t\t\t\\WPForms_Admin_Notice::error( $error );\n\t\t}\n\t}",
"function report_export() {\n \tif($this->active_report->isNew()) {\n $this->httpError(HTTP_ERR_NOT_FOUND);\n } // if\n \n if(!$this->active_report->canView($this->logged_user)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n download_contents(array_to_csv(TimeReports::executeReportForExport($this->logged_user, $this->active_report)), 'text/csv', \"time-report.csv\", true);\n }",
"public function export() {\n $courseTempDir = $this -> createCourseTempDirectory();\n $this -> exportCourseLessons($courseTempDir);\n $this -> exportDatabaseData($courseTempDir);\n $file = $this -> createCourseExportFile($courseTempDir);\n return $file;\n }",
"public function export($filename);",
"public function export_listen() {\n\t\t// Bail if we aren't in the admin\n\t\tif ( ! is_admin() )\n\t\t\treturn false;\n\n\t\tif ( ! isset ( $_REQUEST['form_id'] ) || empty ( $_REQUEST['form_id'] ) )\n\t\t\treturn false;\n\n\t\tif ( isset ( $_REQUEST['export_single'] ) && ! empty( $_REQUEST['export_single'] ) )\n\t\t\tNinja_Forms()->sub( esc_html( $_REQUEST['export_single'] ) )->export();\n\n\t\tif ( ( isset ( $_REQUEST['action'] ) && $_REQUEST['action'] == 'export' ) || ( isset ( $_REQUEST['action2'] ) && $_REQUEST['action2'] == 'export' ) ) {\n\t\t\tNinja_Forms()->subs()->export( ninja_forms_esc_html_deep( $_REQUEST['post'] ) );\n\t\t}\n\n\t\tif ( isset ( $_REQUEST['download_file'] ) && ! empty( $_REQUEST['download_file'] ) ) {\n\t\t\t// Open our download all file\n\t\t\t$filename = esc_html( $_REQUEST['download_file'] );\n\n\t\t\t$upload_dir = wp_upload_dir();\n\n\t\t\t$file_path = trailingslashit( $upload_dir['path'] ) . $filename . '.csv';\n\n\t\t\tif ( file_exists( $file_path ) ) {\n\t\t\t\t$myfile = file_get_contents ( $file_path );\n\t\t\t} else {\n\t\t\t\t$redirect = esc_url_raw( remove_query_arg( array( 'download_file', 'download_all' ) ) );\n\t\t\t\twp_redirect( $redirect );\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\tunlink( $file_path );\n\n\t\t\t$form_name = Ninja_Forms()->form( absint( $_REQUEST['form_id'] ) )->get_setting( 'form_title' );\n\t\t\t$form_name = sanitize_title( $form_name );\n\n\t\t\t$today = date( 'Y-m-d', current_time( 'timestamp' ) );\n\n\t\t\t$filename = apply_filters( 'nf_download_all_filename', $form_name . '-all-subs-' . $today );\n\n\t\t\theader( 'Content-type: application/csv');\n\t\t\theader( 'Content-Disposition: attachment; filename=\"'.$filename .'.csv\"' );\n\t\t\theader( 'Pragma: no-cache');\n\t\t\theader( 'Expires: 0' );\n\n\t\t\techo $myfile;\n\n\t\t\tdie();\n\t\t}\n\t}",
"public function exportFiles();",
"public function downloadDumpAsFile();",
"public function outputToPage($forceDL=true, $file_name=\"My CSV File\"){\n if($output != \"\"){\n if($forceDL){//If Forcing Download of file\n header(\"Content-type: \".$this->header);//Set to CSV Header\n header(\"Content-Disposition: attachment; filename=\".$file_name.$this->ext);\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n }else{\n header(\"Content-type: text/plain\");//Set to CSV Header\n }\n echo $this->output;//Output the CSV Data\n exit;\n }else{\n $this->printError(\"There is nothing to write to the file.\");\n }\n }",
"public function exportdataAction()\n {\n $export = new Checklist_Modules_Export();\n $this->dialog_name = 'audit/exportdata';\n $vars = $this->_request->getPathInfo();\n $pinfo = explode(\"/\", $vars);\n $id = $this->audit['audit_id'];\n if (! $this->getRequest()->isPost())\n {\n // export includes a row of lab, audit and matching auditdata\n $out = $export->exportData($id);\n $outl = strlen($out['data']);\n // The data is ready\n // The proposed name is: <lab_num>_<audit_type>_<audit_date>.edx\n $fname = $out['name'];\n // Send the file\n // call the action helper to send the file to the browser\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n\n $this->getResponse()->setHeader('Content-type', 'application/plain'); // octet-stream');\n $this->getResponse()->setHeader('Content-Disposition',\n 'attachment; filename=\"' . $fname . '\"');\n $this->getResponse()->setBody($out['data']);\n }\n else\n {\n $this->collectData();\n }\n }",
"public function doExport();",
"public function export(){\n\n $this->model->exportFile();\n }",
"function save_output()\n {\n $output_file = fopen($this->output_filename(), 'wb');\n fwrite($output_file, $this->api_response()->output());\n fclose($output_file);\n }",
"public function handle_export() {\r\n\t\t// Get request data.\r\n\t\t$post = filter_input_array( INPUT_POST );\r\n\r\n\t\t// Only if export request.\r\n\t\tif ( isset( $post['ivt-action'], $post['export'] ) && 'export' === $post['ivt-action'] && ! empty( $post['ivt-export'] ) ) {\r\n\t\t\t// Verify the nonce.\r\n\t\t\tif ( wp_verify_nonce( $post['export-nonce'], 'ivt-export' ) ) {\r\n\t\t\t\t// Get the data to export.\r\n\t\t\t\t$data = $this->get_data( $post );\r\n\r\n\t\t\t\t// Download the file.\r\n\t\t\t\t$this->download( $data );\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function outputToFile(): void\n {\n $dataExist = count($this->gpsData) > 0;\n if (!$dataExist) {\n throw new Exception('No gps data was found.');\n }\n\n $outputFile = getcwd() . '/output.csv';\n $filePointer = fopen($outputFile, 'w');\n\n $headers = array_keys(reset($this->gpsData));\n fputcsv($filePointer, $headers);\n\n foreach ($this->gpsData as $fields) {\n $fields = array_values($fields);\n fputcsv($filePointer, $fields);\n }\n\n fclose($filePointer);\n\n echo \"Output file: {$outputFile}\" . PHP_EOL;\n }",
"public function exportAction()\n {\n\n //setting headers for HTTP Response\n $this->Front()->Plugins()->Json()->setRenderer(false);\n $this->Response()->setHeader('content-type', 'text/csv; charset=utf-8');\n $this->Response()->setHeader('content-disposition', 'attachment;filename=redirects.csv');\n echo \"\\xEF\\xBB\\xBF\";\n\n\n $dbalConnection = $this->get('dbal_connection');\n //query data\n $queryBuilder = $dbalConnection->createQueryBuilder();\n $queryBuilder->select('*')\n ->from('scop_redirecter');\n $data = $queryBuilder->execute()->fetchAll();\n\n\n //create file and write rows to it\n $file = fopen('php://output', 'w');\n foreach ($data as $line) {\n fputcsv($file, $line, ';');\n }\n fclose($file);\n }",
"public function forceDownload() {\n\n ob_end_clean();\n\n if($_SERVER['REQUEST_METHOD'] == 'POST' && ShoprocketCommon::postVal('shoprocket-action') == 'export_csv') {\n require_once(SHOPROCKET_PATH . \"/models/ShoprocketExporter.php\");\n $start = str_replace(';', '', $_POST['start_date']);\n $end = str_replace(';', '', $_POST['end_date']);\n ShoprocketCommon::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . \"] Date parameters for report: START $start and END $end\");\n $report = ShoprocketExporter::exportOrders($start, $end);\n\n header('Content-Type: application/csv'); \n header('Content-Disposition: inline; filename=\"ShoprocketReport.csv\"');\n echo $report;\n die();\n }\n elseif($_SERVER['REQUEST_METHOD'] == 'POST' && ShoprocketCommon::postVal('shoprocket-action') == 'download log file') {\n\n $logFilePath = ShoprocketLog::getLogFilePath();\n if(file_exists($logFilePath)) {\n $logData = file_get_contents($logFilePath);\n $cartSettings = ShoprocketLog::getCartSettings();\n\n header('Content-Description: File Transfer');\n header('Content-Type: text/plain');\n header('Content-Disposition: attachment; filename=ShoprocketLogFile.txt');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Pragma: public');\n echo $cartSettings . \"\\n\\n\";\n echo $logData;\n die();\n }\n }\n elseif($_SERVER['REQUEST_METHOD'] == 'POST' && ShoprocketCommon::postVal('shoprocket-action') == 'clear log file') {\n ShoprocketCommon::clearLog();\n }\n \n }",
"public function getExport(){\n\n $Model = new \\EmailNewsletter\\model\\Email;\n\n $result = $Model\n ->select('email')\n ->order('created_on DESC')\n ->data();\n\n $csv = '';\n\n while($row = $result->fetch()){\n $csv .= \"{$row['email']}\\n\";\n }//while\n\n $path = ENACT_STORAGE . 'email-newsletter-dump.csv';\n\n file_put_contents(ENACT_STORAGE . 'email-newsletter-dump.csv', $csv);\n\n if(!is_file($path)){\n $back = enact_cpSlug('email-newsletter/');\n $this->html(\"<h1>Sorry, the email newsletter export doesn't exist</h1><a href='{$back}'>Go back</a>\");\n }//if\n\n $this->download($path);\n\n }",
"private function export()\n {\n $writtenUrls = 0;\n $currentFileIndex = 0;\n\n $this->sitemapFiles[] = $this->genSitemapFilename();\n $this->exporter->setBaseUrl($this->getBaseUrl());\n $this->exporter->setFilename(__DIR__ . '/../download/' . $this->sitemapFiles[0]);\n $this->exporter->startDocument();\n\n foreach ($this->resources as $resource) {\n $this->exporter->attachUrl($resource);\n\n $writtenUrls++;\n if ($writtenUrls === 50000\n || filesize(__DIR__ . '/../download/' . $this->sitemapFiles[$currentFileIndex]) > 10484000) {\n $this->exporter->save();\n $currentFileIndex++;\n $writtenUrls = 0;\n $filename = $this->genSitemapFilename();\n $this->sitemapFiles[] = $filename;\n $this->exporter->setFilename('download/' . $filename);\n $this->exporter->startDocument();\n }\n\n }\n\n $this->exporter->save();\n\n if ($this->config->gzip) {\n foreach ($this->sitemapFiles as &$filenameGZ) {\n $this->gzFile(__DIR__ . '/../download/' . $filenameGZ);\n $filenameGZ .= '.gz';\n }\n unset($filenameGZ);\n }\n\n if (count($this->sitemapFiles) > 1) {\n $this->sitemapIndexFile = $this->genSitemapFilename('sitemapindex');\n $this->exporter->setFilename($this->sitemapIndexFile);\n $this->exporter->startDocument('sitemapindex');\n\n foreach ($this->sitemapFiles as $filename) {\n $this->exporter->attachSitemap($this->getBaseUrl() . '/' . $filename, date(DATE_W3C, time()));\n }\n\n $this->exporter->save();\n\n if ($this->config->gzip) {\n $this->gzFile('download/' . $this->sitemapIndexFile);\n $this->sitemapIndexFile .= '.gz';\n }\n }\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case for get20170401TicketLayoutByContext . | public function testGet20170401TicketLayoutByContext()
{
} | [
"public function testGet20170401TicketLayoutByContextByDepartment()\n {\n }",
"public function testGet20170401TicketLayoutContextJ()\n {\n }",
"protected function get20170401TicketLayoutByContextRequest($context)\n {\n if (empty($context)) {\n throw new \\InvalidArgumentException('Missing parameter \"$context\" in TicketsApi::get20170401TicketLayoutByContextRequest().');\n }\n \n\n $resourcePath = '/20170401/ticket_layouts/{context}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($context !== null) {\n $context = ObjectSerializer::toQueryValue($context);\n }\n \n\n // path params\n if ($context !== null) {\n $resourcePath = str_replace(\n '{' . 'context' . '}',\n ObjectSerializer::toPathValue($context),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\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 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 = \\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 get20170401TicketLayoutByContextByDepartmentRequest($department, $context)\n {\n if (empty($department)) {\n throw new \\InvalidArgumentException('Missing parameter \"$department\" in TicketsApi::get20170401TicketLayoutByContextByDepartmentRequest().');\n }\n if (empty($context)) {\n throw new \\InvalidArgumentException('Missing parameter \"$context\" in TicketsApi::get20170401TicketLayoutByContextByDepartmentRequest().');\n }\n \n\n $resourcePath = '/20170401/ticket_layouts/{context}/{department}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($department !== null) {\n $department = ObjectSerializer::toQueryValue($department);\n }\n if ($context !== null) {\n $context = ObjectSerializer::toQueryValue($context);\n }\n \n\n // path params\n if ($department !== null) {\n $resourcePath = str_replace(\n '{' . 'department' . '}',\n ObjectSerializer::toPathValue($department),\n $resourcePath\n );\n }\n // path params\n if ($context !== null) {\n $resourcePath = str_replace(\n '{' . 'context' . '}',\n ObjectSerializer::toPathValue($context),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\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 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 = \\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 getTicketLayoutByContextByDepartmentRequest($department, $context)\n {\n if (empty($department)) {\n throw new \\InvalidArgumentException('Missing parameter \"$department\" in TicketsApi::getTicketLayoutByContextByDepartmentRequest().');\n }\n if (empty($context)) {\n throw new \\InvalidArgumentException('Missing parameter \"$context\" in TicketsApi::getTicketLayoutByContextByDepartmentRequest().');\n }\n \n\n $resourcePath = '/ticket_layouts/{context}/{department}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($department !== null) {\n $department = ObjectSerializer::toQueryValue($department);\n }\n if ($context !== null) {\n $context = ObjectSerializer::toQueryValue($context);\n }\n \n\n // path params\n if ($department !== null) {\n $resourcePath = str_replace(\n '{' . 'department' . '}',\n ObjectSerializer::toPathValue($department),\n $resourcePath\n );\n }\n // path params\n if ($context !== null) {\n $resourcePath = str_replace(\n '{' . 'context' . '}',\n ObjectSerializer::toPathValue($context),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\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 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 = \\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 getTicketLayoutContextJRequest($context)\n {\n if (empty($context)) {\n throw new \\InvalidArgumentException('Missing parameter \"$context\" in TicketsApi::getTicketLayoutContextJRequest().');\n }\n \n\n $resourcePath = '/ticket_layouts/{context}.js';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($context !== null) {\n $context = ObjectSerializer::toQueryValue($context);\n }\n \n\n // path params\n if ($context !== null) {\n $resourcePath = str_replace(\n '{' . 'context' . '}',\n ObjectSerializer::toPathValue($context),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\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 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 = \\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 testGetTicketLabelByLabelTicket()\n {\n }",
"public function testGetTicketProblemByIdTicket()\n {\n }",
"public function testGetTicketCategoryById()\n {\n }",
"public function getLayout() {}",
"public function testGetLayoutDataSetting()\n {\n }",
"public function testLoadLayoutSetup()\n {\n }",
"public function testGetTicketCategories()\n {\n }",
"public function testGetTicketWorkflowById()\n {\n }",
"public function testGetTicketProblems()\n {\n }",
"public function testGetTicketMacroById()\n {\n }",
"public function testGetTicketPriorityById()\n {\n }",
"public function test_ticket_category_bug_reports(){\n echo \"\\nTest Ticket Category: Bug Reports \";\n $this->assertEquals(3, $this->ticket2->category()->id);\n }",
"public function testDashboardLayout()\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize controller Set backend layout. Get URI to use in navigation breadcrumb. | public function init()
{
$this->_helper->layout->setLayout('layout_backend'); // Change layout
$uri="/".$this->_getParam('module')."/".$this->_getParam('controller')."/".$this->_getParam('action');
$activeNav = $this->view->navigation()->findByUri($uri);
$activeNav->active=true;
} | [
"private function initBreadCrumbs(){\n $this->array_list[] = [\n 'order' => 1,\n 'label' => 'Dashboard',\n 'link' => URL::route('admin.index')\n ];\n }",
"protected function _generateBreadcrumb() {\r\n\r\n // id_menu_news = 'News'\r\n\r\n $listTitle = $this->view->translate('Figure');\r\n\r\n\r\n\r\n if ($this->_hasParam('id')) {\r\n\r\n // Param\r\n\r\n $id = $this->_getParam('id');\r\n\r\n\r\n\r\n // Model\r\n\r\n $db = new Model_DbTable_Figure;\r\n\r\n\r\n\r\n // Data\r\n\r\n $figure = $db->findWithDescription($id, $this->_languageId);\r\n\r\n $title = $figure['name'];\r\n }\r\n\r\n $texthomelink = $this->view->translate('id_menu_home');\r\n\r\n $links = null;\r\n\r\n switch ($this->_request->getActionName()) {\r\n\r\n case 'detail':\r\n\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $listTitle => $this->view->baseUrl('figure'),\r\n $title => '',\r\n );\r\n\r\n $this->view->pageTitle = $title;\r\n\r\n break;\r\n\r\n case 'index':\r\n\r\n default:\r\n\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $listTitle => '',\r\n );\r\n\r\n $this->view->pageTitle = $listTitle;\r\n }\r\n\r\n Zend_Registry::set('breadcrumb', $links);\r\n }",
"public function setUriPage()\n {\n $route = $this->route;\n $controller = $this->controller;\n\n switch ($controller) {\n case 'Frontend':\n // Read the first parameter \n $this->uriPage = $route[0]; \n break;\n\n case 'Backend':\n // Read the second parameter => /admin/[parameter]\n $this->uriPage = $route[1];\n break;\n \n default:\n $this->loadController('error500');\n break;\n }\n }",
"protected function breadcrumbForIndex()\n {\n $breadcrumbTree = new ullAdminBreadcrumbTree;\n $this->setVar('breadcrumb_tree', $breadcrumbTree, true);\n }",
"protected function breadcrumbForIndex() \n {\n $breadcrumbTree = new ullCmsBreadcrumbTree();\n $this->setVar('breadcrumb_tree', $breadcrumbTree, true);\n }",
"public function init() {\n parent::init();\n $this->_breadcrumbs->append(array('Contact', array('action' => 'index', 'controller' => 'contact')));\n\n // Pass variables to view\n $baseUrl = $this->view->baseUrl();\n $this->view->headLink()->appendStylesheet(\"{$baseUrl}/stylesheets/cms_layout.css\", 'screen');\n $this->view->title = 'Contact DG Environment';\n $this->view->showLeftNavigation = true;\n }",
"protected function _generateBreadcrumb()\r\n {\r\n // id_menu_news = 'News'\r\n $listTitle = $this->view->translate('id_menu_partner');\r\n\r\n if($this->_hasParam('id'))\r\n { \r\n $id = $this->_getParam('id'); \r\n $partnerDb = new Model_DbTable_Partner; \r\n $partner = $partnerDb->getAllWithDescById($id, $this->_languageId);\r\n// echo \"<pre>\";\r\n// print_r($partner);\r\n $detailTitle = $partner['name'];\r\n }\r\n $texthomelink = $this->view->translate('id_menu_home');\r\n $links = null;\r\n switch ($this->_request->getActionName())\r\n {\r\n case 'detail':\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $listTitle => $this->view->baseUrl('partner'),\r\n $detailTitle => '',\r\n );\r\n $this->view->pageTitle = $detailTitle;\r\n break;\r\n case 'index':\r\n default:\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $listTitle => '',\r\n );\r\n $this->view->pageTitle = $listTitle;\r\n }\r\n Zend_Registry::set('breadcrumb', $links); \r\n }",
"public function initBreadcrumbs()\n {\n }",
"public function breadcrumbsAction()\n\t{\n\t\t$container = new Zend_Navigation(array(\n\t\t\tarray(\n\t\t\t\t'label' => 'Index',\n\t\t\t\t'controller' => 'helpers',\n\t\t\t\t'id' => 'index'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'Helpers',\n\t\t\t\t'controller' => 'helpers',\n\t\t\t\t'id' => 'helpers',\n\t\t\t\t'pages' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => 'Breadcrumbs',\n\t\t\t\t\t\t'controller' => 'helpers',\n\t\t\t\t\t\t'action' => 'breadcrumbs',\n\t\t\t\t\t\t'id' => 'breadcrumbs'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t));\n\t\t$breadcrumbs = Invenzzia_View_HelperBroker::getInstance()->breadcrumbs;\n\t\t$breadcrumbs->setContainer($container);\n\t\t$breadcrumbs->setSeparator(' / ');\n\t}",
"protected function breadcrumbForIndex() \n {\n $breadcrumbTree = new ullTimeBreadcrumbTree();\n $this->setVar('breadcrumb_tree', $breadcrumbTree, true);\n }",
"public function setBreadcrumbs()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\tif ($menu = $app->getMenu()->getActive()) {\n\t\t\t$pathway \t= $app->getPathWay();\n\t\t\t$menu\t \t= $menu->query;\n\t\t\n\t\t\tif (!KInflector::isPlural($this->getName()) && $menu['view'] != 'forum') \n\t\t\t\t$pathway->addItem($this->getDocumentSubtitle(), $this->createRoute());\n\t\t}\n\t}",
"protected function _prepareLayout()\n {\n if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) {\n $breadcrumbs->addCrumb('home', array(\n 'label' => $this->__('Home'), \n 'title' => $this->__('Go to Home Page'), \n 'link' => Mage::getBaseUrl())\n );\n $breadcrumbs->addCrumb('manufacturer_name', array(\n 'label' => 'Brands', \n 'title' => 'Brands')\n );\n }\n parent::_prepareLayout();\n }",
"function _setBreadcrumbs() {\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$pageCrumbs = array(\n\t\t\tarray(\n\t\t\t\tRequest::url(null, 'user'),\n\t\t\t\t'navigation.user'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\tRequest::url(null, 'manager'),\n\t\t\t\t'user.role.manager'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\tRequest::url(null, 'manager', 'plugins'),\n\t\t\t\t'manager.plugins'\n\t\t\t)\n\t\t);\n\t\t$templateMgr->assign('pageHierarchy', $pageCrumbs);\n\t}",
"protected function breadcrumbForIndex() \n {\n $breadcrumbTree = new ullVentoryBreadcrumbTree();\n $this->setVar('breadcrumb_tree', $breadcrumbTree, true);\n }",
"protected function _generateBreadcrumb()\r\n {\r\n $links = null;\r\n $texthomelink = $this->view->translate('id_menu_home');\r\n // id_title_overseas = 'Overseas Representatives'\r\n $title = $this->view->translate('id_title_overseas');\r\n $links = array(\r\n $texthomelink => $this->view->baseUrl('/'),\r\n $title => '',\r\n );\r\n $this->view->pageTitle = $title;\r\n\r\n Zend_Registry::set('breadcrumb', $links);\r\n }",
"protected function _setBreadcrumbsMainPage()\n {\n $basePage = $this->_treeStructure->getId('index');\n $list = [\n 'id' => 'index',\n 'name' => $basePage->getAttribute('name'),\n 'path' => '/',\n ];\n $this->breadcrumbs[] = $list;\n }",
"public function setBreadcrumbs()\n\t{\n\t\t$pathway\t= JFactory::getApplication()->getPathWay();\n\t\t\n\t\t//Checks the view properties first, in case they're already set\n\t\tif(!isset($this->topic))\n\t\t{\n\t\t\t$this->topic = $this->getModel()\n\t\t\t\t\t\t\t\t->getItem();\n\t\t}\n\t\tif(!isset($this->forum))\n\t\t{\n\t\t\t$this->forum = $this->getService('com://admin/ninjaboard.model.forums')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($this->topic->forum_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\t\t}\n\n if(!$this->forum->isNestable()) return;\n\n\t\tforeach($this->forum->getParents() as $parent)\n\t\t{\n\t\t\t$pathway->addItem($parent->title, $this->createRoute('view=forum&id='.$parent->id));\n\t\t}\n\t\t$pathway->addItem($this->forum->title, $this->createRoute('view=forum&id='.$this->forum->id));\n\t\t\n\t\t$pathway->addItem($this->topic->subject ? $this->topic->subject : JText::_('COM_NINJABOARD_NEW_TOPIC'), $this->createRoute('view=topic&id='.$this->topic->id));\n\t}",
"public function initialize()\n\t{\n\t\t/**\n\t\t * In the URI this module is prefixed by '/leads'\n\t\t */\n\t\t$this->setPrefix('/leads');\n\n\t\t/**\n\t\t * Configure the instance\n\t\t */\n\t\t$this->setPaths([\n\t\t\t'module' => 'leads',\n\t\t\t'namespace' => 'App\\Modules\\Leads\\Controllers\\API\\\\',\n\t\t\t'controller' => 'index',\n\t\t\t'action' => 'index'\n\t\t]);\n\n\t\t/**\n\t\t * Default route: 'leads-root'\n\t\t */\n\t\t$this->addGet('', [])\n\t\t\t->setName('leads-root');\n\n\t\t/**\n\t\t * Controller route: 'leads-controller'\n\t\t */\n\t\t$this->addGet('/:controller', ['controller' => 1])\n\t\t\t->setName('leads-controller');\n\n\t\t/**\n\t\t * Action route: 'leads-action'\n\t\t */\n\t\t$this->addGet('/:controller/:action/:params', [\n\t\t\t\t'controller' => 1,\n\t\t\t\t'action' => 2,\n\t\t\t\t'params' => 3\n\t\t\t])\n\t\t\t->setName('leads-action');\n\n\t\t/**\n\t\t * Add all App\\Modules\\Leads specific routes here\n\t\t */\n\t}",
"protected function get_backend_view_uri() {\n\t\treturn self::BACKEND_VIEW_URI;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders a Form as table. | public function asTable() {
$str = $this->openTag();
$str .= "<table>";
foreach($this->components as $component) {
if(!$component instanceof HiddenInput) {
$str .= "<tr>";
$str .= "<td>";
if ($component instanceof BaseElement) {
$str .= $component->getLabelAsHtml();
}
$str .= "</td>";
$str .= "<td>";
$str .= $component;
$str .= "</td>";
$str .= "</tr>";
} else {
$str .= $component;
}
}
$str .= "</table>";
$str .= "</form>";
return $str;
} | [
"function renderAsTable(){\n\t\t$out='<table>';\n\t\tforeach ($this->fields as $name=>$item){\n\t\t\tif ($item['type']=='submit') continue;\n\t\t\t$out.='<tr><th>'.(isset($item['label_full'])?$item['label_full']:$item['label']).'</th><td>'.(isset($item['values'][$item['value']])?$item['values'][$item['value']]:$item['value']).'</td></tr>';\n\t\t}\n\t\treturn $out.='</table>';\n\t}",
"protected function renderTable()\n {\n $headers = [];\n $fields = [];\n $hidden = [];\n\n /* @var Field $field */\n foreach ($this->buildNestedForm()->fields() as $field) {\n if (is_a($field, Hidden::class)) {\n $hidden[] = $field->render();\n } else {\n /* Hide label and set field width 100% */\n $field->setLabelClass(['hidden']);\n $field->width(12, 0);\n $fields[] = $field->render();\n $headers[] = $field->label();\n }\n }\n\n /* Build row elements */\n $template = array_reduce($fields, function ($all, $field) {\n $all .= \"<td>{$field}</td>\";\n\n return $all;\n }, '');\n\n /* Build cell with hidden elements */\n $template .= '<td class=\"hidden\">'.implode('', $hidden).'</td>';\n\n // specify a view to render.\n $this->view = $this->view ?: $this->views[$this->viewMode];\n\n $this->addVariables([\n 'headers' => $headers,\n 'forms' => $this->buildRelatedForms(),\n 'template' => $template,\n 'relationName' => $this->relationName,\n 'options' => $this->options,\n 'count' => count($this->value()),\n 'columnClass' => $this->columnClass,\n 'parentKey' => $this->getNestedFormDefaultKeyName(),\n ]);\n\n return parent::render();\n }",
"function asTable($form);",
"function as_table()\n\t{\n\t\treturn $this->_html_output(\n\t\t\t'<tr><th>%(label)s</th><td>%(errors)s%(field)s%(help_text)s</td></tr>',\n\t\t\t'<tr><td colspan=\"2\">%s</td></tr>',\n\t\t\t'</td></tr>',\n\t\t\t'<br />%s',\n\t\t\tFalse\n\t\t);\n\t}",
"function createFormTable() {\n SMW::getBlock('helpers/forms/form-table');\n }",
"function delibera_form_table($rows) {\n\t$content = '<table class=\"form-table\">';\n\tforeach ($rows as $row) {\n\t\t$content .= '<tr '.(array_key_exists('row-id', $row) ? 'id=\"'.$row['row-id'].'\"' : '' ).' '.(array_key_exists('row-style', $row) ? 'style=\"'.$row['row-style'].'\"' : '' ).' '.(array_key_exists('row-class', $row) ? 'class=\"'.$row['row-class'].'\"' : '' ).' ><th valign=\"top\" scrope=\"row\">';\n\n\t\tif (isset($row['id']) && $row['id'] != '') {\n\t\t\t$content .= '<label for=\"'.$row['id'].'\">'.$row['label'].'</label>';\n\t\t} else {\n\t\t\t$content .= $row['label'];\n\t\t}\n\n\t\tif (isset($row['desc']) && $row['desc'] != '') {\n\t\t\t$content .= '<br/><small>'.$row['desc'].'</small>';\n\t\t}\n\n\t\t$content .= '</th><td valign=\"top\">';\n\t\t$content .= $row['content'];\n\t\t$content .= '</td></tr>';\n\t}\n\t$content .= '</table>';\n\treturn $content;\n}",
"function form_table($rows) {\n\t\t\t$content = '<table class=\"form-table\">';\n\t\t\tforeach ($rows as $row) {\n\t\t\t\t$content .= '<tr><th valign=\"top\" scrope=\"row\">';\n\t\t\t\tif (isset($row['id']) && $row['id'] != '')\n\t\t\t\t\t$content .= '<label for=\"'.$row['id'].'\">'.$row['label'].':</label>';\n\t\t\t\telse\n\t\t\t\t\t$content .= $row['label'];\n\t\t\t\tif (isset($row['desc']) && $row['desc'] != '')\n\t\t\t\t\t$content .= '<br/><small>'.$row['desc'].'</small>';\n\t\t\t\t$content .= '</th><td valign=\"top\">';\n\t\t\t\t$content .= $row['content'];\n\t\t\t\t$content .= '</td></tr>'; \n\t\t\t}\n\t\t\t$content .= '</table>';\n\t\t\treturn $content;\n\t\t}",
"function form_table($rows) {\r\n\t\t\t$content = '<table class=\"form-table\">';\r\n\t\t\tforeach ($rows as $row) {\r\n\t\t\t\t$content .= '<tr><th valign=\"top\" scrope=\"row\">';\r\n\t\t\t\tif (isset($row['id']) && $row['id'] != '')\r\n\t\t\t\t\t$content .= '<label for=\"'.$row['id'].'\">'.$row['label'].':</label>';\r\n\t\t\t\telse\r\n\t\t\t\t\t$content .= $row['label'];\r\n\t\t\t\tif (isset($row['desc']) && $row['desc'] != '')\r\n\t\t\t\t\t$content .= '<br/><small>'.$row['desc'].'</small>';\r\n\t\t\t\t$content .= '</th><td valign=\"top\">';\r\n\t\t\t\t$content .= $row['content'];\r\n\t\t\t\t$content .= '</td></tr>'; \r\n\t\t\t}\r\n\t\t\t$content .= '</table>';\r\n\t\t\treturn $content;\r\n\t\t}",
"public function renderTable();",
"function form() \n {\n \t //El formateo va a ser realizado sobre una tabla en la que cada fila es un campo del formulario\n $table = &html_table($this->_width,0,2,2);\n $table->set_class('ptabla02');\n $table->add_row($this->_showElement('Nombre', '8', 'nombre', 'nombre', 'Nombre', 'left' )); \n $table->add_row($this->_showElement('Descripción', '9', 'descripcion', 'descripcion', 'Descripción', 'left' )); \n// $table->add_row($this->_showElement('Título', '10', 'ptabla01', 'ptabla01', 'Título', 'left' )); \n \n $this->set_form_tabindex('Aceptar', '14'); \n $label = html_label( 'submit' );\n $label->add($this->element_form('Aceptar'));\n $table->add_row(html_td('', 'left', $label));\n \n return $table; \n }",
"public function renderTable() {\n\n $values = $this->input_values;\n\n if (!isset($values)) {\n return '';\n }\n\n $html = \"\";\n $html .= \"<table id='page-metatable' align='center'>\";\n $html .= \"<tr>\";\n\n $a = 0;\n foreach ($values as $index => $value) {\n\n if ($a % 2 === 0) {\n $html .= \"</tr>\";\n $html .= \"<tr>\";\n }\n\n $html .= \"<th>\" . htmlspecialchars($index) . \"</th>\";\n $html .= \"<td>\" . htmlspecialchars($value) . \"</td>\";\n $a+=1;\n }\n\n $html .= \"</tr>\";\n $html .= \"</table>\";\n\n return $html;\n }",
"function form_table($rows) {\n $content = '<table class=\"form-table\">';\n $i = 1;\n foreach ($rows as $row) {\n $class = '';\n if ($i > 1) {\n $class .= 'yst_row';\n }\n if ($i % 2 == 0) {\n $class .= ' even';\n }\n $content .= '<tr id=\"'.$row['id'].'_row\" class=\"'.$class.'\"><th valign=\"top\" scrope=\"row\">';\n if (isset($row['id']) && $row['id'] != '')\n $content .= '<label for=\"'.$row['id'].'\">'.$row['label'].':</label>';\n else\n $content .= $row['label'];\n $content .= '</th><td valign=\"top\">';\n $content .= $row['content'];\n $content .= '</td></tr>';\n if ( isset($row['desc']) && !empty($row['desc']) ) {\n $content .= '<tr class=\"'.$class.'\"><td colspan=\"2\" class=\"yst_desc\"><small>'.$row['desc'].'</small></td></tr>';\n }\n\n $i++;\n }\n $content .= '</table>';\n return $content;\n }",
"function theme_form_table ($field) {\n // First create a table structure, and then theme it\n $table = array(\n 'id' => ''\n , 'class' => ''\n , 'rows' => array()\n );\n $table['columns'] = $field['columns'];\n \n foreach ($field['rows'] as $formRow) {\n $row = array();\n foreach ($formRow as $formCell) {\n $row[] = theme('form', $formCell);\n }\n $table['rows'][] = $row;\n }\n \n return theme('table', $table);\n}",
"function theme_fourD_analysis_goal_analysis_inline_form_table(&$form){\n // fourD_analysis_debug('theme_fourD_analysis_goal_analysis_inline_form_table');\n\n $header = array(\n array('data' => 'Weight'),\n array('data' => '')\n );\n \n $rows = array(array());\n $submit = '';\n $other = '';\n $parts = _fourD_analysis_goal_form_parts();\n foreach($form as $key => $value) {\n if( is_array($value) ){\n\n if( isset($parts['analysis'][$key]) || $key == 'submit'){\n //fourD_analysis_debug('theme_fourD_analysis_goal_analysis_inline_form_table; $key: '.$key.'; $value: '.print_r($value, true) );\n $tmp = drupal_render($form[$key]);\n $tmp = preg_replace('/^.+<input([^>]+)>.+$/is', '<input$1>', $tmp);\n if( $key == 'submit'){\n $submit = $tmp;\n }\n else{\n $rows[0][] = array('data' => $tmp. ' [0-1]' );\n }\n }\n else{\n $other .= drupal_render($form[$key]) . \"\\n\";\n }\n }\n }\n $rows[0][] = array('data' => $submit );\n\n// return theme_table($header, $rows) . $other;\n return theme('table', $header, $rows) . $other;\n}",
"public function testRenderTableForCrudWithinForm()\n {\n $settings = array(\n 'crud' => 'foo'\n );\n\n $variables = array(\n 'within_form' => true\n );\n\n $table = $this->getMockTableBuilder(array('setType', 'renderLayout'));\n\n $table->expects($this->once())\n ->method('setType')\n ->with(TableBuilder::TYPE_FORM_TABLE);\n\n $table->expects($this->once())\n ->method('renderLayout')\n ->with('default');\n\n $table->setSettings($settings);\n\n $table->setVariables($variables);\n\n $table->renderTable();\n }",
"protected function RenderFormattedTable()\n {\n if ($this->m_QueryONRender)\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n\n $dispmode = $this->GetDisplayMode();\n $hasSub = $this->m_SubForms ? 0 : 1;\n //$this->SetDisplayMode($dispmode->GetMode());\n $cls_tbl = strlen($dispmode->m_FormatStyle[0])>0 ? \"class='\".$dispmode->m_FormatStyle[0].\"'\" : \"\";\n $sHTML_tbl = \"<table width=100% border=0 cellspacing=0 cellpadding=3 $cls_tbl>\\n\";\n //$sHTML_tby = \"<tbody id='\".$this->m_Name.\"_tbody' Highlighted='\".$this->m_Name.\"_data_\".($this->m_CursorIndex+1).\"' SelectedRow='\".($this->m_CursorIndex+1).\"'>\\n\";\n\n // print column header\n $columns = $this->m_RecordRow->RenderColumn();\n $sHTML = \"\";\n foreach($columns as $colname)\n $sHTML .= \"<th class=head>$colname</th>\\n\";\n\n // print column data table\n $name = $this->m_Name;\n $counter = 0;\n $this->m_CursorIDMap = array();\n while ($counter < $this->m_Range) {\n if ($this->CanShowData())\n $arr = $resultRecords[$counter];\n else\n $arr = null;\n if (!$arr && $this->m_FullPage == \"N\")\n break;\n if (!$arr)\n $sHTML .= \"<tr><td colspan=99> </td></tr>\\n\";\n else {\n $this->m_CursorIDMap[$counter] = $arr[\"Id\"];\n\n $this->m_RecordRow->SetRecordArr($arr);\n $tblRow = $this->m_RecordRow->Render();\n $rowHTML = \"\";\n foreach($tblRow as $cell)\n $rowHTML .= \"<td valign=top class=cell>$cell</td>\\n\";\n $rownum = $counter+1;\n $rowid = $name.\"_data_\".$rownum;\n $attr = $rownum % 2 == 0 ? \"normal=roweven select=rowsel\" : \"normal=rowodd select=rowsel\";\n\n if ($this->m_HistRecordId != null && $this->m_HistRecordId == $arr[\"Id\"]) {\n $this->m_CursorIndex = $counter;\n $style_class = \"class=rowsel\";\n }\n else if ($counter == $this->m_CursorIndex)\n $style_class = \"class=rowsel\";\n else if ($rownum % 2 == 0)\n $style_class = \"class=roweven\";\n else\n $style_class = \"class=rowodd\";\n\n //$onclick = \"onclick=\\\"CallFunction('$name.SelectRecord($rownum,$hasSub)');\\\"\";\n $onclick = \"ondblclick=\\\"CallFunction('$name.EditRecord()');\\\" onclick=\\\"CallFunction('$name.SelectRecord($rownum,$hasSub)');\\\"\";\n\n $sHTML .= \"<tr id='$rowid' $style_class $attr $onclick>\\n$rowHTML</tr>\\n\";\n }\n $counter++;\n } // while\n // move daraobj's cursor to the UI current record\n $this->SetCursorIndex($this->m_CursorIndex);\n\n $sHTML_tby = \"<tbody id='\".$this->m_Name.\"_tbody' Highlighted='\".$this->m_Name.\"_data_\".($this->m_CursorIndex+1).\"' SelectedRow='\".($this->m_CursorIndex+1).\"'>\\n\";\n\n $sHTML = $sHTML_tbl . $sHTML_tby . $sHTML . \"</tbody></table>\";\n\n // restore the RecordRow data because it gets changed during record navigation\n ///$this->m_RecordRow->SetRecordArr($this->m_ActiveRecord);\n\n return $sHTML;\n }",
"public function form_table( $items, $table = true ) {\n\t\tif ( $table ) {\n\t\t\techo '<table class=\"form-table\"><tbody>';\n\t\t}\n\n\t\tforeach ( $items as $item ) {\n\t\t\t$item = wp_parse_args( $item, array(\n\t\t\t\t'name' => '',\n\t\t\t\t'label' => '',\n\t\t\t\t'ui' => '',\n\t\t\t\t'param' => array(),\n\t\t\t\t'help' => '',\n\t\t\t) );\n\t\t\techo '<tr>';\n\n\t\t\t$item_colspan = 1;\n\t\t\tif ( '' == $item['label'] ) {\n\t\t\t\t$item_colspan++;\n\t\t\t}\n\t\t\tif ( '' == $item['help'] ) {\n\t\t\t\t$item_colspan++;\n\t\t\t}\n\n\t\t\tif ( '' != $item['label'] ) {\n\t\t\t\techo '<th>';\n\t\t\t\t$this->generate_label( $item['name'], $item['label'] );\n\t\t\t\techo '</th>';\n\t\t\t}\n\n\t\t\techo '<td colspan=\"' . $item_colspan . '\">';\n\t\t\tif ( $this->check_callback( array( array( $this, $item['ui'] ), $item['param'] ) ) ) {\n\t\t\t\tcall_user_func_array( array( $this, $item['ui'] ), $item['param'] );\n\t\t\t} else {\n\t\t\t\t$this->msg_error( __( 'Invalid Callback', 'wp-cpl' ) );\n\t\t\t}\n\t\t\techo '</td>';\n\n\t\t\tif ( '' != $item['help'] ) {\n\t\t\t\techo '<td>';\n\t\t\t\t$this->help( $item['help'] );\n\t\t\t\techo '</td>';\n\t\t\t}\n\n\t\t\techo '</tr>';\n\t\t}\n\n\t\tif ( $table ) {\n\t\t\techo '</tbody></table>';\n\t\t}\n\t}",
"protected function RenderFormattedTable()\n {\n if ($this->m_QueryONRender)\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n\n $dispmode = $this->GetDisplayMode();\n $hasSub = $this->m_SubForms ? 1 : 0;\n //$this->SetDisplayMode($dispmode->GetMode());\n $cls_tbl = strlen($dispmode->m_FormatStyle[0])>0 ? \"class='\".$dispmode->m_FormatStyle[0].\"'\" : \"\";\n $sHTML_tbl = \"<table width=100% border=0 cellspacing=0 cellpadding=3 $cls_tbl>\\n\";\n //$sHTML_tby = \"<tbody id='\".$this->m_Name.\"_tbody' Highlighted='\".$this->m_Name.\"_data_\".($this->m_CursorIndex+1).\"' SelectedRow='\".($this->m_CursorIndex+1).\"'>\\n\";\n\n // print column header\n $columns = $this->m_RecordRow->RenderColumn();\n $sHTML = \"\";\n foreach($columns as $colname)\n $sHTML .= \"<th class=head>$colname</th>\\n\";\n\n // print column data table\n $name = $this->m_Name;\n $counter = 0;\n $sHTML_rows = \"\";\n $selectedRecId = null;\n $selectedIndex = 0;\n while (true) {\n if ($this->m_Range != null && $this->m_Range > 0 && $counter >= $this->m_Range)\n break;\n if ($this->CanShowData())\n $arr = $resultRecords[$counter];\n else\n $arr = null;\n if (!$arr && $this->m_FullPage == \"N\")\n break;\n if (!$arr)\n $sHTML_rows .= \"<tr><td colspan=99> </td></tr>\\n\";\n else {\n $recId = $arr[\"Id\"];\n\n $this->m_RecordRow->SetRecordArr($arr);\n $tblRow = $this->m_RecordRow->Render();\n $rowHTML = \"\";\n foreach($tblRow as $cell) {\n $cell_html = $cell==\"\" ? \" \" : $cell;\n $rowHTML .= \"<td valign=top class=cell>$cell_html</td>\\n\";\n }\n $rownum = $counter+1;\n $rowid = $name.\"_data_\".$rownum;\n $attr = $rownum % 2 == 0 ? \"normal=roweven select=rowsel\" : \"normal=rowodd select=rowsel\";\n\n if ($this->m_HistRecordId != null)\n $this->m_RecordId = $this->m_HistRecordId;\n if ($this->m_RecordId == null)\n $this->m_RecordId = $recId;\n \n if ($this->m_RecordId == $recId) {\n $style_class = \"class=rowsel\";\n $selectedRecId = $recId;\n $selectedIndex = $counter;\n }\n else if ($rownum % 2 == 0)\n $style_class = \"class=roweven\";\n else\n $style_class = \"class=rowodd\";\n\n $onclick = \"ondblclick=\\\"CallFunction('$name.EditRecord($recId)');\\\"\" . \n \" onclick=\\\"CallFunction('$name.SelectRecord($recId,$hasSub)');\\\"\";\n if ($rownum == 1) {\n $sHTML_row1 = \"<tr id='$recId' $style_class $attr $onclick>\\n$rowHTML</tr>\\n\";\n $row1_id = $recId;\n }\n else\n $sHTML_rows .= \"<tr id='$recId' $style_class $attr $onclick>\\n$rowHTML</tr>\\n\";\n }\n $counter++;\n } // while\n if ($selectedRecId == null) {\n $selectedRecId = $row1_id;\n $this->m_RecordId = $selectedRecId;\n $sHTML_row1 = str_replace(\"class=rowodd\", \"class=rowsel\", $sHTML_row1);\n }\n $sHTML .= $sHTML_row1 . $sHTML_rows;\n $this->GetDataObj()->SetActiveRecord($resultRecords[$selectedIndex]);\n\n $sHTML_pre = \"\\n<input type='hidden' id='\".$this->m_Name.\"_selectedId' name='_selectedId' value='$selectedRecId'/>\\n\";\n $sHTML_tby = \"<tbody id='\".$this->m_Name.\"_tbody'>\\n\";\n $sHTML = $sHTML_pre . $sHTML_tbl . $sHTML_tby . $sHTML . \"</tbody></table>\";\n\n return $sHTML;\n }",
"public function renderForm()\n\t{\n\n\t\treturn parent::renderForm();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run test for applySelectionOnTargetProvider method | public function testApplySelectionOnTargetProvider($selectedIds, $excludedIds, $filterExpected, $conditionExpected)
{
$this->setUpApplySelection($selectedIds, $excludedIds, $filterExpected, $conditionExpected);
$this->filter->applySelectionOnTargetProvider();
} | [
"public function applySelectionOnTargetProvider()\n {\n $selected = $this->request->getParam(static::SELECTED_PARAM);\n $excluded = $this->request->getParam(static::EXCLUDED_PARAM);\n if ('false' === $excluded) {\n return;\n }\n $dataProvider = $this->getDataProvider();\n try {\n if (is_array($excluded) && !empty($excluded)) {\n $this->filterBuilder->setConditionType('nin')\n ->setField($dataProvider->getPrimaryFieldName())\n ->setValue($excluded);\n $dataProvider->addFilter($this->filterBuilder->create());\n } elseif (is_array($selected) && !empty($selected)) {\n $this->filterBuilder->setConditionType('in')\n ->setField($dataProvider->getPrimaryFieldName())\n ->setValue($selected);\n $dataProvider->addFilter($this->filterBuilder->create());\n }\n } catch (\\Exception $e) {\n throw new LocalizedException(__($e->getMessage()));\n }\n }",
"public function testGetSelected()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}",
"public function testGetSelectedMultiple()\n {\n }",
"public function testSetSelected()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}",
"function IsSelection(){}",
"public function beforeSelect() {\r\n \r\n }",
"function IsUsingPrimarySelection(){}",
"abstract protected function process_selection($data);",
"public function testNewSelect()\n {\n $this->todo('stub');\n }",
"public function testTargetGroupGetTargets()\n {\n }",
"protected function onSelected(){}",
"public function testTargetGroupUpdateTargets()\n {\n }",
"public function testSetSelectionClient() {\n\n $obj = new Collaborateurs();\n\n $obj->setSelectionClient(\"selectionClient\");\n $this->assertEquals(\"selectionClient\", $obj->getSelectionClient());\n }",
"public function setTarget($target);",
"protected function isTargetCorrect() {}",
"public function testPickTargetDefault()\n\t{\n\t\t$data = new Blackbox_Data();\n\t\t$state_data = new OLPBlackbox_StateData();\n\n\t\t$priority_picker = new OLPBlackbox_PriorityPicker();\n\t\t$winner = $priority_picker->pickTarget($data, $state_data, array());\n\n\t\t$this->assertFalse($winner);\n\t}",
"public function testTaskWorkGetDefaultSelect()\n {\n }",
"public function correctSelectedText()\n {\n $contentHelper = $this->module->contentHelper;\n $this->text = $contentHelper::afterSelectBody($this->text);\n }",
"private function updateSelection()\n {\n Profiler::start();\n\n $menuItems = $this->structure->getData($this->getMenuPath(true));\n $container = $menuItems->getContainer();\n if ($container->getUUID() != $this->lastContainer->getUUID()) {\n $this->lastContainer->setActive(false);\n $container->setActive(true);\n $container->getParent()->setValid(false);\n $this->lastContainer = $container;\n }\n\n //deselect last selected component\n $this->deselect($this->lastSelected);\n //update selected element\n /** @var Component $selected */\n $selected = $this->structure->getData($this->getMenuPath())->getContent();\n //select current component\n $this->select($selected);\n $this->lastSelected = $selected;\n $this->hideMenuItems();\n Profiler::end();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the taux journalier. | public function setTauxJournalier(?float $tauxJournalier): Bulletins {
$this->tauxJournalier = $tauxJournalier;
return $this;
} | [
"public function setTauxJournalier($tauxJournalier) {\n $this->tauxJournalier = $tauxJournalier;\n return $this;\n }",
"function setJournal($journal) {\n\t\t$this->journal = $journal;\n\t}",
"public function testSetTpPasJournalTemps() {\n\n $obj = new Collaborateurs();\n\n $obj->setTpPasJournalTemps(true);\n $this->assertEquals(true, $obj->getTpPasJournalTemps());\n }",
"public function testSetEditionTauxSal() {\n\n $obj = new LignesBulletin();\n\n $obj->setEditionTauxSal(true);\n $this->assertEquals(true, $obj->getEditionTauxSal());\n }",
"public function testSetTauxSal() {\n\n $obj = new TmpTable0();\n\n $obj->setTauxSal(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxSal());\n }",
"public function set_utente(DUtente $_utente){\n $this->utente=$_utente;\n }",
"public function testSetMensuelJournalier() {\n\n $obj = new Bulletins();\n\n $obj->setMensuelJournalier(true);\n $this->assertEquals(true, $obj->getMensuelJournalier());\n }",
"public function testSetEntrepriseTravailTemp() {\n\n $obj = new EntreeSortieEmp();\n\n $obj->setEntrepriseTravailTemp(\"entrepriseTravailTemp\");\n $this->assertEquals(\"entrepriseTravailTemp\", $obj->getEntrepriseTravailTemp());\n }",
"public function setTea()\r\n {\r\n $this->proxy->setTea();\r\n }",
"public function testSetTauxMajoration() {\n\n $obj = new HistoPaieType2();\n\n $obj->setTauxMajoration(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxMajoration());\n }",
"public function testSetTvaCodeJournalOd() {\n\n $obj = new Dossier4();\n\n $obj->setTvaCodeJournalOd(\"tvaCodeJournalOd\");\n $this->assertEquals(\"tvaCodeJournalOd\", $obj->getTvaCodeJournalOd());\n }",
"public function testSetTauxSalTrA() {\n\n $obj = new TauxRetraite();\n\n $obj->setTauxSalTrA(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxSalTrA());\n }",
"public function testSetMontantTenuDebit() {\n\n $obj = new ReglementsAux();\n\n $obj->setMontantTenuDebit(10.092018);\n $this->assertEquals(10.092018, $obj->getMontantTenuDebit());\n }",
"public function testSetTauxDedSup() {\n\n $obj = new LignesAta();\n\n $obj->setTauxDedSup(10.092018);\n $this->assertEquals(10.092018, $obj->getTauxDedSup());\n }",
"public function testSetCodeJournal() {\n\n $obj = new SuiviCompteParticulier();\n\n $obj->setCodeJournal(\"codeJournal\");\n $this->assertEquals(\"codeJournal\", $obj->getCodeJournal());\n }",
"public function setTalla($talla)\r\n\t{\r\n\t\t$this->talla = $talla;\r\n\t}",
"public function setSlutdatum($arg) {\n $this->slutdatum = $arg;\n }",
"public function setNit($nit){\n $this->nit = $nit;\n }",
"public function setSujet($Sujet) {$this->Sujet = $Sujet;}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
OneToMany (owning side) Get fkFolhapagamentoTcmbaPlanoSaudes | public function getFkFolhapagamentoTcmbaPlanoSaudes()
{
return $this->fkFolhapagamentoTcmbaPlanoSaudes;
} | [
"public function getFkComprasMapa()\n {\n return $this->fkComprasMapa;\n }",
"public function getFkTcmgoOrgaoPlanoBancos()\n {\n return $this->fkTcmgoOrgaoPlanoBancos;\n }",
"public function getFkAluno()\n {\n return $this->fk_aluno;\n }",
"public function getFkTesourariaBoletim()\n {\n return $this->fkTesourariaBoletim;\n }",
"public function getFkPessoalContrato()\n {\n return $this->fkPessoalContrato;\n }",
"public function getFkPatrimonioBens()\n {\n return $this->fkPatrimonioBens;\n }",
"public function getFkTcernObraAcompanhamentos()\n {\n return $this->fkTcernObraAcompanhamentos;\n }",
"public function getFkImaConfiguracaoBanparas()\n {\n return $this->fkImaConfiguracaoBanparas;\n }",
"public function getFkComprasObjeto()\n {\n return $this->fkComprasObjeto;\n }",
"public function getFkTcepbEmpenhoObras()\n {\n return $this->fkTcepbEmpenhoObras;\n }",
"public function getFkPessoalDependente()\n {\n return $this->fkPessoalDependente;\n }",
"public function getFkPessoalOcorrencia()\n {\n return $this->fkPessoalOcorrencia;\n }",
"public function getFkTesourariaFechamentos()\n {\n return $this->fkTesourariaFechamentos;\n }",
"public function getFkPessoalLancamentoFerias()\n {\n return $this->fkPessoalLancamentoFerias;\n }",
"public function getFkFolhapagamentoComplementar()\n {\n return $this->fkFolhapagamentoComplementar;\n }",
"public function getFkImaConsignacaoBanrisulLiquido()\n {\n return $this->fkImaConsignacaoBanrisulLiquido;\n }",
"public function getFkPatrimonioBemComprado()\n {\n return $this->fkPatrimonioBemComprado;\n }",
"public function getFkPessoalPensaoBancos()\n {\n return $this->fkPessoalPensaoBancos;\n }",
"public function getFkTcmbaObraAndamentos()\n {\n return $this->fkTcmbaObraAndamentos;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns URL to payment form By accessing the URL user can finish his payment. | public function url()
{
if(!$this->exists()) {
return "";
} else {
return wpjb_api_url("payment/pay", array("payment_hash"=>$this->hash()));
}
} | [
"public function getPaymentFormUrl()\n {\n /** iframe url for credit and debit card*/\n $expectedUrl = 'http://dev.heidelpay.com';\n $this->responseObject->getFrontend()->set('payment_frame_url', $expectedUrl);\n $this->assertEquals($expectedUrl, $this->responseObject->getPaymentFormUrl());\n\n $expectedUrl = 'http://www.heidelpay.com';\n $this->responseObject->getFrontend()->setRedirectUrl($expectedUrl);\n\n /** url in case of credit and debit card reference Transaction */\n $this->responseObject->getIdentification()->set('referenceid', '31HA07BC8108A9126F199F2784552637');\n $this->assertEquals($expectedUrl, $this->responseObject->getPaymentFormUrl());\n\n /** unset reference id */\n $this->responseObject->getIdentification()->set('referenceid', null);\n\n /** url for non credit or debit card transactions */\n $this->responseObject->getPayment()->setCode('OT.PA');\n $this->responseObject->getFrontend()->setRedirectUrl($expectedUrl);\n $this->assertEquals($expectedUrl, $this->responseObject->getPaymentFormUrl());\n }",
"public function redirect_to_payment_form() {\n\t\t?>\n\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<title>TBC</title>\n\t\t\t\t<script type=\"text/javascript\" language=\"javascript\">\n\t\t\t\t\tfunction redirect() {\n\t\t\t\t\t\tdocument.returnform.submit();\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t</head>\n\n\t\t\t<body onLoad=\"javascript:redirect()\">\n\t\t\t\t<form name=\"returnform\" action=\"<?php echo esc_url( sprintf( 'https://%s.ufc.ge/ecomm2/ClientHandler', $_GET['merchant_host'] ) ); ?>\" method=\"POST\">\n\t\t\t\t\t<input type=\"hidden\" name=\"trans_id\" value=\"<?php echo rawurldecode( $_GET['transaction_id'] ); ?>\">\n\n\t\t\t\t\t<noscript>\n\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t<?php esc_html_e( 'Please click the submit button below.', 'tbc-gateway-free' ); ?><br>\n\t\t\t\t\t\t\t<input type=\"submit\" name=\"submit\" value=\"Submit\">\n\t\t\t\t\t\t</center>\n\t\t\t\t\t</noscript>\n\t\t\t\t</form>\n\t\t\t</body>\n\n\t\t</html>\n\n\t\t<?php\n\t\texit();\n\t}",
"public function generatePaymentURL(): string;",
"protected function getSubmitPaymentURL()\n {\n return $this->getBaseUrl() . self::SUB_URL_CREATE_PAYMENT_SUBMIT;\n }",
"private function _redirectToHostedPaymentForm()\r\n {\r\n \t$html = '';\r\n \t$model = Mage::getModel('paymentsensegateway/direct');\r\n \t$szActionURL = \"https://secure.paguelofacil.com/LinkDeamon.cfm?\";\r\n \t$cookies = Mage::getSingleton('core/cookie')->get();\r\n \t$szServerResultURLCookieVariables;\r\n \t$szServerResultURLFormVariables = '';\r\n \t$szServerResultURLQueryStringVariables = '';\r\n \t\r\n \t// create a Magento form\r\n $form = new Varien_Data_Form();\r\n $form->setAction($szActionURL)\r\n ->setId('HostedPaymentForm')\r\n ->setName('HostedPaymentForm')\r\n ->setMethod('GET')\r\n ->setUseContainer(true);\r\n\r\n $form->addField(\"CCLW\", 'hidden', array('name'=>\"CCLW\", 'value'=>Mage::getSingleton('checkout/session')->getMerchantid()));\r\n $form->addField(\"CMTN\", 'hidden', array('name'=>\"CMTN\", 'value'=>(Mage::getSingleton('checkout/session')->getAmount()/100)));\r\n $form->addField(\"OrderID\", 'hidden', array('name'=>\"OrderID\", 'value'=>Mage::getSingleton('checkout/session')->getOrderid()));\r\n $form->addField(\"CDSC\", 'hidden', array('name'=>\"CDSC\", 'value'=>\"Compra en \".$_SERVER['HTTP_HOST'].\" ID de compra #\".Mage::getSingleton('checkout/session')->getOrderid()));\r\n $form->addField(\"HashDigest\", 'hidden', array('name'=>\"HashDigest\", 'value'=>Mage::getSingleton('checkout/session')->getHashdigest()));\r\n $form->addField(\"CurrencyCode\", 'hidden', array('name'=>\"CurrencyCode\", 'value'=>Mage::getSingleton('checkout/session')->getCurrencycode()));\r\n $form->addField(\"TransactionType\", 'hidden', array('name'=>\"TransactionType\", 'value'=>Mage::getSingleton('checkout/session')->getTransactiontype()));\r\n $form->addField(\"TransactionDateTime\", 'hidden', array('name'=>\"TransactionDateTime\", 'value'=>Mage::getSingleton('checkout/session')->getTransactiondatetime()));\r\n $form->addField(\"CallbackURL\", 'hidden', array('name'=>\"CallbackURL\", 'value'=>Mage::getSingleton('checkout/session')->getCallbackurl()));\r\n \r\n $form->addField(\"CustomerName\", 'hidden', array('name'=>\"CustomerName\", 'value'=>Mage::getSingleton('checkout/session')->getCustomername()));\r\n $form->addField(\"Address1\", 'hidden', array('name'=>\"Address1\", 'value'=>Mage::getSingleton('checkout/session')->getAddress1()));\r\n $form->addField(\"Address2\", 'hidden', array('name'=>\"Address2\", 'value'=>Mage::getSingleton('checkout/session')->getAddress2()));\r\n $form->addField(\"Address3\", 'hidden', array('name'=>\"Address3\", 'value'=>Mage::getSingleton('checkout/session')->getAddress3()));\r\n $form->addField(\"Address4\", 'hidden', array('name'=>\"Address4\", 'value'=>Mage::getSingleton('checkout/session')->getAddress4()));\r\n $form->addField(\"City\", 'hidden', array('name'=>\"City\", 'value'=>Mage::getSingleton('checkout/session')->getCity()));\r\n $form->addField(\"State\", 'hidden', array('name'=>\"State\", 'value'=>Mage::getSingleton('checkout/session')->getState()));\r\n $form->addField(\"PostCode\", 'hidden', array('name'=>\"PostCode\", 'value'=>Mage::getSingleton('checkout/session')->getPostcode()));\r\n $form->addField(\"CountryCode\", 'hidden', array('name'=>\"CountryCode\", 'value'=>Mage::getSingleton('checkout/session')->getCountrycode()));\r\n $form->addField(\"CV2Mandatory\", 'hidden', array('name'=>\"CV2Mandatory\", 'value'=>Mage::getSingleton('checkout/session')->getCv2mandatory()));\r\n $form->addField(\"Address1Mandatory\", 'hidden', array('name'=>\"Address1Mandatory\", 'value'=>Mage::getSingleton('checkout/session')->getAddress1mandatory()));\r\n $form->addField(\"CityMandatory\", 'hidden', array('name'=>\"CityMandatory\", 'value'=>Mage::getSingleton('checkout/session')->getCitymandatory()));\r\n $form->addField(\"PostCodeMandatory\", 'hidden', array('name'=>\"PostCodeMandatory\", 'value'=>Mage::getSingleton('checkout/session')->getPostcodemandatory()));\r\n $form->addField(\"StateMandatory\", 'hidden', array('name'=>\"StateMandatory\", 'value'=>Mage::getSingleton('checkout/session')->getStatemandatory()));\r\n $form->addField(\"CountryMandatory\", 'hidden', array('name'=>\"CountryMandatory\", 'value'=>Mage::getSingleton('checkout/session')->getCountrymandatory()));\r\n $form->addField(\"ResultDeliveryMethod\", 'hidden', array('name'=>\"ResultDeliveryMethod\", 'value'=>Mage::getSingleton('checkout/session')->getResultdeliverymethod()));\r\n $form->addField(\"ServerResultURL\", 'hidden', array('name'=>\"ServerResultURL\", 'value'=>Mage::getSingleton('checkout/session')->getServerresulturl()));\r\n $form->addField(\"PaymentFormDisplaysResult\", 'hidden', array('name'=>\"PaymentFormDisplaysResult\", 'value'=>Mage::getSingleton('checkout/session')->getPaymentformdisplaysresult()));\r\n $form->addField(\"ServerResultURLCookieVariables\", 'hidden', array('name'=>\"ServerResultURLCookieVariables\", 'value'=>Mage::getSingleton('checkout/session')->getServerresulturlcookievariables()));\r\n $form->addField(\"ServerResultURLFormVariables\", 'hidden', array('name'=>\"ServerResultURLFormVariables\", 'value'=>Mage::getSingleton('checkout/session')->getServerresulturlformvariables()));\r\n $form->addField(\"ServerResultURLQueryStringVariables\", 'hidden', array('name'=>\"ServerResultURLQueryStringVariables\", 'value'=>Mage::getSingleton('checkout/session')->getServerresulturlquerystringvariables()));\r\n\r\n // reset the session items\r\n Mage::getSingleton('checkout/session')->setHashdigest(null)\r\n\t \t\t\t\t\t\t\t\t\t->setMerchantid(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setAmount(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setCurrencycode(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setOrderid(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setTransactiontype(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setTransactiondatetime(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setCallbackurl(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setOrderdescription(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setCustomername(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setAddress1(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setAddress2(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setAddress3(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setAddress4(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setCity(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setState(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setPostcode(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setCountrycode(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setCv2mandatory(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setAddress1mandatory(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setCitymandatory(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setPostcodemandatory(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setStatemandatory(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setCountrymandatory(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setResultdeliverymethod(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setServerresulturl(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setPaymentformdisplaysresult(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setServerresulturlcookievariables(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setServerresulturlformvariables(null)\r\n\t\t\t \t\t \t\t\t\t\t\t\t->setServerresulturlquerystringvariables(null);\r\n \r\n $html = '<html><body>';\r\n $html.= $form->toHtml();\r\n $html.= '<div align=\"center\"><img src=\"'.$this->getSkinUrl(\"images/paymentsense.gif\").'\"><p></div>';\r\n $html.= '<div align=\"center\"><img src=\"https://pfserver.net/img/loadingPF.gif\"><p></div>';\r\n $html.= '<div align=\"center\">Verificando sus Dato, por favor espere...</div>';\r\n $html.= '<script type=\"text/javascript\">document.getElementById(\"HostedPaymentForm\").submit();</script>';\r\n $html.= '</body></html>';\r\n \t\r\n \treturn $html;\r\n }",
"public function getHostedFormRedirectUrl()\n {\n return Mage::getUrl('paymentsense/hosted/redirect', array('_secure' => true));\n }",
"protected function _get_remote_form_url()\n {\n return 'https://' . (ecommerce_test_mode() ? 'select-test' : 'select') . '.worldpay.com/wcc/purchase';\n }",
"function payment_controller_url()\r\n{\r\n global $app, $payment_controller, $order_status;\r\n if ($payment_controller == 'renew')\r\n return $app->url('/renew.php', array('step' => param('step'), 'id' => param('region_id'), 'email' => @$_REQUEST['email'], 'digest' => @$_REQUEST['digest']));\r\n return $app->url('/get_pixels.php', array('step' => $order_status['step']));\r\n}",
"public function getPaymentUrl()\n {\n return $this->payment_url;\n }",
"public function getFormActionUrl()\n {\n return $this->getUrl('klevu_search/wizard/userplan_post');\n }",
"public function submitPayment()\r\n {\r\n\r\n $this->prepareSubmit();\r\n\r\n echo \"<html>\\n\";\r\n echo \"<head><title>Processing Payment...</title></head>\\n\";\r\n echo \"<body onLoad=\\\"document.forms['gateway_form'].submit();\\\">\\n\";\r\n echo \"<p style=\\\"text-align:center;\\\"><h2>Please wait, your order is being processed and you\";\r\n echo \" will be redirected to the payment website.</h2></p>\\n\";\r\n echo \"<form method=\\\"POST\\\" name=\\\"gateway_form\\\" \";\r\n echo \"action=\\\"\" . $this->gatewayUrl . \"\\\">\\n\";\r\n\r\n foreach ($this->fields as $name => $value)\r\n {\r\n echo \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\"/>\\n\";\r\n }\r\n\r\n\r\n echo \"<p style=\\\"text-align:center;\\\"><br/><br/>If you are not automatically redirected to \";\r\n echo \"payment website within 5 seconds...<br/><br/>\\n\";\r\n echo \"<input type=\\\"submit\\\" value=\\\"Click Here\\\"></p>\\n\";\r\n\r\n echo \"</form>\\n\";\r\n echo \"</body></html>\\n\";\r\n }",
"protected function buildReturnUrl() {\n return Url::fromRoute('commerce_payment.checkout.return', [\n 'commerce_order' => $this->order->id(),\n 'step' => 'payment',\n ], ['absolute' => TRUE]);\n }",
"public function getFormAction()\n {\n return $this->getUrl('support/customer/replyPost', ['_secure' => true, '_current' => true]);\n }",
"protected function getRedirectUrl()\n {\n return $this->urlBuilder->getUrl('digitalbuy/installment/modal_payment', ['_secure' => true]);\n }",
"public function getRedirectPaymentUrl()\n {\n return $this->webstoreHelper->getCurrentWebstoreConfiguration()->domainSsl . '/payment/novalnet/redirectPayment/';\n }",
"protected function getReturnUrl(): string\n {\n return $this->urlGenerator->generate(\n 'payment_done',\n [],\n UrlGeneratorInterface::ABSOLUTE_URL\n );\n }",
"protected function _get_remote_form_url()\n {\n return ecommerce_test_mode() ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';\n }",
"public function redirectUrl()\n {\n return PayWithBank3DFacade::getUrl();\n }",
"protected function _getSaveAndContinueUrl()\n {\n return $this->getUrl('lofhelpdesk/*/save', ['_current' => true, 'back' => 'edit', 'active_tab' => '{{tab_id}}']);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches the total number of outlets | public function getTotalOutlets() {
$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "wkpos_outlet");
return $query->row['total'];
} | [
"public function getOutletCount()\n {\n return $this->outletCount;\n }",
"public function outlet_record_count() {\n\t\treturn $this->db->count_all(\"ss_outlet\");\n\t}",
"function getNumberOfBicycleOutlets(){\r\n $query = \"SELECT COUNT(*) FROM bicycle_outlet\";\r\n $result = mysql_query($query) or trigger_error(mysql_error().\" \".$query);\r\n\r\n return $result;\r\n }",
"public function get_total_number_of_indexables()\n {\n }",
"public function getCount(){\n\t\treturn count($this->ressource);\n\t}",
"function sp_count_shoutbox()\n{\n\t$db = database();\n\n\t$request = $db->query('', '\n\t\tSELECT \n\t\t COUNT(*)\n\t\tFROM {db_prefix}sp_shoutboxes'\n\t);\n\tlist ($total_shoutbox) = $db->fetch_row($request);\n\t$db->free_result($request);\n\n\treturn $total_shoutbox;\n}",
"public function getTotalNumberOfElements();",
"public function getTotalElementsCount(): int;",
"public function count()\n {\n $count = 0;\n foreach ($this->server->read()->droplets as $server) {\n if ('worker' == $server->name) {\n $count++;\n }\n }\n return $count;\n }",
"public function getTotalOccupiedLots() {}",
"public function count() {\n return count($this->components);\n }",
"public function getInnListCount()\n {\n return $this->count(self::INNLIST);\n }",
"function getCountPinglists()\n\t{\n\t\t$criteria = new CriteriaCompo(new Criteria('`offlined`', 0));\n\t\t$criteria->add(new Criteria('`type`', 'XML-RPC'));\n\t\treturn $this->getCount($criteria);\n\t}",
"public function count()\n {\n return count($this->houses);\n }",
"public function getCountNumShops();",
"public function count()\n {\n return count($this->resources);\n }",
"public function totalElements(): int;",
"public function countShippables(): int;",
"public function total()\n\t{\n\t\treturn $this->hotels->count();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End:: MyAccount page Begin:: User All Orders | public function UserAllOrders(){
$customerOrder = 1;
return view('user.pages.account.myaccount', compact('customerOrder'));
} | [
"function geneshop_my_orders_page($account) {\n drupal_set_title(t(\"@name's Order History\", array('@name' => format_username($account))), PASS_THROUGH);\n $build = array();\n $query = db_select('node', 'n')->extend('PagerDefault');\n $nids = $query->fields('n', array('nid', 'sticky', 'created'))->condition('type', geneshop_ORDER_NODETYPE)->condition('uid', $account->uid)->condition('status', 1)->orderBy('created', 'DESC')->limit(variable_get('default_nodes_main', 10))->addTag('node_access')->execute()->fetchCol();\n if (!empty($nids)) {\n $nodes = node_load_multiple($nids);\n $build += node_view_multiple($nodes);\n $build['pager'] = array(\n '#theme' => 'pager',\n '#weight' => 5,\n );\n }\n else {\n drupal_set_message(t('You have no orders for this account.'));\n }\n return $build;\n}",
"function my_orders() {\n $this->auth->login_check();\n $data['view_file'] = \"my_orders\";\n $this->templates->shop($data);\n }",
"public function lastOrdersAction() {\n $this->_initCustomer();\n $this->loadLayout();\n $this->renderLayout();\n }",
"public function showAccountOrderAutomations();",
"public function u_orders()\n {\n redirect_developer_login();\n\n redirect_user_home(); // if user did not logined then go to login page\n\n $cartid = null; if (isset($_SESSION[\"cartid\"])) $cartid = $_SESSION[\"cartid\"];\n $data[\"cart_product_info\"] = $this->admin->get_products_bycartid( $cartid );\n\n $data[\"orders\"] = $this->admin->get_all_orders_info( $_SESSION[\"userid\"] );\n\n $this->load->view('frontend/u_orders', $data);\n }",
"public function myOrders(Request $request){\n if( isset($_COOKIE[\"type\"])){\n $body = $request->getBody();\n $userId = $_COOKIE['type'];\n if(!isset($body[\"page\"])){\n $currentPage = 1;\n }\n else{\n $currentPage = $body[\"page\"];\n }\n $amountOfData = count($this->orderService->getAllOrdersOfUser($userId));\n if($amountOfData!=0) {\n $numberOfPages = $this->paginator->countPages($amountOfData);\n\n if ($currentPage > $numberOfPages || $currentPage <= 0 || $currentPage == null) {\n return $this->render('404_page');\n }\n $orderArray = $this->paginator->getOrders($currentPage, $userId);\n //Creates a class containing all required data for myOrders\n $object = new stdClass();\n $object->orderArray = $orderArray;\n $object->pages = $numberOfPages;\n $object->currentPage = $currentPage;\n $this->setLayout('layout');\n return $this->render('profile/myOrders', $object);\n }\n else{\n //Creates a class containing a string field.\n $errorObject = new stdClass();\n $errorObject->dataType = 'orders';\n $this->setLayout('layout');\n return $this->render('profile/noDataPage',$errorObject);\n }\n }\n $this->redirect('/login');\n }",
"public function myOrdersAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ProjectBundle:MovieOrder')->findByUser($this->getUser());\n\n return $this->render('ProjectBundle:Default:userorders.html.twig', array(\n 'entities' => $entities,\n\t\t\t'licznik' => count($entities),\n ));\n }",
"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 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 }",
"function kleo_woo_orders_screen_content() {\n\t\techo '<div class=\"woocommerce\">';\n\t\twc_get_template( 'myaccount/my-orders.php', array( 'order_count' => 'all' ) );\n\t\techo '</div>';\n\t}",
"function invoiceallAction()\n {\n $orderIds = $this->_getOrderIds();\n\n //Process invoices\n $result = Mage::getModel('fooman_ordermanager/orderManager')->invoiceAll(\n $orderIds,\n Mage::helper('fooman_ordermanager')->getStoreConfig('invoiceaction/newstatus'),\n Mage::helper('fooman_ordermanager')->getStoreConfig('invoiceaction/sendemail')\n );\n\n //Add results to session\n $this->addResultsToSession($result, 'Invoiced');\n\n //go back to the order overview page\n $this->_redirectWithSelection($orderIds, 'invoiceaction');\n }",
"public function index()\n {\n $orderList = $this->Order_Model->getOrder();\n //dump($orderList);exit();\n $this->assign('orderList',$orderList);\n $this->display();\n }",
"public function showAccountOrderStates();",
"public function activeOrders()\n {\n }",
"public function transactionsAction()\n {\n $this->_initOrder();\n $this->loadLayout(false);\n $this->renderLayout();\n }",
"protected function handleAccount()\n\t{\n\t\t$countries\t= $this->env->getLanguage()->getWords( 'countries' );\n\t\t$userId\t\t= 0;\n\t\tif( $this->logicAuth->isAuthenticated() ){\n\t\t\t$userId\t= $this->logicAuth->getCurrentUserId();\n\t\t\tif( $userId ){\n\t\t\t\tif( !$this->modelCart->get( 'userId' ) )\n\t\t\t\t\t$this->modelCart->set( 'userId', $userId );\n\t\t\t\t$user\t\t= $this->modelUser->get( $userId );\n\t\t\t\t$addressDelivery\t= $this->modelAddress->getByIndices( [\n\t\t\t\t\t'relationType'\t=> 'user',\n\t\t\t\t\t'relationId'\t=> $userId,\n\t\t\t\t\t'type'\t\t\t=> Model_Address::TYPE_DELIVERY,\n\t\t\t\t] );\n\t\t\t\t$addressBilling\t\t= $this->modelAddress->getByIndices( [\n\t\t\t\t\t'relationType'\t=> 'user',\n\t\t\t\t\t'relationId'\t=> $userId,\n\t\t\t\t\t'type'\t\t\t=> Model_Address::TYPE_BILLING,\n\t\t\t\t] );\n\t\t\t\tif( $this->request->has( 'save' ) && $addressDelivery && $addressBilling ){\n\t\t\t\t\t$this->modelCart->set( 'orderStatus', Model_Shop_Order::STATUS_AUTHENTICATED );\n\t\t\t\t\t$this->modelCart->set( 'userId', $userId );\n\t\t\t\t\t$this->restart( 'shop/conditions' );\n\t\t\t\t}\n\t\t\t\tif( !array_key_exists( $user->country, $countries ) )\n\t\t\t\t\t$user->country\t= 'DE';\n\t\t\t\t$this->addData( 'countries', $countries );\n\t\t\t\t$this->addData( 'user', $user );\n\t\t\t\t$this->addData( 'addressBilling', $addressBilling );\n\t\t\t\t$this->addData( 'addressDelivery', $addressDelivery );\n\t\t\t}\n\t\t}\n//\t\t$this->addData( 'mode', Model_Shop_CART::CUSTOMER_MODE_ACCOUNT );\n\t\t$this->addData( 'userId', $userId );\n\t\t$this->addData( 'username', $this->request->get( 'username' ) );\n\t\t$this->addData( 'useOauth2', $this->env->getModules()->has( 'Resource_Authentication_Backend_OAuth2' ) );\n\t}",
"public function ordersAction()\n {\n \t// Change maximum execution time \n set_time_limit(0);\n \n echo Ireus_Controller_Export::getInstance()\n ->setOrderColumns($this->_ordersColumns)\n ->exportOrdersCsv(Mage::getModel('Sales/Order_Item')->getCollection()->getData());\n\n exit;\n }",
"public function displayOrderOverview(){\n $this->generateOrderOverviewHTML();\n $this->shoppingCart->clearShoppingCart();\n $this->request->setSESSION(\"shoppingCart\", serialize($this->shoppingCart));\n $this->request->setSESSION(\"orderDone\", \"n\");\n $this->templateEngine->display(\"/Product/OrderOverview.tpl\");\n\n }",
"function receipt_page( $order ) {\n echo '<p>Thank you ! Your order is now pending payment. You should be automatically redirected to Jeeb to make payment.</p>';\n // Convert Base to Target\n $amount = $this->convert_base_to_target ( $order );\n // Create Invoice for payment in the Jeeb server\n $token = $this->create_invoice ( $order , $amount );\n // Redirecting user for the payment\n echo $this->redirect_payment ( $token );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
// Name: getLastRunEndId Description: Queries database to find where the last run ended SQL Query: SELECT FROM sportssocialrank.twitter_dbupdates; Methods Called: RunQuery(); // | function getLastRunEndId(){
$sql = "SELECT * FROM sportssocialrank.twitter_dbupdates;";
$row = runQuery($sql,false);
$endId = $row['endId'];
return $endId;
} | [
"public function get_lastid_cron_mdl_log(){\r\n\t\t\t$DB = $this->getDB();\r\n\t\t\t//$sql = \"SELECT id, time FROM {log} ORDER BY id DESC Limit 0, 1\";\r\n\t\t\t$sql = \"SELECT id, time FROM {log} WHERE id=(SELECT MAX(id) FROM {log});\";\r\n\t\t\t$lastid = $DB->get_record_sql($sql);\r\n\r\n\t\t\tif ($lastid != null){\r\n\t\t\t\treturn $lastid;\r\n\t\t\t}\r\n\t\t\telse{ \r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}",
"public function getLastId()\n {\n return $this->last_id;\n }",
"function get_last_open_riddle_id() {\n return db_scalar_query(\"SELECT id FROM `riddle` WHERE end_time IS NULL ORDER BY `start_time` DESC LIMIT 1\");\n}",
"public function getLastId()\n {\n $tableData = $this->get();\n\n $lastRecord = (count($tableData) > 0) ? end($tableData) : 0;\n\n if ($lastRecord !== false) {\n return $lastRecord['id'];\n }\n\n return $lastRecord;\n }",
"function GetLastResultId()\n\t{\n\t\treturn $this->db->lastresult;\n\t}",
"public function getLastTweetId() {\n $tweetDP = $this->getTweetDataProvider();\n if (!$tweetDP) {\n return null;\n }\n $data = $tweetDP->getData();\n $lastTweetId = count($data) ? $data[count($data) - 1]['id_str'] : null;\n return $lastTweetId;\n }",
"public function fetchLastId();",
"public function determineLastBatchId() {\n\n }",
"public static function get_last_query()\n\t{\n\t\treturn end(DB::profile());\n\t}",
"public function determineLastBatchId() {\n\n $url = 'http://integral.esac.esa.int/isocweb/schedule.html?action=schedule';\n $scraper = new Scraper($url);\n return $scraper->scrape()->match('/Schedule for current revolution \\((.*?)\\)/s');\n\n }",
"private function _get_last_job_id() {\n\t \n\t $ret = self::_get_job_id();\n\t \n\t return ($ret-1);\n\t}",
"public function getLastDbEntry()\n {\n $PDO_connection = $this->_connectToDb();\n $sql = 'SELECT * FROM tCompleted ORDER BY id DESC LIMIT 1';\n $result = $PDO_connection->query($sql);\n $row = $result->fetch(\\PDO::FETCH_ASSOC);\n $PDO_connection = NULL;\n return $row;\n\n }",
"public function getLastTweetId() {\n $last = $this->connection->query('SELECT MAX(id) FROM Tweet')->fetch()[0];\n return intval($last) + 1;\n }",
"public function getLastId()\r\n {\r\n return $this->qaMapper->getLastId();\r\n }",
"public function last_query();",
"private function getLastId()\r\n{\r\n// build the SQL query to retrieve the last id in the whiteboard table\r\n$get_last_id = 'SELECT whiteboard_id ' .\r\n'FROM whiteboard ' .\r\n'ORDER BY whiteboard_id DESC ' .\r\n'LIMIT 1';\r\n// execute the SQL query\r\n$result = $this->mMysqli->query($get_last_id);\r\n// check to see if there are any results\r\nif($result->num_rows > 0)\r\n{\r\n// fetch the row containing the result\r\n$row = $result->fetch_array(MYSQLI_ASSOC);\r\n// return the xml element\r\nreturn $row['whiteboard_id'];\r\n}\r\nelse\r\n// there are no records in the database so we return 0 as the id\r\nreturn '0';\r\n}",
"public function getLastId()\n {\n return $this->answerWebPageMapper->getMaxId();\n }",
"protected function getLatestId(){\n $sql = \"SELECT tweet_id FROM %s ORDER BY tweet_id DESC LIMIT 1\";\n if($res = TwitterDBWrapper::fetch($sql)){\n $res = $res->fetch_array();\n return $res[0];\n }\n return 0;\n }",
"public function getEndToEndId()\n {\n return $this->end_to_end_id;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a command object. If a command with the same name already exists, it will be overridden. If the command is not enabled it will not be added. | public function add(Command $command); | [
"public function addCommand(Command $command);",
"public function addCommand(Command $command) \n\t{\n\t\t$this->_commands[] = $command;\n\t}",
"public function addCommand( iCommand $command ){\r\n\t\t$this->_commands[strtoupper(get_class($command))] = $command;\r\n\t}",
"function addCommand(&$command)\n {\n $this->_commands[] =& $command;\n }",
"public function addCommand(Command $command) {\n $this->commands[] = $command;\n $command->setCategory($this);\n }",
"public function add($command)\n {\n $this->application->add($command);\n }",
"public function registerCommand($command)\n\t{\n\t $this->add($command);\n\t}",
"protected function registerAddCommand() {\n $this->app->bindShared('command.compleet.add', function($app) {\n return new AddCommand($app['compleet']);\n });\n\n $this->commands('command.compleet.add');\n }",
"function addCommand($c){\r\n \t array_push($this->list_commands,$c);\r\n }",
"public static function add($command){\r\n return \\Illuminate\\Console\\Application::add($command);\r\n }",
"private function doAddCommands()\n {\n if (!empty($this->newCommands)) {\n $this->shell->addCommands($this->newCommands);\n $this->newCommands = [];\n }\n }",
"protected function registerAddCommand()\n\t{\n\t\t$this->app->bind('command.translate.add', function($app)\n\t\t{\n\t\t\treturn $app->make('Philo\\Translate\\Console\\AddCommand');\n\t\t});\n\n\t\t$this->commands('command.translate.add');\n\t}",
"protected function addToParent( SymfonyCommand $command )\n\t{\n\t\treturn parent::add( $command );\n\t}",
"public function setCommand(string $command);",
"public function testAddCommand(): void\n {\n $collection = new CommandCollection();\n $this->assertSame($collection, $collection->add('ex', DemoCommand::class));\n $this->assertTrue($collection->has('ex'));\n $this->assertSame(DemoCommand::class, $collection->get('ex'));\n }",
"protected function addToParent(SymfonyCommand $command)\n {\n return parent::add($command);\n }",
"public function testOverwritingExistingCommand()\n {\n $originalCommand = new SimpleCommand('foo', 'The foo command');\n $overwritingCommand = new SimpleCommand('foo', 'The foo command copy');\n $this->collection->add($originalCommand);\n $this->collection->add($overwritingCommand, true);\n $this->assertSame($overwritingCommand, $this->collection->get('foo'));\n }",
"function add() {\n\n $args = func_get_args();\n\n if ( is_bool( $args[0] ) ) {\n $condition = array_shift( $args );\n if ( ! $condition )\n return;\n }\n\n if ( empty( $args ) )\n return;\n\n $command = $args[0];\n\n $messages = array_filter(\n array_slice( $args, 1 ),\n function( $a ) {\n return is_string( $a );\n } );\n\n $exit_on_failure = function( $default ) use ( $args ) {\n foreach ( $args as $arg ) {\n if ( is_bool( $arg ) )\n return $arg;\n }\n return $default;\n };\n\n $meta = array(\n 'command' => ( is_array( $command ) ? $command[0] : $command ),\n 'cwd' => ( is_array( $command ) ? $command[1] : false ),\n 'exit' => $exit_on_failure( true ),\n 'messages' => ( count( $messages ) ? $messages : false ),\n );\n\n $this->commands[] = $meta;\n }",
"abstract public function addInfo(CommandInterface $command): CommandInterface;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the category price, if a given category does not have a category price yet. | protected function setCategoryDefaultPrice(EventInterface $event)
{
$priceCategoryForm = new PriceCategory();
if (! $priceCategoryForm->isValid(Request::post())) {
$errors = $priceCategoryForm->getErrors();
$event->setResult(
array(
'success' => false,
'message' => __('An error occurred. Incorrect data provided.', 'laterpay'),
)
);
throw new FormValidation(get_class($priceCategoryForm), $errors['name']);
}
$categoryID = $priceCategoryForm->getFieldValue('category_id');
$term = get_term_by('id', $categoryID, 'category');
$categoryRevenueModel = $priceCategoryForm->getFieldValue('laterpay_category_price_revenue_model');
$updatedPostIDs = null;
if (empty($term->term_id)) {
$event->setResult(
array(
'success' => false,
'message' => __('There is no such category on this website.', 'laterpay'),
)
);
return;
}
$categoryPriceModel = new CategoryPrice();
$tableValueID = $categoryPriceModel->getPriceIDByTermID($term->term_id);
$delocalizedCategoryPrice = $priceCategoryForm->getFieldValue('price');
if (null === $tableValueID) {
$categoryPriceModel->setCategoryPrice(
$term->term_id,
$delocalizedCategoryPrice,
$categoryRevenueModel
);
$updatedPostIDs = \LaterPay\Helper\Pricing::applyCategoryPriceToPostsWithGlobalPrice($term->term_id);
} else {
$categoryPriceModel->setCategoryPrice(
$term->term_id,
$delocalizedCategoryPrice,
$categoryRevenueModel,
$tableValueID
);
}
$localizedCategoryPrice = \LaterPay\Helper\Pricing::localizePrice($delocalizedCategoryPrice);
$currency = $this->config->get('currency.code');
$event->setResult(
array(
'success' => true,
'category_name' => $term->name,
'price' => number_format($delocalizedCategoryPrice, 2, '.', ''),
'localized_price' => $localizedCategoryPrice,
'currency' => $currency,
'category_id' => $categoryID,
'revenue_model' => $categoryRevenueModel,
'revenue_model_label' => \LaterPay\Helper\Pricing::getRevenueLabel($categoryRevenueModel),
'updated_post_ids' => $updatedPostIDs,
'message' => sprintf(
__('All posts in category %1$s have a default price of %2$s %3$s now.', 'laterpay'),
$term->name,
$localizedCategoryPrice,
$currency
),
)
);
} | [
"protected static function _updateCategoryDefaultPrice() {\n\n $delocalized_category_price = (float)str_replace(',', '.', $_POST['price']);\n if ( $delocalized_category_price > 5 || $delocalized_category_price < 0 ) {\n echo Zend_Json::encode(\n array(\n 'success' => false,\n 'message' => __('The price you tried to set is not within the allowed range of 0 to 5.00.', 'laterpay')\n )\n );\n die;\n }\n\n if ( !empty($_POST['category_id']) ) {\n self::_updateExistingCategoryDefaultPrice();\n die;\n } else {\n self::_setNewCategoryDefaultPrice();\n die;\n }\n }",
"public function setPrice($price)\n {\n $this->setPrices($price);\n }",
"public function set_price($price) {\n $this->getProduct()->set_price($price);\n }",
"public function setPrice($price)\n {\n $this->price = round($price, 2);\n }",
"public function setPrice($price)\n {\n $this->_price = (float) $price;\n }",
"public function setPrice($value) {\n\t\t$this->_price = $value;\n\t}",
"public function setPrice($price)\n {\n $this->_price = $price;\n }",
"function SetCategory(&$category)\n\t{\n\t\t$this->categoryId = $category->categoryId;\n\t}",
"public function setPrice($value);",
"public function set_price($price = NULL)\n {\n if (is_null($price) || empty($price))\n {\n return $this->set_point_of_initiation_static();\n } else\n {\n $this->point_of_initiation = parent::POINT_OF_INITIATION_DYNAMIC;\n if (is_numeric($price))\n {\n $this->transaction_amount = number_format($price, 2, '.', '');\n } else\n {\n return $this->return_status(FALSE, self::STATUS_INVALID_VALUE, parent::ID_TRANSACTION_AMOUNT);\n }\n }\n return $this->return_status(TRUE);\n }",
"public function testIsAssignedToCategoryIsAssignedIfPriceCat()\n {\n $oArticle = $this->_createArticle('_testArt');\n $oArticle->oxarticles__oxprice = new oxField(25, oxField::T_RAW);\n $oArticle->save();\n $this->addToDatabase(\"insert into oxcategories (oxid, oxparentid, oxshopid, oxtitle, oxactive, oxleft, oxright, oxrootid, oxpricefrom, oxpriceto, oxlongdesc, oxlongdesc_1, oxlongdesc_2, oxlongdesc_3) values ('_testCat', 'oxrootid', '1', 'test', 1, '1', '2', '_testCat', '10', '50', '', '', '', '')\", 'oxcategories');\n $this->assertTrue($oArticle->isAssignedToCategory('_testCat'));\n }",
"public function setPrice(float $price);",
"public function setOriginalPrice($price);",
"public function setPrice($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Channel\\V1\\Price::class);\n $this->price = $var;\n\n return $this;\n }",
"public function setCategory($category) {$this->category = $category;}",
"protected static function _deleteCategoryDefaultPrice() {\n $LaterPayModelCategory = new LaterPayModelCategory();\n $LaterPayModelCategory->deletePricesByCategoryId($_POST['category_id']);\n\n $id = $LaterPayModelCategory->getPriceIdsByCategoryId($_POST['category_id']);\n if ( empty($id) ) {\n echo Zend_Json::encode(\n array(\n 'success' => true,\n 'message' => __('The default price for this category was deleted.', 'laterpay')\n )\n );\n } else {\n echo Zend_Json::encode(\n array(\n 'success' => false,\n 'message' => __('An error occurred when trying to save your settings. Please try again.', 'laterpay')\n )\n );\n }\n die;\n }",
"public function setCategory(?string $category): void\n {\n $this->category = $category;\n }",
"public function setCategory($category)\r\n {\r\n \tif (!is_string($category)) {\r\n \t\trequire_once 'Zend/Feed/Exception.php';\r\n \t\tthrow new Zend_Feed_Exception('Invalid parameter: parameter must be a string');\r\n \t}\r\n \t$this->_data['g:google_product_category'] = $category;\r\n }",
"public function SetPriceBasedOnActiveDiscounts()\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of field portador | public function getPortador()
{
return $this->portador;
} | [
"function getPort() {\n return $this->getFieldValue('port');\n }",
"public function getNfsaidaPortadorPadrao()\n {\n return $this->nfsaida_portador_padrao;\n }",
"public function getDstPorte()\n {\n return $this->dstPorte;\n }",
"public function getCdPortador()\n {\n return $this->cd_portador;\n }",
"public function getEmailPorta()\n {\n return $this->email_porta;\n }",
"public function getFromPort() \n {\n return $this->_fields['FromPort']['FieldValue'];\n }",
"public function getPort(){\r\n return $this->Port;\r\n }",
"public function getTelefono(){\n \treturn $this->telefono;\n\t}",
"public function render_port_field() {\n $name = 'port';\n $option = self::get( $name );\n ?>\n <input type=\"number\" name=\"redipress_port\" id=\"redipress_port\" value=\"<?php echo \\esc_attr( $option ); ?>\" <?php $this->disabled( $name ); ?>>\n <p class=\"description\" id=\"port-description\">\n <?php \\esc_html_e( 'Redis server port.', 'redipress' ); ?>\n </p>\n <?php\n }",
"public function getEmpresa_p_tel(){\n return $this->Empresa_p_tel;\n }",
"public function getParcela()\n\t{\n\t\treturn $this->parcela;\n\t}",
"public function getValoracion()\r\n {\r\n return $this->valoracion;\r\n }",
"public function POSTTelefono() {\n return $this->telefono;\n }",
"public function getParcela()\n {\n return $this->parcela;\n }",
"public function getPrimaryPort() {\n return $this -> primaryPort; \n }",
"public function getPortefeuille()\n {\n return $this->portefeuille;\n }",
"function getFieldValue($field);",
"public function getValor()\n {\n return $this->valor;\n }",
"public function getTelefono()\r\n {\r\n return $this->telefono;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add new new Wall to Room object | private function addWall($key, $item, $offset)
{
$this->walls[] = new Wall(['id' => $key, 'data' => $item, 'offset' => $offset, 'hidden' => $item->hidden]);
} | [
"private function _saveWall()\n {\n if (!$this->existingWall) {\n $this->entity = new RoomsWallsEntity();\n }\n\n $room = $this->em->getRepository('AppBundle\\Entity\\Properties\\RoomEntity')->find($this->roomId);\n\n $this->entity->setRoomId($this->roomId);\n $this->entity->setPaintId($this->paintId);\n $this->entity->setName($this->name);\n\n $room->addWall($this->entity);\n\n if (!$this->existingWall) {\n $this->em->persist($room);\n }\n\n $this->em->flush();\n\n return true;\n }",
"public function test_add_new_wall_route() {\n global $CFG;\n\n // request the page\n $client = new Client($this->_app);\n $crawler = $client->request('GET', '/' . $this->_walls[0]->id . '/add');\n $this->assertTrue($client->getResponse()->isOk());\n\n // post some data\n $form = $crawler->selectButton(get_string('savechanges'))->form();\n $client->submit($form, array(\n 'form[title]' => 'Title 001',\n ));\n\n // expect to get redirected to the wall that was added\n $url = $CFG->wwwroot . SLUG . $this->_app['url_generator']->generate('wall', array(\n 'id' => 6,\n ));\n $this->assertTrue($client->getResponse()->isRedirect($url));\n }",
"public function newRoom(){\n }",
"public function test_add_new_wall_to_closed_communitywall() {\n global $CFG, $DB;\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $wall = $this->getDataGenerator()->create_module('communitywall', array(\n 'course' => $course->id,\n 'closed' => 1\n ));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($this->_user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // request the page\n $client = new Client($this->_app);\n $client->request('GET', '/' . $wall->id . '/add');\n\n // ensure we cannot add a new wall\n $url = $CFG->wwwroot . SLUG . $this->_app['url_generator']->generate('byinstanceid', array(\n 'id' => $wall->id,\n ));\n $this->assertTrue($client->getResponse()->isRedirect($url));\n }",
"public function wall()\n {\n return $this->belongsTo('App\\Wall');\n }",
"public function saveNewRoom($newRoom);",
"public function createRoom()\n {\n $data = $this->validate();\n \n if(boolval($this->property)){\n\n $room = $this->property->rooms()->create($data);\n\n if($room){\n\n $this->reset(['label', 'description', 'cost']);\n \n $this->emit('hideUpsertRoomModal');\n }\n \n }\n \n }",
"public function addroom(){\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\tif(isset($_POST)){\n\t\t\t\tif(isset($_POST['name']) && isset($_POST['longitude']) && isset($_POST['latitude']) && isset($_POST['building_id']) && $_POST['name']!='' && $_POST['longitude']!='' && $_POST['latitude']!='' && $_POST['building_id']!=''){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$_POST['added_by_id'] = $_SESSION['user_id'];\n\t\t\t\t\t$insertroom = $this->mapModel->addBuilding($_POST);\n\t\t\t\t\t\n\t\t\t\t\techo json_encode(array('message'=>'room_added', 'result'=>array('room_id'=>$insertroom)));\n\t\t\t\t}else{\n\t\t\t\t\techo json_encode(array('message'=>'$_POST[\"name\"], $_POST[\"longitude\"], $_POST[\"latitude\"],$_POST[\"building_id\"] all need to be set and not empty'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\techo json_encode(array('message'=>'use post'));\n\t\t\t}\t\n\t\t}else{\n\t\t\techo json_encode(array('message'=>'must_log_in'));\n\t\t}\n\t\t\n\t}",
"public function test_wall_put_note_existing_wall_route() {\n global $DB;\n\n $now = time();\n $this->loadDataSet($this->createArrayDataSet(array(\n 'communitywall_note' => array(\n array('id', 'wallid', 'userid', 'note', 'xcoord', 'ycoord', 'timecreated', 'timemodified'),\n array(1, 1, $this->_user->id, 'Note 001', 0, 0, $now, $now),\n ),\n )));\n\n // create a comment to post\n $content = json_encode(array(\n 'note' => 'Note 002',\n 'xcoord' => 10,\n 'ycoord' => 10\n ));\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/wall/' . $this->_walls[0]->id . '/1/note/1', array(), array(), array(\n 'HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest'\n ), $content);\n\n $this->assertTrue($client->getResponse()->isSuccessful());\n $this->assertEquals('application/json', $client->getResponse()->headers->get('Content-Type'));\n\n $note = (array)$DB->get_record_sql('SELECT note, xcoord, ycoord FROM {communitywall_note} WHERE id = :id', array('id' => 1));\n $this->assertEquals(array(\n 'note' => 'Note 002',\n 'xcoord' => 10,\n 'ycoord' => 10\n ), $note);\n }",
"public function addRoom(JobRoomData $data, int $jobId): JobRoom;",
"public function addRoom($room = null){\n $client = Yii::$app->roomService;\n $data = $client->add(['sid'=>$this->sid,'room'=>$room]);\n $this->room_id = $data->return->id;\n return $data;\n }",
"function defineRoom($floor_map) {\n\n // Room starting point.\n $room_coordinates = roomPosition($floor_map);\n\n // Room dimensions in a table.\n $room_area = roomArea($floor_map);\n\n // Room star and ending points.\n $x0 = $room_coordinates[0];\n $x1 = $room_coordinates[0] + $room_area[0];\n $y0 = $room_coordinates[1];\n $y1 = $room_coordinates[1] + $room_area[1];\n \n // Room length and width.\n $length = $x1-$x0;\n $width = $y1-$y0;\n\n\n $outofBounds = checkOutOfBound($room_coordinates, $room_area, $floor_map);\n\n if ($outofBounds === false) {\n $isOverlap = checkRoomPlacement($x0, $y0, $x1, $y1, $floor_map);\n if ($isOverlap === false) {\n $room = new Room($x0, $y0, $length, $width);\n // $door_count = doorCount(); // Number of doors to be added.\n \n $this->addRoom($room);\n $this->drawRoom($room, $floor_map);\n }\n }\n\n }",
"public function getWall()\n {\n return $this->wall;\n }",
"public function createEdgeToRoom(): void\n {\n $this->edge = $this->createEdge($this->room);\n }",
"public function createWallMessage($message = array())\n\t{ \n\t\treturn $this->setRequest(\n\t\t\tarray_merge(\n\t\t\t\tarray(\n\t\t\t\t\t'module' => 'messaging.wall',\n\t\t\t\t\t'method' => 'CREATE'\n\t\t\t\t),\n\t\t\t\t$message\n\t\t\t)\n\t\t);\n\t}",
"function fillWithWalls(){\n for($i = 0; $i <= $this->Height; $i++){\n array_push($this->Cells, array());\n for($j = 0; $j <= $this->Height; $j++){\n $tempCell = new Cell($i,$j);\n $tempCell->makeWall();\n $this->Cells[$i][$j] = $tempCell;\n }\n }\n }",
"public function SaveRooms() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtHostID) $this->objRooms->HostID = $this->txtHostID->Text;\n\t\t\t\tif ($this->txtUnlockedTracks) $this->objRooms->UnlockedTracks = $this->txtUnlockedTracks->Text;\n\t\t\t\tif ($this->txtUrk) $this->objRooms->Urk = $this->txtUrk->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Rooms object\n\t\t\t\t$this->objRooms->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}",
"public function testRoomMembershipCreatedWithRoom()\n {\n $user = factory(User::class)->create();\n\n $this->assertTrue(RoomMembership::count() == 0);\n $this->actingAs($user)->withHeaders([\n 'Authorization' => 'Bearer '.$user->api_token\n ])->json('POST', '/api/rooms', [\n 'name' => 'Test Room'\n ]);\n $this->assertTrue(RoomMembership::count() == 1);\n\n $room = Room::first();\n $room_membership = RoomMembership::first();\n $this->assertEquals($room->id, $room_membership->room_id);\n $this->assertEquals($user->id, $room_membership->user_id);\n }",
"public function post_to_wall($params)\n\t{\n\t\treturn $this->link->api('/me/feed', 'post', $params);\n\t\t// message\n\t\t// link\n\t\t// name\n\t\t// description\n\t\t// picture\n\t\t// access_token\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines the call limit. If result is < 1, limit has not been reached. If result == 1, limit has been reached. | public function getCallLimit() {
if ((int) $this->call_bucket > 0) {
return $this->call_limit / $this->call_bucket;
}
else {
return 0;
}
} | [
"public function callLimit()\n {\n return $this->shopApiCallLimitParam(1);\n }",
"private function limitCalls()\n {\n if ($this->lastCallTimestamp > 0) {\n $callsLimit = $this->shopifyClient->callLimit();\n $callsMade = $this->shopifyClient->callsMade();\n $callsLeft = $this->shopifyClient->callsLeft();\n\n Log::debug(\"ShopifyApi.limitCalls: callsLimit=$callsLimit, callsMade=$callsMade, callsLeft=$callsLeft\");\n $currentTimestamp = microtime(true);\n $deltaTimestamp = ($this->lastCallTimestamp > 0) ? $currentTimestamp - $this->lastCallTimestamp : 0;\n Log::debug(\"ShopifyApi.limitCalls: deltaTimestamp=$deltaTimestamp\");\n\n if ($callsLeft < 10) {\n Log::debug(\"ShopifyApi.limitCalls: DELTA < 10: wait 0.5 seconds\");\n usleep(500000);\n }\n } else {\n Log::debug(\"ShopifyApi.limitCalls: first call\");\n }\n $this->lastCallTimestamp = microtime(true);\n }",
"function limit_reached($response);",
"protected function getLimit()\n\t{\n\t\t$limit = $this->input->get->getInteger('limit');\n\n\t\t// Check if limit is passed in input\n\t\tif (isset($limit))\n\t\t{\n\t\t\t// Check if limit is positive\n\t\t\tif ($limit > 0)\n\t\t\t{\n\t\t\t\t$limit = min($this->maxResults, $limit);\n\t\t\t\treturn $limit;\n\t\t\t}\n\n\t\t\t$this->app->errors->addError(\"303\");\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->limit;\n\t\t}\n\t}",
"public function getMaximumLimit()\n {\n // get the default limit value of results per request from the config file\n return (int) $this->limit;\n }",
"public function limit()\n\t{\n\t}",
"public function hasLimit();",
"abstract public function limit( $theCount = NULL );",
"public function getLimit() {\n\t\tif($this->numLimit) return $this->numLimit;\n\t\t\telse return $this->count();\n\t}",
"abstract public function getLimitForInt(): int;",
"public function getResultLimit()\n {\n return $this->resultLimit;\n }",
"public function getMiterLimit(){}",
"public function getEffectiveLimit()\n {\n if ($this->limit === null) {\n return $this->defaultLimit;\n }\n return $this->limit;\n }",
"public function getLimit()\n\t{\n\t\treturn 0;\n\t}",
"public function getLimit()\n\t{\n\t\treturn isset($this->_query['limit']) ? $this->_query['limit'] : -1;\n\t}",
"public function isLimitExceeded();",
"public function getRemainingLimit();",
"public function getLimitOrDefault()\n {\n $limit = $this->getLimit();\n\n return $limit !== null ? $limit : $this::DEFAULT_LIMIT;\n }",
"public function get_limit_count()\n {\n return $this->limit_count;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the renamed tables. | public function setRenamedTables($tables)
{
$this->renamedTables = $tables;
} | [
"public function autoSetTableNames();",
"function set_table_name($rename){\n $this->tableName = $rename;\n }",
"public function set_other_tables($tablenames)\n {\n $this->other_tables = $tablenames;\n }",
"function assign_table_names(){\n\t\tglobal $wpdb;\n\t\tforeach($this->tables as $table_name => $fields){\n\t\t\t$this->table_names[] = $wpdb->prefix . $table_name;\n\t\t}\n\t}",
"private function setNameTable($name){\n\t\t$this->_name_table = $name;\n\t}",
"public function swapIndexTables(array $originalTablesNames);",
"public function setTables($tables);",
"public function change_meta_table_names( $tables ) {\n\t\t\tglobal $bp;\n\n\t\t\t$tables['activity'] = $bp->table_prefix . 'wporg_activity_meta';\n\n\t\t\treturn $tables;\n\t\t}",
"public function setTables(array $tables);",
"protected function _setTables()\n {\n if (!empty($this->_options['tables'])) {\n return;\n }\n\n $this->_options['tables'] = $this->_getAllTables();\n }",
"protected function checkAndRenameTables()\n {\n $tableMap = array(\n 'tx_pitsdownloadcenter_domain_model_download_filetype' => 'tx_pitsdownloadcenter_domain_model_download_file_type'\n );\n\n $tables = $this->databaseConnection->admin_get_tables();\n foreach ($tableMap as $oldTableName => $newTableName) {\n if (isset($tables[$oldTableName])) {\n if (!isset($tables[$newTableName])) {\n $this->databaseConnection->sql_query('ALTER TABLE ' . $oldTableName . ' RENAME TO ' . $newTableName);\n }\n else {\n if ((int)$tables[$newTableName]['Rows'] === 0) {\n $this->databaseConnection->sql_query('DROP TABLE ' . $newTableName);\n $this->databaseConnection->sql_query('CREATE TABLE ' . $newTableName . ' LIKE ' . $oldTableName);\n $this->databaseConnection->sql_query('INSERT INTO ' . $newTableName . ' SELECT * FROM ' . $oldTableName);\n }\n $this->databaseConnection->sql_query('DROP TABLE ' . $oldTableName);\n }\n }\n }\n }",
"public function renameTable($_tableName, $_newName);",
"protected abstract function rename_table($table, $new_name);",
"public function setModifiedTables($modifiedTables)\n {\n $this->modifiedTables = $modifiedTables;\n }",
"public function testSetTableName()\n {\n $names = ['PREFIX_table', 'prefix_table'];\n foreach ($names as $name) {\n $this->_object->setTable($name);\n $this->assertEquals($name, $this->_object->getTable());\n }\n }",
"function _rename_table($table_name, $new_table_name)\n\t{\n\t\t//not implemented in dynamo\n\t}",
"abstract public function renameTable($tablename, $newTableName);",
"public function setTables($tables)\n {\n if (!is_array($tables)) {\n $tables = array($tables);\n }\n\n /*\n * Make sure no tables are repeated, therefore the query won't\n * be executed twice on the same database.\n */\n $this->_tables = array_unique($tables);\n }",
"abstract function renameTable($tablename, $newTableName);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the average value of all values selected. If selector is not given items must be scalars. | function average($selector = null)
{
$total = 0;
$count = 0;
$callback = $this->validate($selector);
foreach($this->stack as $item)
{
$query = $callback !== false ? call_user_func($callback, $item) : $item;
if (is_int($query) || is_float($query))
{
$total += $query;
$count++;
}
}
return $count !== 0 ? ($total / $count) : 0;
} | [
"public function selectAvg(...$args): self\n {\n return $this->aggregate('avg', ...$args);\n }",
"public function average()\n {\n return average($this->getItems());\n }",
"protected function avg(){\n\n if (empty($this->iterable)) return null;\n\n if (!$this->field)\n return array_sum($this->iterable)/ count($this->iterable);\n else {\n\n $values = array_map(function($obj){\n return $obj->{$this->field} ?? null;\n }, $this->iterable );\n\n return array_sum($values) / count($values);\n\n }\n }",
"public function avg() {\n\t\treturn $this->sum() / $this->count();\n\t}",
"public function select_avg($select = '', $alias = '') {\n return $this->_max_min_avg_sum($select, $alias, 'AVG');\n }",
"public function select_avg($select = '', $alias = '')\n\t{\n\t\treturn $this->_max_min_avg_sum($select, $alias, 'AVG');\n\t}",
"public function average()\n {\n return ( $this->sum() / count($this->dices));\n }",
"public function average()\n {\n if (!isset($this->comparisonCollection)) {\n //If we are dealing with a single answer index instead of all of the answers\n if (!is_array($this->getEntity()->first())) {\n $value_sum = 0;\n foreach ($this->getEntity() as $answer) {\n if ($answer->value) {\n $numeric_value = preg_replace('/[a-zA-Z]/', '', $answer->value);\n $value_sum += $numeric_value;\n }\n }\n if ($value_sum <= 0) {\n return 0;\n }\n return $value_sum / $this->count();\n }else {\n //If we are dealing with multiple answer indexes\n //@todo figure this out\n\n }\n } else {\n $this->comparison['average'] = new Collection();\n //we are dealing with a comparison of the averages\n\n //If we are dealing with a single answer index\n if (!is_array($this->getEntity()->first()) && !is_object($this->getEntity()->first())) {\n //@todo figure this out\n } else {\n //If we are dealing with a collection of answer index => answer collections\n foreach ($this as $question_index => $answer_collection) {\n\n $data = array(\n 'value' => $answer_collection->average() - $this->getComparisonCollection()[$question_index + 1]->average(),\n 'index' => $question_index + 1,\n );\n\n $this->comparison['average']->push($data);\n }\n }\n\n\n $this->comparison['average']->sort(function($a, $b){\n if ($a == $b) {\n return 0;\n }\n return ($a['value'] > $b['value']) ? -1 : 1;\n });\n\n\n return $this->comparison['average'];\n }\n }",
"function average() {\n $total = 0;\n foreach ($this->grades as $value)\n $total += $value;\n return $total / count($this->grades);\n }",
"public function computeAvgRating()\n {\n return Doctrine_Query::create()\n ->select('AVG(value) as avg_val')\n ->from('Rate')\n ->where('record_model = ? AND record_id = ?', array(\n $this->getModel(),\n $this->getItemId(),\n ))\n ->fetchOne()\n ->avg_val;\n }",
"public function avg()\n {\n return array_sum($this->array) / count($this->array);\n }",
"public function avgValueAll()\n {\n $totalValue = 0;\n\n $count = 0;\n \n $values = Order::all()->pluck('total_price');\n\n if($values){\n\n foreach ($values as $value) {\n $totalValue = $totalValue + $value;\n\n $count++;\n }\n\n $avg = ($totalValue / $count);\n\n return response(round($avg, 2), 200);\n }\n\n return round(false, 404);\n }",
"function average() {\n $total = 0;\n foreach ($this->grades as $value) {\n $total += $value;\n }\n return $total / count($this->grades);\n }",
"public function select_avg($select = '', $alias = '') {\n call_user_func_array([self::db(), __FUNCTION__], func_get_args());\n return $this;\n }",
"function average() {\r\n $total = 0;\r\n foreach ($this->grades as $value)\r\n $total += $value;\r\n return $total / count($this->grades);\r\n }",
"function average() {\n $total = 0;\n foreach ($this->grades as $value)\n $total += $value;\n return $total / count($this->grades);\n }",
"function average() {\n $total = 0;\n foreach ($this->grades as $value) {\n $total += $value;\n }\n return $total / count($this->grades);\n }",
"public function select_avg($field, $as=FALSE);",
"public function avg($matcher = null);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print the given printable. | protected function printPrintable(Printable $printable)
{
return $printable->print($this);
} | [
"public function print(Printer $printer): string;",
"public function self_print();",
"function is_printable(){\n return (isset($_REQUEST['print']));\n}",
"public function isPrintable()\n {\n return $this->printable;\n }",
"function GetPrintoutForPrinting(){}",
"function generatePrintScript($print,$printer,$server) {\n\t\t$dialog=true;\n\t\t$autoprint=false;\n\t\t//We add print dialog or not ...\n\t\tswitch ($print) {\n\t\t\tcase 'print':\n\t\t\tcase 'printnodialog':\n\t\t\t\t$dialog=false;\n\t\t\t\t$autoprint=true;\n\t\t\t\tbreak;\n\t\t\tcase 'printdialog':\n\t\n\t\t\t\t$autoprint=true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tif ($autoprint) {\n\t\t\tif ($printer && $server) {\n\t\t\t\t$this->AutoPrintToNetPrinter($server, $printer, $dialog);\n\t\t\t} elseif ($printer) {\n\t\t\t\t$this->AutoPrintToPrinter( $printer, $dialog);\n\t\t\t} else {\n\t\t\t\t$this->AutoPrint($dialog);\n\t\t\t}\n\t\t}\n\t}",
"public function sprinter()\n {\n }",
"public function print() {?>\n <table>\n <thead>\n <?php $this->printHeaders()?>\n </thead>\n <tbody>\n <?php $this->printBody()?>\n </tbody>\n </table>\n <?php\n }",
"public function getOutputPrinter();",
"public function registerPrintable(callable $callable);",
"public function printOffer($printer)\n {\n if($this->primary_key)\n {\n return $printer->printOffer($this);\n }\n }",
"public function print_invoice($invoice){\n\t\t// Precondition: Needs an invoice... also needs the TCPDF library...\n\t\t// Postcondition: gives the reciept...\n\t\t\n\t\t\n }",
"public function isPrintable(): bool\n {\n return $this->utf8::is_printable($this->str);\n }",
"public function printNonPrintable() {\n echo '<input type=\"' . $this->inputType . '\" class=\"hidden\" name=\"nonPrintables[]\" value=\"' . $this->name . '\">';\n }",
"public function isPrintable(): bool\n {\n if (!$this->person || !in_array($this->person->status, self::ALLOWED_PERSON_STATUSES)) {\n return false;\n }\n\n if (!in_array($this->status, self::READY_TO_PRINT_STATUSES)) {\n return false;\n }\n\n return true;\n }",
"function AutoPrintToPrinter($server, $printer, $dialog=false)\n{\n $script = \"var pp = getPrintParams();\";\n if($dialog)\n \t$script .= \"pp.interactive = pp.constants.interactionLevel.full;\";\n else\n\t\t$script .= \"pp.interactive = pp.constants.interactionLevel.automatic;\";\n \t$script .= \"pp.colorOverride = pp.constants.colorOverrides.gray;\";\n\t$script .=\"var fv = pp.constants.flagValues;\";\n\t$script .= \"pp.flags |= fv.setPageSize;\";\n\t$script .= \"pp.pageHandling=1;\";\n\t$script .= 'pp.printerName=\"Facturacion\";';\n\t$script .=\"print(pp);\";\n\t$script .=\"closeDoc(pp);\";\n\t$script .=\" doc.Close();\";\n $this->IncludeJS($script);\n}",
"public function print(Printer $printer): string\n {\n return $this->withLocale($this->locale, function () use ($printer) {\n Container::getInstance()->call([$this, 'build']);\n\n return $printer->print($this->view, $this->buildViewData());\n });\n\n }",
"function _setPrinted()\r\n {\r\n $this->_printed = true;\r\n }",
"public function printDialog() { }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display the specified Planmaintenance. | public function show($id)
{
$planmaintenance = $this->planmaintenanceRepository->find($id);
if (empty($planmaintenance)) {
Flash::error('Le plan de maintenance n existe pas');
return redirect(route('planmaintenances.index'));
}
return view('planmaintenances.show')->with('planmaintenance', $planmaintenance);
} | [
"public static function displayMaintenance() {\n\n\t\t\tself::display('Main/Status/Maintenance', 'STATUS_TITLE_MAINTENANCE', STATUS_CODE_503);\n\t\t}",
"function showMaintenanceCP() {\r\n\thtml_rsg2_maintenance::showMaintenanceCP();\r\n}",
"public function plansAction()\n {\n $this->view('admin/plans', [], 'admin');\n }",
"public function edit(Maintenance $maintenance)\n {\n Gate::authorize('access', 'admin');\n\n return view('maintenances.edit', compact('maintenance'));\n }",
"public function showAction(BonPlan $bonPlan)\n {\n $deleteForm = $this->createDeleteForm($bonPlan);\n\n return $this->render('bonplan/show.html.twig', array(\n 'bonPlan' => $bonPlan,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"private function getMaintenanceView()\n {\n return $this->twig->render(PageController::BASE_VIEW_FOLDER . 'maintenance.html.twig', [\n 'page' => $this->maintenancePage\n ]);\n }",
"protected function displayMaintenancePage()\n {\n }",
"function maintenance()\n {\n // Display Maintenance message\n $data['header'] = $this->lang->line('backendpro_under_maintenance');\n $data['content'] = \"<h3>\" . $data['header'] . \"</h3>\";\n $data['content'] .= \"<p>\" . $this->preference->item('maintenance_message') . \"</p>\";\n $data['content'] .= \"<p>\" . $this->lang->line('backendpro_maintenance_login') . \"</p>\";\n $this->load->view($this->_container,$data);\n }",
"public function viewplans() {\n //ensure admin is loggedin\n $admin = $this->Admins->find('all')->where(['user_id' => $this->Auth->user('id')])->first();\n\n if (!$admin) {\n $this->Flash->error('Please login to continue.');\n return $this->redirect(['controller' => 'Users', 'action' => 'login']);\n }\n $this->set('admin', $admin);\n $plans_table = TableRegistry::get('Plans');\n $all_plans = $plans_table->find();\n\n $this->set('all_plans', $all_plans);\n $this->viewBuilder()->layout('adminbackend');\n }",
"public function showAction(FloorPlans $floorPlan)\n {\n $deleteForm = $this->createDeleteForm($floorPlan);\n\n return $this->render('floorplans/show.html.twig', array(\n 'floorPlan' => $floorPlan,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function view_plans(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_PATH);\n\t\t}else {\n\t\t\t$plan_id = $this->uri->segment(4,0);\n\t\t\t$condition = array('id' => $plan_id);\n\t\t\t$this->data['plans_details'] = $this->plans_model->get_all_details(PLANS,$condition);\n\t\t\tif ($this->data['plans_details']->num_rows() <=0){\n\t\t\t\tredirect(ADMIN_PATH);\n\t\t\t}\n\t\t\t\n\t\t\t$this->data['heading'] = 'View Plans';\n\t\t\t$this->load->view(ADMIN_PATH.'/plans/view_plans',$this->data);\n\t\t}\n\t}",
"public function showAction(Planificacion $planificacion)\n {\n $deleteForm = $this->createDeleteForm($planificacion);\n\n return $this->render('@Frontend/Planificacion/show.html.twig', array(\n 'planificacion' => $planificacion,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function planParty()\n { \n $this->layout->content = View::make('coordinator.plan');\n }",
"public function showAction(Planillas $planilla)\n {\n $deleteForm = $this->createDeleteForm($planilla);\n\n return $this->render('planillas/show.html.twig', array(\n 'planilla' => $planilla,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"function view_disposal_plan()\n {\n $urldata = $this->uri->uri_to_assoc(3, array('m', 'i'));\n $data = assign_to_data($urldata); \n $data = add_msg_if_any($this, $data);\n \n # Pick all assigned data\n $searchstring2 = '';\n $pde = $this->session->userdata('pdeid');\n $userid = $this->session->userdata('userid');\n $isadmin = $this->session->userdata('isadmin');\n\n \n $searchstring = \" 1=1 \"; \n \n if($isadmin == 'N')\n {\n $searchstring .= \" AND b.userid=\".$userid.\" and b.pde=\".$pde.\" \";\n }\n $searchstring .= \" AND a.isactive='Y' order by a.dateadded DESC \";\n\n \n $data['disposal_plans'] = $this -> disposal -> fetch_disposal_plans($data,$searchstring);\n\n #exit($this->db->last_query());\n\n \n $data['page_title'] = 'View Disposal Plans ';\n $data['current_menu'] = 'view_disposal_plans';\n $data['view_to_load'] = 'disposal/view_disposal_plans_v';\n $data['view_data']['form_title'] = $data['page_title'];\n $data['search_url'] = 'disposal/search_disposal_plans';\n $this->load->view('dashboard_v', $data);\n }",
"public function plan()\n {\n return view('menu.plan')->with('location', 'plan');\n }",
"function activateClinicPlan(){\n $clinic_id = $this->clinicInfo(\"clinic_id\");\n if( is_numeric($clinic_id) ) {\n $plan_id = $this->value('plan_id');\n \n if( is_numeric($plan_id)){\n \n //Get plan status\n $query = \"select is_public from plan where plan_id = '{$plan_id}' \"; \n $result = @mysql_query($query);\n if( $row = @mysql_fetch_array($result) ){\n $is_public = $row['is_public'];\n }\n if( (is_null($is_public) || $is_public != 1) && $this->value('act') == 'publish' ){\n $this->copy_plan_to_all_account_clinic($clinic_id, $plan_id);\n $is_public_sql = \" ,is_public = 1 \";\n }\n else{\n $is_public_sql = \"\";\n }\n \n $query = \" update plan set status = 1 $is_public_sql where plan_id = '{$plan_id}' \"; \n @mysql_query($query);\n }\n //unset($_SESSION['plan_id']);\n \n }\n // Redirect to Home page.\n header(\"location:index.php?action=therapist\");\n \n \n }",
"public function index()\n\t{\n\t\t$maintenances = Maintenance::all();\n\n\t\treturn View::make('maintenances.index', compact('maintenances'));\n\t}",
"public function display_astreintes_smc_maintenance(){\r\n\t\t\t\r\n\t\t\t// echo \"display_astreintes_smc_maintenance controller <br> \";\r\n\r\n\t\t\t$lundi_frm_client = $this->input->post('date_lundi');\r\n\t\t\t$month_frm_client = $this->input->post('month');\r\n\t\t\t$year_frm_client = $this->input->post('year');\r\n\r\n\t\t\tif ($lundi_frm_client<10) {\r\n\r\n\t\t\t\t$lundi_frm_client = '0'.$lundi_frm_client;\r\n\t\t\t}\r\n\r\n\t\t\t/*if ($month_frm_client<10) {\r\n\r\n\t\t\t\t$month_frm_client = '0'.$month_frm_client;\r\n\t\t\t}*/\r\n\r\n\t\t\t$server_date = $year_frm_client.'-'.$month_frm_client.'-'.$lundi_frm_client;\r\n\t\t\t// echo 'maintenance__ date sent to the server: '.$server_date.'/';\r\n\r\n\t\t\t$periode = $this->astrnt_model->get_corresponding_period($server_date);\r\n\t\t\t//print_r($periode);\r\n\r\n\t\t\tif ($periode == null) {\r\n\t\t\t\t\r\n\t\t\t\techo 'Aucune astreinte programmée pour cette période.';\r\n\t\t\t}else{\r\n\t\t\t\t/*echo 'periode concerned: ';\r\n\t\t\t\techo 'periode: '.$periode[0]->periode_id;*/\r\n\t\t\t\t$periode_id = $periode[0]->periode_id;\r\n\t\t\t\t$this->astrnt_model->display_smc_maintenance_planning($periode_id);\r\n\r\n\t\t\t\t// echo $plannings;\r\n\t\t\t}\r\n\t\t\t//test de la date avec format du serveur \r\n\t\t\t// $maintenance_rot = $this->\r\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds and exports data which could be used to identify a person from WC Credits data associated with an email address. Users data are exported in blocks of 10 to avoid timeouts. | public static function credits_users_data_exporter( $email_address, $page ) {
$done = false ;
$data_to_export = array() ;
$user = get_user_by( 'email', $email_address ) ; // Check if user has an ID in the DB to load stored personal data.
if ( $user instanceof WP_User ) {
$credits_ids = get_posts( array(
'post_type' => 'wc_cs_credits',
'post_status' => 'all',
'numberposts' => self::$batch_limit,
'page' => absint( $page ),
'fields' => 'ids',
'meta_key' => '_user_email',
'meta_value' => $email_address,
) ) ;
if ( 0 < count( $credits_ids ) ) {
foreach ( $credits_ids as $id ) {
$credits = _wc_cs_get_credits( $id ) ;
$data_to_export[] = array(
'group_id' => 'wc_cs_credits',
'group_label' => __( 'Credits for Woocommerce', 'credits-for-woocommerce' ),
'item_id' => "credits-{$id}",
'data' => self::get_personal_data( $credits ),
) ;
}
$done = 10 > count( $credits_ids ) ;
} else {
$done = true ;
}
}
return array(
'data' => $data_to_export,
'done' => $done,
) ;
} | [
"public function exportData(){\n\n\t\t//Login & valid password required\n\t\tuser_login_required();\n\t\tcheck_post_password(userID, \"password\");\n\n\t\t//Generate and get data set\n\t\t$data = components()->account->export(userID);\n\n\t\t//Process data set\n\n\n\t\t//Find the users to fetch information about too\n\t\t$users = array();\n\t\t$add_user_id = function(int $userID, array &$list){\n\t\t\tif(!in_array($userID, $list))\n\t\t\t\t$list[] = $userID;\n\t\t};\n\t\t\n\t\t//Friends\n\t\tforeach($data[\"friends_list\"] as $friend)\n\t\t\t$add_user_id($friend->getFriendID(), $users);\n\t\t\n\t\t//Posts\n\t\tforeach($data[\"posts\"] as $num => $post){\n\t\t\t$add_user_id($post->get_userID(), $users);\n\n\t\t\t//Process post comments\n\t\t\tif($post->has_comments()){\n\t\t\t\tforeach($post->get_comments() as $comment)\n\t\t\t\t\t$add_user_id($comment->get_userID(), $users);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t//Comments\n\t\tforeach($data[\"comments\"] as $num => $comment)\n\t\t\t$add_user_id($comment->get_userID(), $users);\n\t\t\n\t\t//Conversation members\n\t\tforeach($data[\"conversations_list\"] as $num => $conversation){\n\t\t\tforeach($conversation->get_members() as $member)\n\t\t\t\t$add_user_id($member, $users);\n\t\t}\n\n\t\t//Conversation messages\n\t\tforeach($data[\"conversations_messages\"] as $num => $conversation){\n\t\t\tforeach($conversation as $message)\n\t\t\t\t$add_user_id($message->get_userID(), $users);\n\t\t}\n\n\t\t//Fetch information about related users\n\t\t$data[\"users_info\"] = components()->user->getMultipleUserInfos($users);\n\n\n\n\n\t\t//Prepare API return\n\t\t//Advanced user information\n\t\t$data[\"advanced_info\"] = userController::advancedUserToAPI($data[\"advanced_info\"]);\n\n\t\t//Posts\n\t\tforeach($data[\"posts\"] as $num => $post)\n\t\t\t$data[\"posts\"][$num] = PostsController::PostToAPI($post);\n\t\t\n\t\t//Comments\n\t\tforeach($data[\"comments\"] as $num => $comment)\n\t\t\t$data[\"comments\"][$num] = CommentsController::commentToAPI($comment);\n\n\t\t//Likes\n\t\tforeach($data[\"likes\"] as $num => $like)\n\t\t\t$data[\"likes\"][$num] = LikesController::UserLikeToAPI($like);\n\t\t\n\t\t//Survey responses\n\t\tforeach($data[\"survey_responses\"] as $num => $response)\n\t\t\t$data[\"survey_responses\"][$num] = SurveysController::SurveyResponseToAPI($response);\n\t\t\n\t\t//Movies\n\t\tforeach($data[\"movies\"] as $num => $movie)\n\t\t\t$data[\"movies\"][$num] = MoviesController::MovieToAPI($movie);\n\n\t\t//All conversations messages from user\n\t\tforeach($data[\"all_conversation_messages\"] as $num => $message)\n\t\t\t$data[\"all_conversation_messages\"][$num] = ConversationsController::ConvMessageToAPI($message);\n\n\t\t//Conversations list\n\t\tforeach($data[\"conversations_list\"] as $num => $conversation)\n\t\t\t$data[\"conversations_list\"][$num] = ConversationsController::ConvInfoToAPI($conversation);\n\t\t\n\t\t//Conversation messages\n\t\tforeach($data[\"conversations_messages\"] as $convID=>$messages){\n\t\t\tforeach($messages as $num=>$message)\n\t\t\t\t$data[\"conversations_messages\"][$convID][$num] = ConversationsController::ConvMessageToAPI($message); \n\t\t}\n\n\t\t//Friends list\n\t\tforeach($data[\"friends_list\"] as $num => $friend)\n\t\t\t$data[\"friends_list\"][$num] = friendsController::parseFriendAPI($friend);\n\n\t\t//Users information\n\t\tforeach($data[\"users_info\"] as $num => $user)\n\t\t\t$data[\"users_info\"][$num] = userController::userToAPI($user);\n\t\t\n\t\treturn $data;\n\t\n\t}",
"function itg_event_registration_users_list_download() {\n $node_event = node_load(arg(3));\n if ($node_event->type == 'event_backend') {\n $registered_user_nids = itg_common_select_field_value('entity_id', 'field_data_field_story_source_id', 'field_story_source_id_value', $node_event->nid);\n $file = 'users_list_csv';\n $users_list_csv = \"Name\" . \",\" . \"Email\" . \",\" . \"Mobile\" . \",\" . \"Company\" . \",\" . \"Designation\" . \",\" . \"City\" . \",\" . \"State\" . \",\" . \"Registration Date\" . \"\\n\\r\\0\";\n $i = 0;\n foreach ($registered_user_nids as $main_user_nid) {\n $node = node_load($main_user_nid);\n if (!empty($node->field_erf_registration_fee[LANGUAGE_NONE])) {\n $j = 0;\n foreach ($node->field_erf_registration_fee[LANGUAGE_NONE] as $group_user_arr) {\n $field_collection_id = $group_user_arr['value'];\n $entity = entity_load('field_collection_item', array($field_collection_id));\n $data[$i][$j]['name'] = $entity[$field_collection_id]->field_erf_name[LANGUAGE_NONE][0]['value'];\n $data[$i][$j]['email'] = $entity[$field_collection_id]->field_erf_email[LANGUAGE_NONE][0]['value'] ? $entity[$field_collection_id]->field_erf_email[LANGUAGE_NONE][0]['value'] : '-';\n $data[$i][$j]['mobile'] = $entity[$field_collection_id]->field_erf_mobile[LANGUAGE_NONE][0]['value'] ? $entity[$field_collection_id]->field_erf_mobile[LANGUAGE_NONE][0]['value'] : '-';\n $data[$i][$j]['company'] = $entity[$field_collection_id]->field_erf_company_name[LANGUAGE_NONE][0]['value'] ? $entity[$field_collection_id]->field_erf_company_name[LANGUAGE_NONE][0]['value'] : '-';\n $data[$i][$j]['designation'] = $entity[$field_collection_id]->field_erf_designation[LANGUAGE_NONE][0]['value'] ? $entity[$field_collection_id]->field_erf_designation[LANGUAGE_NONE][0]['value'] : '-';\n $data[$i][$j]['city'] = $entity[$field_collection_id]->field_erf_city[LANGUAGE_NONE][0]['value'] ? $entity[$field_collection_id]->field_erf_city[LANGUAGE_NONE][0]['value'] : '-';\n $data[$i][$j]['state'] = $entity[$field_collection_id]->field_erf_state[LANGUAGE_NONE][0]['value'] ? $entity[$field_collection_id]->field_erf_state[LANGUAGE_NONE][0]['value'] : '-';\n $data[$i][$j]['rdate'] = $node->created ? $node->created : '-';\n $data_date = format_date($data[$i][$j]['rdate'], $type = 'custom_date_d_m_y_', $format = '', $timezone = NULL, $langcode = NULL);\n $users_list_csv .= $data[$i][$j]['name'] . \",\" . $data[$i][$j]['email'] . \",\" . $data[$i][$j]['mobile'] . \",\". $data[$i][$j]['company'] . \",\" . $data[$i][$j]['designation'] . \",\" . $data[$i][$j]['city'] . \",\" . $data[$i][$j]['state'] . \",\" . $data_date . \"\\n\\r\\0\";\n $j++;\n }\n }\n $i++;\n }\n $filename = $file . \"_\" . date(\"d-m-Y:i\", time());\n header('Content-Description: File Transfer');\n header('Content-Type: application/force-download');\n header('Content-Disposition: attachment; filename='.$filename.'.csv');\n print $users_list_csv;\n }\n}",
"function pmpro_personal_data_exporter( $email_address, $page = 1 ) {\n\tglobal $wpdb;\n\n\t$data_to_export = array();\n\n\t// What user is this?\n\t$user = get_user_by( 'email', $email_address );\n\n\tif( !empty( $user ) ) {\n\t\t// Add data stored in user meta.\n\t\t$personal_user_meta_fields = pmpro_get_personal_user_meta_fields();\n\t\t$sqlQuery = $wpdb->prepare( \n\t\t\t\"SELECT meta_key, meta_value\n\t\t\t FROM {$wpdb->usermeta}\n\t\t\t WHERE user_id = %d\n\t\t\t AND meta_key IN( [IN_CLAUSE] )\", intval( $user->ID ) );\n\t\t\n\t\t$in_clause_data = array_map( 'esc_sql', array_keys( $personal_user_meta_fields ) );\n\t\t$in_clause = \"'\" . implode( \"', '\", $in_clause_data ) . \"'\";\t\n\t\t$sqlQuery = preg_replace( '/\\[IN_CLAUSE\\]/', $in_clause, $sqlQuery );\n\t\t\n\t\t$personal_user_meta_data = $wpdb->get_results( $sqlQuery, OBJECT_K );\n\t\t\n\t\t$user_meta_data_to_export = array();\n\t\tforeach( $personal_user_meta_fields as $key => $name ) {\n\t\t\tif( !empty( $personal_user_meta_data[$key] ) ) {\n\t\t\t\t$value = $personal_user_meta_data[$key]->meta_value;\n\t\t\t} else {\n\t\t\t\t$value = '';\n\t\t\t}\n\n\t\t\t$user_meta_data_to_export[] = array(\n\t\t\t\t'name' => $name,\n\t\t\t\t'value' => $value,\n\t\t\t);\n\t\t}\n\n\t\t$data_to_export[] = array(\n\t\t\t'group_id' => 'pmpro_user_data',\n\t\t\t'group_label' => __( 'Paid Memberships Pro User Data' ),\n\t\t\t'item_id' => \"user-{$user->ID}\",\n\t\t\t'data' => $user_meta_data_to_export,\n\t\t);\n\t\t\n\n\t\t// Add membership history.\n\t\t$sqlQuery = $wpdb->prepare(\n\t\t\t\"SELECT * FROM {$wpdb->pmpro_memberships_users}\n\t\t\t WHERE user_id = %d\n\t\t\t ORDER BY id DESC\", intval( $user->ID ) );\n\t\t\t \n\t\t$history = $wpdb->get_results( $sqlQuery );\n\t\tforeach( $history as $item ) {\n\t\t\tif( $item->enddate === null || $item->enddate == '0000-00-00 00:00:00' ) {\n\t\t\t\t$item->enddate = __( 'Never', 'paid-memberships-pro' );\n\t\t\t} else {\n\t\t\t\t$item->enddate = date( get_option( 'date_format' ), strtotime( $item->enddate, current_time( 'timestamp' ) ) );\n\t\t\t}\n\n\t\t\t$history_data_to_export = array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Level ID', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $item->membership_id, \n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Start Date', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => date( get_option( 'date_format' ), strtotime( $item->startdate, current_time( 'timestamp' ) ) ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Date Modified', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => date( get_option( 'date_format' ), strtotime( $item->modified, current_time( 'timestamp' ) ) ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'End Date', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $item->enddate,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Level Cost', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => pmpro_getLevelCost( $item, false, true ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Status', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $item->status,\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$data_to_export[] = array(\n\t\t\t\t'group_id' => 'pmpro_membership_history',\n\t\t\t\t'group_label' => __( 'Paid Memberships Pro Membership History' ),\n\t\t\t\t'item_id' => \"memberships_users-{$item->id}\",\n\t\t\t\t'data' => $history_data_to_export,\n\t\t\t);\n\t\t}\n\n\t\t// Add order history.\n\t\t$sqlQuery = $wpdb->prepare(\n\t\t\t\"SELECT id FROM {$wpdb->pmpro_membership_orders}\n\t\t\t WHERE user_id = %d\n\t\t\t ORDER BY id DESC\", intval( $user->ID ) );\n\t\t\t \n\t\t$order_ids = $wpdb->get_col( $sqlQuery );\t\t\n\t\t\n\t\tforeach( $order_ids as $order_id ) {\n\t\t\t$order = new MemberOrder( $order_id );\n\t\t\t$order->getMembershipLevel();\n\t\t\t\n\t\t\t$order_data_to_export = array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Order ID', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->id,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Order Code', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->code,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Order Date', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => date( get_option( 'date_format' ), $order->timestamp ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Level', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->membership_level->name,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Billing Name', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->billing->name,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Billing Street', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->billing->street,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Billing City', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->billing->city,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Billing State', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->billing->state,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Billing Postal Code', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->billing->zip,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Billing Country', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->billing->country,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Billing Phone', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => formatPhone( $order->billing->phone ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Sub Total', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->subtotal,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Tax', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->tax,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Coupon Amount', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->couponamount,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Total', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->total,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Payment Type', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->payment_type,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Card Type', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->cardtype,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Account Number', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->accountnumber,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Expiration Month', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->expirationmonth,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Expiration Year', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->expirationyear,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Status', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->status,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Gateway', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->gateway,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Gateway Environment', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->gateway_environment,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Payment Transaction ID', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->payment_transaction_id,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => __( 'Subscription Transaction ID', 'paid-memberships-pro' ),\n\t\t\t\t\t'value' => $order->subscription_transaction_id,\n\t\t\t\t),\n\t\t\t\t// Note: Order notes, session_id, and paypal_token are excluded.\n\t\t\t);\n\t\t\t\n\t\t\t$data_to_export[] = array(\n\t\t\t\t'group_id' => 'pmpro_order_history',\n\t\t\t\t'group_label' => __( 'Paid Memberships Pro Order History' ),\n\t\t\t\t'item_id' => \"membership_order-{$order->id}\",\n\t\t\t\t'data' => $order_data_to_export,\n\t\t\t);\n\t\t}\t\t\n\t}\n\n\t$done = true;\n\t\n\treturn array(\n\t\t'data' => $data_to_export,\n\t\t'done' => $done,\n\t);\n}",
"public static function export_users_csv() {\n global $wpdb;\n $mepr_db = new MeprDb();\n\n if(!MeprUtils::is_mepr_admin()) { //Make sure we're an admin\n return;\n }\n\n if(isset($_GET['page']) && $_GET['page'] == 'memberpress-options' && isset($_GET['mepr-export-users-csv'])) {\n $q = \"SELECT u.ID AS user_ID, u.user_login AS username, u.user_email AS email, f.meta_value AS first_name, l.meta_value AS last_name, a1.meta_value AS address1, a2.meta_value AS address2, c.meta_value AS city, s.meta_value AS state, z.meta_value AS zip, u.user_registered AS start_date, t.expires_at AS end_date, p.post_title AS membership, t.gateway, cp.post_title AS coupon\n FROM {$wpdb->users} AS u\n LEFT JOIN {$wpdb->usermeta} AS f\n ON u.ID = f.user_id AND f.meta_key = 'first_name'\n LEFT JOIN {$wpdb->usermeta} AS l\n ON u.ID = l.user_id AND l.meta_key = 'last_name'\n LEFT JOIN {$wpdb->usermeta} AS a1\n ON u.ID = a1.user_id AND a1.meta_key = 'mepr-address-one'\n LEFT JOIN {$wpdb->usermeta} AS a2\n ON u.ID = a2.user_id AND a2.meta_key = 'mepr-address-two'\n LEFT JOIN {$wpdb->usermeta} AS c\n ON u.ID = c.user_id AND c.meta_key = 'mepr-address-city'\n LEFT JOIN {$wpdb->usermeta} AS s\n ON u.ID = s.user_id AND s.meta_key = 'mepr-address-state'\n LEFT JOIN {$wpdb->usermeta} AS z\n ON u.ID = z.user_id AND z.meta_key = 'mepr-address-zip'\n INNER JOIN {$mepr_db->transactions} AS t\n ON u.ID = t.user_id AND (t.status = 'complete' OR t.status = 'confirmed') AND (t.expires_at IS NULL OR t.expires_at = 0 OR t.expires_at >= '\".date('c').\"')\n LEFT JOIN {$wpdb->posts} AS p\n ON t.product_id = p.ID\n LEFT JOIN {$wpdb->posts} AS cp\n ON t.coupon_id = cp.ID\";\n\n // output headers so that the file is downloaded rather than displayed\n header('Content-Type: text/csv; charset=utf-8');\n header('Content-Disposition: attachment; filename=active_customers.csv');\n\n // create a file pointer connected to the output stream\n $output = fopen('php://output', 'w');\n\n // output the column headings\n fputcsv($output, array( 'User_ID',\n 'Username',\n 'Email',\n 'First Name',\n 'Last Name',\n 'Address 1',\n 'Address 2',\n 'City',\n 'State',\n 'Zip',\n 'Start Date',\n 'End Date',\n 'Subscription',\n 'Gateway',\n 'Coupon' ));\n\n // fetch the data\n $wpdb->query(\"SET SQL_BIG_SELECTS=1\");\n $rows = $wpdb->get_results($q, ARRAY_A);\n\n // loop over the rows, outputting them\n foreach($rows as $row) {\n fputcsv($output, $row);\n }\n\n // close the file and exit\n fclose($output);\n exit;\n }\n }",
"function downloadPersonalData()\n\t{\n\t\tglobal $ilUser;\n\t\t\n\t\t$ilUser->sendPersonalDataFile();\n\t}",
"function ahs_export_users($args) {\n if ( array_key_exists('ahs_export_all_data', $_REQUEST) ) {\n // remove number of records limitations\n $new_args = $args;\n $new_args['number'] = 0;\n $new_args['offset'] = 0;\n\n // avoid overwriting existing filenames\n $file = '';\n do {\n $file = '/tmp/users_export_' . date('Y-m-d_H-i-s') . '.csv';\n } while ( file_exists($file) );\n\n // create query\n $wp_user_search = new WP_User_Query( $new_args );\n $items = $wp_user_search->get_results();\n\n // open csv file\n $fp = fopen($file, 'w');\n\n $header = array(\n 'ID',\n 'user_login',\n 'user_email',\n 'first_name',\n 'last_name',\n 'roles',\n );\n\n fputcsv($fp, $header);\n\n foreach ( $items as $userid => $user_object ) {\n $data = array(\n $user_object->ID,\n $user_object->user_login,\n $user_object->user_email,\n $user_object->first_name,\n $user_object->last_name,\n implode(', ', $user_object->roles),\n );\n\n // TODO: allow reading data from other sources, like GravityForms meta, etc.\n // Maybe via apply_filter()\n\n fputcsv($fp, $data);\n }\n\n fclose($fp);\n\n $quoted = sprintf('\"%s\"', addcslashes(basename($file), '\"\\\\'));\n $size = filesize($file);\n\n header('Content-Description: File Transfer');\n header('Content-Type: text/csv');\n header('Content-Disposition: attachment; filename=' . $quoted); \n header('Content-Transfer-Encoding: binary');\n header('Connection: Keep-Alive');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Pragma: public');\n header('Content-Length: ' . $size); \n echo(file_get_contents($file));\n die();\n }\n\n return $args;\n}",
"function bp_friends_personal_data_exporter( $email_address, $page ) {\n\t$number = 50;\n\n\t$email_address = trim( $email_address );\n\n\t$data_to_export = array();\n\n\t$user = get_user_by( 'email', $email_address );\n\n\tif ( ! $user ) {\n\t\treturn array(\n\t\t\t'data' => array(),\n\t\t\t'done' => true,\n\t\t);\n\t}\n\n\t$friendships = \\BP_Friends_Friendship::get_friendships( $user->ID, array(\n\t\t'is_confirmed' => true,\n\t\t'page' => $page,\n\t\t'per_page' => $number,\n\t) );\n\n\t$user_data_to_export = array();\n\n\tforeach ( $friendships as $friendship ) {\n\t\tif ( (int) $user->ID === (int) $friendship->initiator_user_id ) {\n\t\t\t$friend_id = $friendship->friend_user_id;\n\t\t\t$user_is_initiator = true;\n\t\t} else {\n\t\t\t$friend_id = $friendship->initiator_user_id;\n\t\t\t$user_is_initiator = false;\n\t\t}\n\n\t\t$item_data = array(\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Friend', 'buddypress' ),\n\t\t\t\t'value' => bp_core_get_userlink( $friend_id ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Initiated By Me', 'buddypress' ),\n\t\t\t\t'value' => $user_is_initiator ? __( 'Yes', 'buddypress' ) : __( 'No', 'buddypress' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Friendship Date', 'buddypress' ),\n\t\t\t\t'value' => $friendship->date_created,\n\t\t\t),\n\t\t);\n\n\t\t$data_to_export[] = array(\n\t\t\t'group_id' => 'bp_friends',\n\t\t\t'group_label' => __( 'Friends', 'buddypress' ),\n\t\t\t'item_id' => \"bp-friends-{$friend_id}\",\n\t\t\t'data' => $item_data,\n\t\t);\n\t}\n\n\t// Tell core if we have more items to process.\n\t$done = count( $friendships ) < $number;\n\n\treturn array(\n\t\t'data' => $data_to_export,\n\t\t'done' => $done,\n\t);\n}",
"function wp_user_personal_data_exporter($email_address)\n {\n }",
"function download_csv()\n\t{\n\t\t$filename='members-'.date('Y-m-d').'.csv';\n\n\t\tif (function_exists('set_time_limit')) @set_time_limit(0);\n\n\t\theader('Content-type: text/csv');\n\t\tif (strstr(ocp_srv('HTTP_USER_AGENT'),'MSIE')!==false)\n\t\t\theader('Content-Disposition: filename=\"'.str_replace(chr(13),'',str_replace(chr(10),'',addslashes($filename))).'\"');\n\t\telse\n\t\t\theader('Content-Disposition: attachment; filename=\"'.str_replace(chr(13),'',str_replace(chr(10),'',addslashes($filename))).'\"');\n\n\t\t@ini_set('ocproducts.xss_detect','0');\n\n\t\t$fields=array('id','m_username','m_email_address','m_last_visit_time','m_cache_num_posts','m_pass_hash_salted','m_pass_salt','m_password_compat_scheme','m_signature','m_validated','m_join_time','m_primary_group','m_is_perm_banned','m_dob_day','m_dob_month','m_dob_year','m_reveal_age','m_language','m_allow_emails','m_allow_emails_from_staff','m_notes');\n\t\tif (addon_installed('ocf_member_avatars')) $fields[]='m_avatar_url';\n\t\tif (addon_installed('ocf_member_photos')) $fields[]='m_photo_url';\n\t\t$groups=$GLOBALS['FORUM_DRIVER']->get_usergroup_list(false,false,true);\n\t\t$member_groups_count=$GLOBALS['FORUM_DB']->query_value('f_group_members','COUNT(*)',array('gm_validated'=>1));\n\t\tif ($member_groups_count<500)\n\t\t{\n\t\t\t$member_groups=$GLOBALS['FORUM_DB']->query_select('f_group_members',array('gm_member_id','gm_group_id'),array('gm_validated'=>1));\n\t\t} else $member_groups=array();\n\t\t$cpfs=$GLOBALS['FORUM_DB']->query_select('f_custom_fields',array('id','cf_type','cf_name'),NULL,'ORDER BY cf_order');\n\t\t$member_count=$GLOBALS['FORUM_DB']->query_value('f_members','COUNT(*)');\n\t\tif ($member_count<700)\n\t\t{\n\t\t\t$member_cpfs=list_to_map('mf_member_id',$GLOBALS['FORUM_DB']->query_select('f_member_custom_fields',array('*')));\n\t\t} else\n\t\t{\n\t\t\t$member_cpfs=array();\n\t\t}\n\n\t\t$headings=$this->_get_csv_headings();\n\t\tforeach ($cpfs as $i=>$c) // CPFs take precedence over normal fields of the same name\n\t\t{\n\t\t\t$cpfs[$i]['text_original']=get_translated_text($c['cf_name'],$GLOBALS['FORUM_DB']);\n\t\t\t$headings[$cpfs[$i]['text_original']]=NULL;\n\t\t}\n\n\t\tforeach (array_keys($headings) as $i=>$h)\n\t\t{\n\t\t\tif ($i!=0) echo ',';\n\t\t\techo '\"'.str_replace('\"','\"\"',$h).'\"';\n\t\t}\n\t\techo chr(10);\n\n\t\t$at=mixed();\n\n\t\tdisable_php_memory_limit(); // Even though we split into chunks, PHP does leak memory :(\n\n\t\t$limit=get_param_integer('max',200); // Set 'max' if you don't want all records\n\n\t\t$start=0;\n\t\tdo\n\t\t{\n\t\t\t$members=$GLOBALS['FORUM_DB']->query_select('f_members',$fields,NULL,'',$limit,$start);\n\n\t\t\tif ($member_count>=700)\n\t\t\t{\n\t\t\t\t$or_list='';\n\t\t\t\tforeach ($members as $m)\n\t\t\t\t{\n\t\t\t\t\tif ($or_list!='') $or_list.=' OR ';\n\t\t\t\t\t$or_list.='mf_member_id='.strval($m['id']);\n\t\t\t\t}\n\t\t\t\t$member_cpfs=list_to_map('mf_member_id',$GLOBALS['FORUM_DB']->query('SELECT * FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_member_custom_fields WHERE '.$or_list));\n\t\t\t}\n\n\t\t\tforeach ($members as $m)\n\t\t\t{\n\t\t\t\tif (is_guest($m['id'])) continue;\n\n\t\t\t\tif ($member_groups_count>=500)\n\t\t\t\t{\n\t\t\t\t\t$member_groups=$GLOBALS['FORUM_DB']->query_select('f_group_members',array('gm_member_id','gm_group_id'),array('gm_validated'=>1,'gm_member_id'=>$m['id']));\n\t\t\t\t}\n\n\t\t\t\t$out=$this->_get_csv_member_record($member_cpfs,$m,$groups,$headings,$cpfs,$member_groups);\n\t\t\t\t$i=0;\n\t\t\t\tforeach ($out as $wider)\n\t\t\t\t{\n\t\t\t\t\tif ($i!=0) echo ',';\n\t\t\t\t\techo '\"'.str_replace('\"','\"\"',$wider).'\"';\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\techo chr(10);\n\t\t\t}\n\n\t\t\t$start+=200;\n\n\t\t\tflush();\n\t\t}\n\t\twhile (count($members)==200);\n\n\t\t$GLOBALS['SCREEN_TEMPLATE_CALLED']='';\n\t\texit();\n\t}",
"function exportUsers()\n {\n global $userdm;\n\n $bridge_users = $this->get_bridge_usernames_array();\n //get all users in the given range, return array of user data.\n $admin = $db = 1;\n include GEO_BASE_DIR . 'get_common_vars.php';\n\n $local_sql = \"SELECT ud.email, log.username, log.password\n\t\t\t\t\tFROM geodesic_userdata as ud\n\t\t\t\t\tJOIN geodesic_logins log ON ud.id = log.id\n\t\t\t\t\tWHERE ud.id !=1 AND log.status = 1\";\n $users_data = $db->getall($local_sql);\n\n if (!empty($users_data)) {\n $has_register = 0;\n $reg_failed = true;\n $this->ignore_critical_logs = true; //ignore errors\n foreach ($users_data as $user_data) {\n if ($this->bridge_user_exists($user_data['username'])) {\n $failed++;\n } else {\n if ($this->user_register($user_data)) {\n $has_register++;\n } else {\n $failed++;\n }\n }\n }\n $this->ignore_critical_logs = false;//turn off ignore errors\n if ($failed) {\n $plural = ($failed == 1) ? 'user was' : 'users were';\n $failedstr = \"<br />\\n$failed $plural not exported, probably because they already exist in {$this->name}.\";\n }\n if ($has_register) {\n $plural = ($has_register == 1) ? 'user was' : 'users were';\n $admin->userNotice(\"$has_register $plural exported to \" . $this->name . \". $failedstr\");\n } else {\n $admin->userNotice(\"None of the users were exported. $failedstr\");\n }\n }\n $this->cleanUp();\n return true;\n }",
"public function users_export()\n\t{\n\t\t$this->load->helper('download');\n\t\t\n\t\t$users = $this->users->get();\n\t\t\n\t\t$csv = '\"E-mail\";\"Имя\";\"Телефон\",;\"Адрес\";\"ИНН/КПП\";\"ОГРН/ОГРНИП\";\"Р/с\";\"БИК\";\"Пароль\";\"Скидка\"' . \"\\r\\n\";\n\t\t\n\t\tforeach ($users as $user)\n\t\t{\n\t\t\t$name\t\t\t= (empty($user->userdata->name))?\"---\":$user->userdata->name;\n\t\t\t$phone\t\t\t= (empty($user->userdata->phone))?\"---\":$user->userdata->phone;\n\t\t\t$address\t\t= (empty($user->userdata->address))?\"---\":$user->userdata->address;\n\t\t\t$corp_inn\t\t= (empty($user->userdata->corp_inn))?\"---\":$user->userdata->corp_inn;\n\t\t\t$corp_ogrn\t\t= (empty($user->userdata->corp_ogrn))?\"---\":$user->userdata->corp_ogrn;\n\t\t\t$corp_rs\t\t= (empty($user->userdata->corp_rs))?\"---\":$user->userdata->corp_rs;\n\t\t\t$corp_bik\t\t= (empty($user->userdata->corp_bik))?\"---\":$user->userdata->corp_bik;\n\t\t\t\n\t\t\t$csv .= \"\\\"{$user->email}\\\";\\\"$name\\\";\\\"тел.: $phone\\\";\\\"$address\\\";\\\"$corp_inn\\\";\\\"$corp_ogrn\\\";\\\"$corp_rs\\\";\\\"$corp_bik\\\";\\\"{$user->password}\\\";\\\"{$user->discount}\\\"\\r\\n\";\n\t\t}\n\t\t\n\t\tforce_download('2find.csv', mb_convert_encoding($csv, \"Windows-1251\", \"UTF-8\"));\n\t}",
"function wp_media_personal_data_exporter( $email_address, $page = 1 ) {\n\t// Limit us to 50 attachments at a time to avoid timing out.\n\t$number = 50;\n\t$page = (int) $page;\n\n\t$data_to_export = array();\n\n\t$user = get_user_by( 'email' , $email_address );\n\tif ( false === $user ) {\n\t\treturn array(\n\t\t\t'data' => $data_to_export,\n\t\t\t'done' => true,\n\t\t);\n\t}\n\n\t$post_query = new WP_Query(\n\t\tarray(\n\t\t\t'author' => $user->ID,\n\t\t\t'posts_per_page' => $number,\n\t\t\t'paged' => $page,\n\t\t\t'post_type' => 'attachment',\n\t\t\t'post_status' => 'any',\n\t\t\t'orderby' => 'ID',\n\t\t\t'order' => 'ASC',\n\t\t)\n\t);\n\n\tforeach ( (array) $post_query->posts as $post ) {\n\t\t$attachment_url = wp_get_attachment_url( $post->ID );\n\n\t\tif ( $attachment_url ) {\n\t\t\t$post_data_to_export = array(\n\t\t\t\tarray( 'name' => __( 'URL' ), 'value' => $attachment_url ),\n\t\t\t);\n\n\t\t\t$data_to_export[] = array(\n\t\t\t\t'group_id' => 'media',\n\t\t\t\t'group_label' => __( 'Media' ),\n\t\t\t\t'item_id' => \"post-{$post->ID}\",\n\t\t\t\t'data' => $post_data_to_export,\n\t\t\t);\n\t\t}\n\t}\n\n\t$done = $post_query->max_num_pages <= $page;\n\n\treturn array(\n\t\t'data' => $data_to_export,\n\t\t'done' => $done,\n\t);\n}",
"public function createUsersCSVFile() {\r\n \r\n global $wpdb;\r\n \r\n $table_name = $wpdb->prefix . 'coins_alerts';\r\n \r\n $emails = $wpdb->get_results(\r\n \"SELECT DISTINCT email FROM $table_name\"\r\n );\r\n \r\n $emails_list = [];\r\n \r\n if ( ! $emails ) {\r\n $emails_list[][] = 'Email';\r\n } else {\r\n \r\n $i = 0;\r\n foreach ( $emails as $email ) {\r\n\r\n $i++;\r\n\r\n if ( 1 == $i ) {\r\n $emails_list[][] = 'Email';\r\n }\r\n\r\n $emails_list[][] = $email->email;\r\n\r\n }\r\n \r\n }\r\n \r\n $fp = fopen( COINS_ALERTS_PATH . 'config/users.csv', 'w' );\r\n \r\n foreach ( $emails_list as $email ) {\r\n fputcsv( $fp, $email );\r\n }\r\n \r\n fclose( $fp );\r\n \r\n }",
"function wp_comments_personal_data_exporter($email_address, $page = 1)\n {\n }",
"public static function order_data_exporter( $email_address, $page ) {\n\t\t$done = false;\n\t\t$page = (int) $page;\n\t\t$user = get_user_by( 'email', $email_address ); // Check if user has an ID in the DB to load stored personal data.\n\t\t$data_to_export = array();\n\t\t$order_query = array(\n\t\t\t'limit' => 10,\n\t\t\t'page' => $page,\n\t\t\t'customer' => array( $email_address ),\n\t\t);\n\n\t\tif ( $user instanceof WP_User ) {\n\t\t\t$order_query['customer'][] = (int) $user->ID;\n\t\t}\n\n\t\t$orders = wc_get_orders( $order_query );\n\n\t\tif ( 0 < count( $orders ) ) {\n\t\t\tforeach ( $orders as $order ) {\n\t\t\t\t$data_to_export[] = array(\n\t\t\t\t\t'group_id' => 'woocommerce_orders',\n\t\t\t\t\t'group_label' => __( 'Orders', 'woocommerce' ),\n\t\t\t\t\t'item_id' => 'order-' . $order->get_id(),\n\t\t\t\t\t'data' => self::get_order_personal_data( $order ),\n\t\t\t\t);\n\t\t\t}\n\t\t\t$done = 10 > count( $orders );\n\t\t} else {\n\t\t\t$done = true;\n\t\t}\n\n\t\treturn array(\n\t\t\t'data' => $data_to_export,\n\t\t\t'done' => $done,\n\t\t);\n\t}",
"function reward_export_customer_certificates() {\n\tglobal $wpdb;\n\n\t$file_path = get_bloginfo('siteurl') . '/wp-content/plugins/reward-1.2/export/';\n\t$file_name = 'customercertificates_reward_export_'. date('Y_m_d_H_i_s') .'.csv';\n\t$path = RWDIR . \"export/{$file_name}\";\n\t$csv_file = (file_exists($path)) ? fopen($path, \"at\") : fopen($path, \"wt\");\t\n\n\t\n\t$records = reward_results(\n\t\t\"SELECT * \n\t\tFROM {$wpdb->prefix}rw_customer_gift_certificate\"\n\t);\n\n\tforeach( $records as $record ) {\n\n\t\t$created_at = $record->created_at;\n\t\t$updated_at = $record->updated_at;\n\t\t$expired_at = $record->expired_at;\n\n\t\tfputcsv( $csv_file, array(\n\t\t\t\"{$record->id}\",\n\t\t\t\"{$record->customer_id}\", \n\t\t\t\"{$record->group_id}\", \n\t\t\t\"{$record->gc_number}\", \n\t\t\t\"{$record->claimed}\", \n\t\t\t\"{$expired_at}\", \n\t\t\t\"{$created_at}\",\t\t\t\t\t\n\t\t\t\"{$updated_at}\"\n\t\t));\n\t}\n\n\tfclose( $csv_file );\n\n\treturn array(\n\t\t'path' => $path,\n\t\t'name' => $file_name\t\t\n\t);\t\n}",
"function cgsi_reports_membership_mailing_csv() {\n\t$data = cgsi_reports_membership_mailing_generate();\n\t$rows = array();\n\tforeach ($data as $key => $value) {\n\t\t$rows = array_merge($rows, $value['headers']);\n\t\t$rows = array_merge($rows, $value['rows']);\n\t}\n\tcgsi_reports_table_export('membership-mailing.csv', NULL, $rows);\n}",
"function bp_activity_personal_data_exporter( $email_address, $page ) {\n\t$number = 50;\n\n\t$email_address = trim( $email_address );\n\n\t$data_to_export = array();\n\n\t$user = get_user_by( 'email', $email_address );\n\n\tif ( ! $user ) {\n\t\treturn array(\n\t\t\t'data' => array(),\n\t\t\t'done' => true,\n\t\t);\n\t}\n\n\t$activities = bp_activity_get( array(\n\t\t'display_comments' => 'stream',\n\t\t'per_page' => $number,\n\t\t'page' => $page,\n\t\t'show_hidden' => true,\n\t\t'filter' => array(\n\t\t\t'user_id' => $user->ID,\n\t\t),\n\t) );\n\n\t$user_data_to_export = array();\n\t$activity_actions = bp_activity_get_actions();\n\n\tforeach ( $activities['activities'] as $activity ) {\n\t\tif ( ! empty( $activity_actions->{$activity->component}->{$activity->type}['format_callback'] ) ) {\n\t\t\t$description = call_user_func( $activity_actions->{$activity->component}->{$activity->type}['format_callback'], '', $activity );\n\t\t} elseif ( ! empty( $activity->action ) ) {\n\t\t\t$description = $activity->action;\n\t\t} else {\n\t\t\t$description = $activity->type;\n\t\t}\n\n\t\t$item_data = array(\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Activity Date', 'buddypress' ),\n\t\t\t\t'value' => $activity->date_recorded,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Activity Description', 'buddypress' ),\n\t\t\t\t'value' => $description,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Activity URL', 'buddypress' ),\n\t\t\t\t'value' => bp_activity_get_permalink( $activity->id, $activity ),\n\t\t\t),\n\t\t);\n\n\t\tif ( ! empty( $activity->content ) ) {\n\t\t\t$item_data[] = array(\n\t\t\t\t'name' => __( 'Activity Content', 'buddypress' ),\n\t\t\t\t'value' => $activity->content,\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Filters the data associated with an activity item when assembled for a WP personal data export.\n\t\t *\n\t\t * Plugins that register activity types whose `action` string doesn't adequately\n\t\t * describe the activity item for the purposes of data export may filter the activity\n\t\t * item data here.\n\t\t *\n\t\t * @since 4.0.0\n\t\t *\n\t\t * @param array $item_data Array of data describing the activity item.\n\t\t * @param BP_Activity_Activity $activity Activity item.\n\t\t */\n\t\t$item_data = apply_filters( 'bp_activity_personal_data_export_item_data', $item_data, $activity );\n\n\t\t$data_to_export[] = array(\n\t\t\t'group_id' => 'bp_activity',\n\t\t\t'group_label' => __( 'Activity', 'buddypress' ),\n\t\t\t'item_id' => \"bp-activity-{$activity->id}\",\n\t\t\t'data' => $item_data,\n\t\t);\n\t}\n\n\t// Tell core if we have more items to process.\n\t$done = count( $activities['activities'] ) < $number;\n\n\treturn array(\n\t\t'data' => $data_to_export,\n\t\t'done' => $done,\n\t);\n}",
"function report_users_csv ()\n{\n // Fetch the list of users\n\n $sql = 'SELECT Users.UserId UserId, FirstName, Nickname, LastName, Gender, EMail, CanSignup, LastLogin, ';\n $sql .= ' (SELECT Status FROM Thursday WHERE Thursday.UserId = Users.UserId AND Status = \"Paid\") ThursdayStatus,';\n $sql .= ' (SELECT SUM(Quantity) FROM DeadDog WHERE DeadDog.UserId = Users.UserId AND Status = \"Paid\") DeadDogTickets,';\n $sql .= \" (SELECT GROUP_CONCAT(CONCAT(Quantity, ' ', Size, ' ', Color, ' ', Style, ' ', IF(Quantity = 1, Singular, Plural), ' (', StoreOrders.Status, ')') SEPARATOR ', ') ShirtOrders FROM StoreOrders LEFT JOIN StoreOrderEntries ON StoreOrders.OrderId = StoreOrderEntries.OrderId LEFT JOIN StoreItems ON StoreOrderEntries.ItemId = StoreItems.ItemId WHERE StoreOrders.Status != 'Cancelled' AND StoreOrders.UserId = Users.UserId) ShirtOrders,\";\n $sql .= ' EXISTS (SELECT UserId FROM GMs WHERE UserId = Users.UserId) IsGM';\n $sql .= ' FROM Users';\n// $sql .= ' WHERE CanSignup<>\"Alumni\"';\n// $sql .= ' AND LastName<>\"Admin\"';\n $sql .= ' ORDER BY LastName, FirstName';\n\n// SELECT Users.UserId UserId, GROUP_CONCAT(CONCAT(Quantity, ' ', Size, ' ', Color, ' ', Style, ' ', Singular, ' (', StoreOrders.Status, ')') SEPARATOR ', ') ShirtOrders FROM Users LEFT JOIN StoreOrders ON StoreOrders.UserId = Users.UserId LEFT JOIN StoreOrderEntries ON StoreOrders.OrderId = StoreOrderEntries.OrderId LEFT JOIN StoreItems ON StoreOrderEntries.ItemId = StoreItems.ItemId WHERE StoreOrders.Status != 'Cancelled'\n\n $result = mysql_query ($sql);\n if (! $result)\n return display_mysql_error ('Query for users failed');\n\n $out = fopen('php://output', 'w');\n fputcsv($out, array(\"LastName\",\"FirstName\",\"Nickname\",\"PreferredCharacterGender\",\"EMail\",\"Status\",\"LastLogin\",\"ShirtOrder\",\"PreCon\",\"DeadDogTickets\",\"IsGM\"));\n\n while ($row = mysql_fetch_object ($result))\n {\n fputcsv($out, array(\n $row->LastName,\n $row->FirstName,\n $row->Nickname,\n $row->Gender,\n $row->EMail,\n $row->CanSignup,\n $row->LastLogin,\n $row->ShirtOrders,\n $row->ThursdayStatus,\n $row->DeadDogTickets,\n $row->IsGM\n ));\n }\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
unset billingReference ASBIE Debit Note Line. Billing Reference A reference to a billing document associated with this debit note line. 0..n Debit Note Line Billing Reference Billing Reference Billing Reference | public function unsetBillingReference($index)
{
unset($this->billingReference[$index]);
} | [
"public function unsetBillingReferenceLine($index)\n {\n unset($this->billingReferenceLine[$index]);\n }",
"public function unsetReceiptLineReference($index)\n {\n unset($this->receiptLineReference[$index]);\n }",
"public function unsetReferenceId(): void\n {\n $this->referenceId = [];\n }",
"public function unsetPaymentReferenceID($index)\n {\n unset($this->paymentReferenceID[$index]);\n }",
"public function unsetOrderLineReference($index)\n {\n unset($this->orderLineReference[$index]);\n }",
"public function removeBillingAddress()\n {\n $this->billingAddress = null;\n }",
"public function unsetShipmentDocumentReference($index)\n {\n unset($this->shipmentDocumentReference[$index]);\n }",
"public function unsetReceiptDocumentReference($index)\n {\n unset($this->receiptDocumentReference[$index]);\n }",
"public function unsetDealReference($index)\n {\n unset($this->dealReference[$index]);\n }",
"public function setReceiptReference($reference);",
"public function getBillingReference()\n {\n return $this->billingReference;\n }",
"public function unsetBookingReferenceID($index)\n {\n unset($this->bookingReferenceID[$index]);\n }",
"public function unsetContractDocumentReference($index)\n {\n unset($this->contractDocumentReference[$index]);\n }",
"public function unsetDealResourceReference($index)\n {\n unset($this->dealResourceReference[$index]);\n }",
"function removeReference($ref) {\n\t\treturn sql_query(\"DELETE FROM \".$this->table_ref.\" WHERE ref=\".intval($ref));\n\t}",
"protected function setInvoiceBillingReferenceIfExists(): void\n {\n $billingReferenceContent = '';\n\n $billingId = $this->invoice->invoice_billing_id ?? null;\n\n if($billingId) {\n\n $billingReferenceContent = (new GetXmlFileAction)->handle('xml_billing_reference');\n\n $billingReferenceContent = str_replace(\"SET_INVOICE_NUMBER\", $billingId, $billingReferenceContent);\n\n $this->setXmlInvoiceItem('SET_BILLING_REFERENCE', $billingReferenceContent);\n\n }\n\n $this->setXmlInvoiceItem('SET_BILLING_REFERENCE', $billingReferenceContent);\n }",
"public function unsetReleaseReference($index)\n {\n unset($this->releaseReference[$index]);\n }",
"public function removeReference() {\n\t\t$this->_refCount --;\n\t\t\n\t\tif ($this->_refCount == 0) {\n\t\t\t$this->_close ();\n\t\t}\n\t}",
"public function unsetDespatchLineReference($index)\n {\n unset($this->despatchLineReference[$index]);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes a family entity. | public function deleteAction(Request $request, Family $family)
{
$form = $this->createDeleteForm($family);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->remove($family);
$em->flush();
}
return $this->redirectToRoute('family_index');
} | [
"public function deleteFamily($tableName, $familyName);",
"public function destroy(Family $family)\n {\n //\n }",
"public function deleteAction( Tx_Timekeeping_Domain_Model_Family $family ) {\n\t\t$this->familyRepository->remove($family);\n\t\t$this->flashMessages->add(\"Die Familie {$family->getName()} wurde erfolgreich gelöscht.\");\n\n\t\t$this->redirect('index');\n\t}",
"public function delete(Entity $entity);",
"public function delete($entity);",
"function deleteFamily($idDelete) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare('UPDATE Machine SET idFamily = null WHERE idFamily = :idFamily');\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'idFamily' => $idDelete\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\t// We delete subfamilies.\n\tforeach(getSubFamilyList($idDelete) as $subFamily)\n\t\tdeleteSubFamily($subFamily['idSubFamily']);\n\n\t// Then we delete the family.\n\t$request = $DB_DB->prepare('DELETE FROM Family WHERE idFamily = :idDelete');\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'idDelete' => $idDelete\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\treturn \"\";\n}",
"public function deleting($entity)\n {\n //\n }",
"public function delete($entity) {\n\t\t$class = $this->_class;\n\t\tif (!$entity->getLocalUniqueIdentifier())\n\t\t\tthrow new Exception(\"cannot delete entity which doesn't have an ID value\");\n\t\t\n\t\t$idArray = $entity->getId();\n\t\tif (!is_array($idArray))\n\t\t\t$idArray = array($entity::getIdField() => $idArray);\n\t\t\n\t\tunset($this->_cachedEntities[$entity->getLocalUniqueIdentifier()]);\n\t\t$this->_connection->delete($class, $idArray);\n\t}",
"public function deleteEntity($entity)\n {\n return $this->model->destroy($entity->id);\n\n }",
"public function delete($personFamilyId)\n {\n DB::table('request_families')\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['id', $personFamilyId]\n ])\n ->delete();\n }",
"public function remove($entity);",
"public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }",
"public function deleted($entity)\n {\n //\n }",
"public function deleteAction(Request $request, InstrumentFamily $instrumentFamily)\n {\n $form = $this->createDeleteForm($instrumentFamily);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($instrumentFamily);\n $em->flush($instrumentFamily);\n }\n\n return $this->redirectToRoute('instrumentfamily_index');\n }",
"public function delete($idOrEntity);",
"public function deletejobfamilyAction(\\RKW\\RkwWepstra\\Domain\\Model\\JobFamily $jobFamily)\n {\n\n try {\n\n $this->wepstra->removeJobFamily($jobFamily);\n $this->jobFamilyRepository->remove($jobFamily);\n $this->persistenceManager->persistAll();\n\n // get new list\n $replacements = array(\n 'wepstra' => $this->wepstra,\n );\n\n $this->jsonHelper->setHtml(\n 'job-family-list',\n $replacements,\n 'replace',\n 'Ajax/List/Step1/JobFamily.html'\n );\n\n print (string)$this->jsonHelper;\n exit();\n //===\n\n } catch (\\Exception $e) {\n\n $this->jsonHelper->setDialogue(\n sprintf(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'tx_rkwwepstra_controller_data.error_unexpected', 'rkw_wepstra'\n ),\n $e->getMessage()\n ), 99\n );\n\n print (string)$this->jsonHelper;\n exit();\n //===\n }\n }",
"function remove($entity);",
"public function delete() \n\t\t{ \n\t\t\treturn delete_relationship($this->id); \n\t\t}",
"public function delete($entity) {\n $list = $this->getAllChildren($entity);\n //Detach all employees\n $data = array(\n 'organization' => NULL\n );\n $ids = array();\n if (strlen($list[0]['id']) > 0) {\n $ids = explode(\",\", $list[0]['id']);\n }\n array_push($ids, $entity);\n $this->db->where_in('organization', $ids);\n $res1 = $this->db->update('users', $data);\n //Delete node and its children\n $this->db->where_in('id', $ids);\n $res2 = $this->db->delete('organization');\n return $res1 && $res2;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Possible combos wpid(unsetted) > get the homepage op=obj && oid=xxxx > show the corresponding object (text, image, flash, etc) op=wbp && wpid=xxxx > build the corresponding webpage | function start ()
{
switch ($this->op)
{
case 'wbp':
require_once (D2W_SOURCE_PATH."/WebPage.php");
require_once (D2W_SOURCE_PATH."/WebObject.php");
require_once (D2W_SOURCE_PATH."/TextFilters.php");
$wp = new Webpage ($this->wpid, $this->kernel);
echo $wp->Show ();
break;
case 'obj':
require_once (D2W_SOURCE_PATH."/WebObject.php");
require_once (D2W_SOURCE_PATH."/TextFilters.php");
$wo = new WebObject ($this->oid, $this->kernel, true );
switch ($wo->classification)
{
case 'image':
echo "<div id=\"_d2w_image_container\"><div id=\"_d2w_obj_close\"><img src=\"_dir2web/_system/default/images/close.png\" alt=\"Close\"/><br/>Close</div><div id=\"_d2w_image_body\">".$wo->html_image_body."</div><p id=\"_d2w_image_caption\">".$wo->html_image_footer."</p>";
break;
case 'text':
echo "<div id=\"_d2w_text_container\"><div id=\"_d2w_obj_close\"><img src=\"_dir2web/_system/default/images/close.png\" alt=\"Close\"/><br/>Close</div><h2 id=\"_d2w_text_title\">".$wo->html_text_title."</h2><div id=\"_d2w_text_body\">".$wo->html_text_body."</div><p id=\"_d2w_text_footer\">".$wo->html_text_footer."</p>";
break;
}
break;
case 'prv':
header('Content-Type: image/jpeg');
$img = $this->kernel->getPreview ($this->oid);
echo $img[0]['preview'];
flush();
exit;
break;
case 'dwn':
// send the object
$fileInfo = $this->kernel->getObjectInfo($this->oid);
// DOWNLOAD generic file
header("Pragma: public");
header("Expires: 0");
header("Content-Type: application/force-download");
header("Content-Description: File Transfer");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($fileInfo['path']));
header("Content-Disposition: attachment; filename=\"".$fileInfo['name'].".".$fileInfo['type']."\";");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private", false);
readfile($fileInfo['path']);
flush();
exit;
break;
}
} | [
"function preg_get_handle_by_webid($array) {\n $webid = urldecode($array[1]);\n if (preg_match('/^http(s?):/', $webid)) {\n $person = new MyProfile($webid, BASE_URI, SPARQL_ENDPOINT);\n $person->load();\n $name = $person->get_name();\n $nick = $person->get_nick();\n \n $ret = ' <a href=\"view.php?webid=' . urlencode($webid) . '\">';\n $ret .= ($nick != null) ? '@' . $nick : '@' . $name;\n $ret .= '</a>';\n return $ret;\n }\n}",
"function _page_getPage($page_id,$objects=NULL) {\n\t$page_record = array();\t\t\t\t## holds all data\n\tif(is_array($objects)) {\n\t\twhile (list ($key, $val) = each ($objects)) { \n\t\t\tswitch($key) {\n\t\t\t\tcase 'COPYTEXT':\n\t\t\t\tcase 'TEXT':\n\t\t\t\tcase 'LINKLIST':\n\t\t\t\tcase 'LISTVIEW':\n\t\t\t\tcase 'IMAGE':\n\t\t\t\tcase 'FILE':\n\t\t\t\tcase 'BOX':\n\t\t\t\tcase 'DATE':\n\t\t\t\tcase 'INCLUDE':\t\t\t\n\t\t\t\tcase 'LINK': {\n\t\t\t\t\t## get the elements\n\t\t\t\t\t$target = strtolower($key);\n\t\t\t\t\teval(\"\\$element = \".$target.\"_getData(\\$page_id,\\$page_record);\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\n\t\t\t\tdefault: {\n\t\t\t\t\t## check if a module exists, if yes we load the data\n\t\t\t\t\t$target = strtolower($key);\n\t\t\t\t\t@include_once(ENGINE.\"datatypes/extra_\".$target.\"/\".$target.\".php\");\n\n\t\t\t\t\t## now we check if the function exists\n\t\t\t\t\tif(function_exists($target.\"_getData\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\teval(\"\\$element = \".$target.\"_getData(\\$page_id,\\$page_record);\");\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\t\t\t\t\n\t\t}\n\t}\t\n\treturn $page_record;\n}",
"function parse_owner_page($url){\n\n\n\n\n\n\n\n\n\n\n}",
"function NsisWebInstance($param,$fetch_mode = 0)\n {\n $this->private_info['instanceid'] = 0;\n if(is_array($param)) {\n $this->private_info = $param;\n } else if(is_object($param) && strcasecmp(get_class($param),'NsisWebPage') == 0) {\n $this->private_info = array(\n 'instanceid' => 0,\n 'pageid' => $param->get_pageid(),\n 'sequence' => 1,\n 'parentid' => 0,\n 'page' => $param);\n } else {\n global $nsisweb;\n if($fetch_mode == 0) {\n $record = $nsisweb->query_one_only('select instanceid,pageid,parentid,sequence from nsisweb_hierarchy where instanceid='.(int)$param,__FILE__,__LINE__);\n if($record) {\n $this->private_info = $record;\n $this->private_info['page'] = FALSE;\n }\n } else {\n $instance_fields = 'a.instanceid,a.pageid,a.parentid,a.sequence';\n $page_fields = 'b.author,b.last_author,b.created,b.last_updated,b.title,b.type,b.views,b.rating,b.votes';\n\n switch($fetch_mode) {\n case FETCH_CONTENT_YES: $page_fields .= ',b.source'; break;\n case FETCH_CONTENT_PP: $page_fields .= ',b.ppsource'; break;\n case FETCH_CONTENT_BOTH: $page_fields .= ',b.source,b.ppsource'; break;\n }\n\n $record = $nsisweb->query_one_only(\"select $instance_fields,$page_fields from nsisweb_hierarchy as a,nsisweb_pages as b where a.instanceid=\".(int)$param.' and b.pageid=a.pageid',__FILE__,__LINE__);\n $page_details = array(\n 'pageid' => $record['pageid'],\n 'author' => $record['author'],\n 'last_author' => $record['last_author'],\n 'created' => $record['created'],\n 'last_updated' => $record['last_updated'],\n 'title' => $record['title'],\n 'type' => $record['type'],\n 'views' => $record['views'],\n 'rating' => $record['rating'],\n 'votes' => $record['votes']);\n \n switch($fetch_mode) {\n case FETCH_CONTENT_YES: $page_details['source'] = $record['source']; break;\n case FETCH_CONTENT_PP: $page_details['ppsource'] = $record['ppsource']; break;\n case FETCH_CONTENT_BOTH: \n $page_details['source'] = $record['source'];\n $page_details['ppsource'] = $record['ppsource'];\n break;\n }\n \n $this->private_info = array(\n 'instanceid' => $record['instanceid'],\n 'pageid' => $record['pageid'],\n 'parentid' => $record['parentid'],\n 'sequence' => $record['sequence'],\n 'page' => new NsisWebPage($page_details));\n }\n }\n }",
"public function web_page_by_id(){\n\t\t$postData = $this->request->input('json_decode',true);\n\t\t$this->WebPage->tablePrefix = $postData['tablePrefix'];\n\t\t$this->WebPage->WebPageDetail->tablePrefix = $postData['tablePrefix'];\n\t\t$data = $this->WebPage->find('first',array(\n\t\t\t'conditions'=>array(\n\t\t\t\t'slug' => $postData['slug']\n\t\t\t)\n\t\t));\n\t\t$this->set(\n\t\t\t\tarray(\n\t\t\t\t\t'_serialize',\n\t\t\t\t\t'data' => array('singlePage'=>$data),\n\t\t\t\t\t'_jsonp' => true\n\t\t\t\t)\n\t\t);\n\t\t$this->render('data_layout');\n\t}",
"function getCmdUrlToShowContent()\n\t{\n\t\tglobal $ilUser, $ilCtrl, $ilDB, $ilAccess;\n\t\t$rm_ID = $this->getrmId();\n\t\tif ($rm_ID == null) {echo \"no room id\";die();}\n\t\t$user_id=$ilUser->getID();\n\t\t$user_login = $ilUser->getlogin();\n\t\t$user_firstname = $ilUser->getFirstname();\n\t\t$user_lastname = $ilUser->getLastname();\n\t\t$user_language = $ilUser->getCurrentLanguage();\n\t\t$user_email = $ilUser->getEmail();\n\t\t$user_image = substr($ilUser->getPersonalPicturePath($a_size = \"xsmall\", $a_force_pic = true),2);\n\t\tif (substr($user_image,0,2) == './') $user_image = substr($user_image,2);\n\t\t$user_image = ILIAS_HTTP_PATH.'/'.$user_image;\n\t\tinclude_once(\"./Customizing/global/plugins/Services/Repository/RepositoryObject/Openmeetings/classes/class.ilOpenmeetingsREST.php\");\n\t\t$this->WSDL = new ilOpenmeetingsREST();\n\t\t$this->WSDL->openmeetings_loginuser();\n\t\t$om = $this->WSDL->openmeetings_getRoomById($rm_ID);\n\t\tif ($om !=-1) {\n\t\t\t$this->setOpenmeetingsObject($om);\n\t\t} else {\n\t\t\techo \"failure reading data for openmeetings room\";\n\t\t\tdie();\n\t\t}\n\t\t$i_allowRecording = 0;\n\t\t$moderator=0;\n\t\tif ($this->getrmIsModerated() == 1) {\n\t\t\tif ($ilAccess->checkAccess(\"write\", \"\", $this->getRefId())) {\n\t\t\t\t$moderator=1;\n\t//\t\t\t$ilDB->query(\"INSERT INTO rep_robj_xomv_debug VALUES ('moderator: \".$moderator.\"')\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t$secHash = $this->WSDL->openmeetings_setUserObjectAndGenerateRoomHashByURLAndRecFlag($user_login,$user_firstname,$user_lastname,$user_image, $user_email,$user_id,\"ILIAS\",$rm_ID,$moderator,$i_allowRecording);\n\t\t\n\t\t$cmdURL = $this->WSDL->getUrl().\"/?\". \"secureHash=\" . $secHash;\n\t\treturn $cmdURL;\n\t}",
"function getDetail($content_id, $SourceURL, $pid, $content_title, $siteID\t=\t'dd95', $SiteName = 'driversdown.com', $arr_param)\n\t{\n//\t\t$SourceURL\t=\t'http://www.driversdown.com/drivers/nVIDIA-nForce-680i-780i-SLI-nForce-System-Tools-6.00-Windows-XP%28x32-x64%29-Vista%28x32-x64%29_84567.shtml';\n\t\techo $SourceURL;\n\t\techo '<hr />';\n\t\t\n\t\t$obj_article \t=\tnew DIRsoftware();\n\t\t\n\t\t$obj_content\t=\t$obj_article->get($content_id);\n\t\t$date = JFactory::getDate();\n\t\t\n\t\t$root\t=\t'http://www.driversdown.com/';\n\t\t$href\t=\tnew href();\t\t\n\t\t\t\t\n\t\t$browser\t=\tnew phpWebHacks();\n\t\t$response\t=\t$browser->get($SourceURL);\n\t\t$html\t\t=\tloadHtmlString($response);\n\n\t\t$article\t=\tnew stdClass();\t\t\n\t\t///////////////////////////////////////////////////////////\n\t\t////\tGET INFO ///////////////////////////////\n\t\t$Tag_whitelist='<p><br><hr><blockquote>'.\n\t\t\t\t\t\t\t\t\t'<b><i><u><sub><sup><strong><em><var>'.\n\t\t\t\t\t\t\t\t\t'<code><xmp><cite><pre><abbr><acronym><address><samp>'.\n\t\t\t\t\t\t\t\t\t'<fieldset><legend>'.\n\t\t\t\t\t\t\t\t\t'<img><h1><h2><h3><h4><h4><h5><h6>'.\n\t\t\t\t\t\t\t\t\t'<ul><ol><li><dl><dt><frame><frameset>';\n\t\tprint_debug(2,'BEGIN get info');\n\t\t$article->id\t\t=\t$content_id;\n\t\t$article->pid\t\t=\t$pid;\n\t\t$article->SourceURL\t\t=\t$SourceURL;\n\t\t\n\t\t$cnnT1cCol1\t\t=\t$html->find('div[id=\"cnnT1cCol1\"]',0);\n\t\t$cnnT1cCol1\t\t=\tremoveTag($cnnT1cCol1, 'script');\n\t\t\n\t\t$info\t=\t$cnnT1cCol1->find('div[class=\"downinfoleft\"]',0)->innertext;\n\t\t$infos\t=\texplode('<br>',$info);\n\t\t\n\t\t$article->FileSize\t=\t$infos[0];\n\t\tfor ($i=0; $i<count($infos); $i++)\n\t\t{\n\t\t\t$info\t=\t$infos[$i];\n\t\t\tif (preg_match('/Size:\\s*<span[^>]*>([\\d\\.]+)\\s*(B|KB|MB|GB|TB|PB)<\\/span>/ism',$info, $mathces))\n\t\t\t{\n\t\t\t\t$article->FileSize \t\t=\tconvert_file_size($mathces[1],$mathces[2],'B');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (preg_match('/System:\\s*<span[^>]*>(.*?)<\\/span>/ism',$info, $mathces))\n\t\t\t{\n\t\t\t\t$article->Requirement\t=\t$mathces[1];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (preg_match('/Updatetime:\\s*<span[^>]*>(.*?)<\\/span>/ism',$info, $mathces))\n\t\t\t{\n\t\t\t\t$time \t \t\t\t\t=\tstrtotime(trim(strip_tags($mathces[1])));\n\t\t\t\t$time \t\t\t\t\t=\tdate('Y-m-d H:i:s',$time); \n\t\t\t\t$article->Add_Date \t \t=\t$time;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (preg_match('/Total:\\s*<span[^>]*>(.*?)<\\/span>/ism',$info, $mathces))\n\t\t\t{\n\t\t\t\t$article->TotalDownload \t=\t$mathces[1];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$article->ProductName\t=\t$obj_content->ProductName;\n\t\t$article->version\t\t=\t$obj_content->version;\n\t\tif ($cnnT1cCol1->find('div[class=\"downadress\"]',0)) {\n\t\t\t\n\t\t\t$downadress\t=\t$cnnT1cCol1->find('div[class=\"downadress\"]',0)->innertext;\t\n\t\t\tif (preg_match('/window\\.open\\(\\'(.*?)\\'\\)/ism', $downadress, $mathces)) {\n\t\t\t\t$article->DestURL\t\t=\tstr_replace('../','',$href->process_url($mathces[1], $root));\n\t\t\t\t$article->DownloadURL\t=\tstr_replace('../','',$href->process_url($mathces[1], $root));\n\t\t\t}\n\t\t}\n\n\t\t$cnnT1cCol1->find('div[class=\"biaoti\"]',0)->outertext = '';\n\t\t$cnnT1cCol1->find('div[class=\"downinfoleft\"]',0)->outertext = '';\n\t\t$cnnT1cCol1->find('div[class=\"downinforight\"]',0)->outertext = '';\n\t\t$cnnT1cCol1->find('div[class=\"clear\"]',0)->outertext = '';\n\t\t$cnnT1cCol1->find('div[class=\"downadress\"]',0)->outertext = '';\n\t\t$desc\t=\t$cnnT1cCol1->innertext;\t\t\n\t\t$desc\t=\tpreg_replace('/<b[^>]*>\\s*Content\\:\\s*<\\/b>/ism','',$desc);\t\n\t\t$obj_cuttext\t=\tnew AutoCutText($desc,10);\n\t\t$article->ShortDesc\t=\ttrim(strip_tags($obj_cuttext->getIntro()));\n\t\t$article->LongDesc\t=\ttrim(($desc));\n\t\t$article->LongDesc\t=\tpreg_replace('/<span[^>]*>\\s*<\\/span>/ism','',$article->LongDesc);\n\t\t$article->LongDesc\t=\tpreg_replace('/(<br[^>]*>\\s*){2,}/ism','<br />',$article->LongDesc);\n\n\t\t$checkSum\t=\t'';\n\t\t///////////////////////////////////////////////////////////\n\t\t////\tGET IMAGES\t///////////////////////////////////////\n\t\tprint_debug(2,'BEGIN get Images');\n\t\t\tmosGetImages($article, $root, $arr_images, $arr_param['patch_image'], $arr_param['root_image']);\n\t\tprint_debug(2,'END get Images');\n\n\t\t///////////////////////////////////////////////////////////\n\t\t////\tSTORE IMAGES\t//////////////////////////////////\n\t\tprint_debug(2,'BEGIN store Images');\n\t\tfor ($i=0; $i<count($arr_images); $i++)\n\t\t{\n\t\t\t$image\t=\t$arr_images[$i];\n\t\t\t$image->siteID \t= $siteID;\n\t\t\t$image->type\t= 2;\n\t\t\t$image->pid\t\t= $pid;\n\t\t\tmosInsertImage($image);\n\t\t}\n\t\tprint_debug(2,'END store Images');\n\t\t\n\t\t$article->state\t=\t1;\n\t\t$article->PageHTML \t = $response;\n\t\t///////////////////////////////////////////////////////////\n\t\t////\tSTORE ARTICLE\t///////////////////////////////\n\t\tprint_debug(2,'BEGIN store article');\n\t\t\t$obj_article->save($article);\n\t\tprint_debug(2,'END store article');\n\t}",
"function openpage ($wt) {\n if (strlen($this->imdbID) != 7){\n $this->debug_scalar(\"not valid imdbID: \".$this->imdbID.\"<BR>\".strlen($this->imdbID));\n $this->page[$wt] = \"cannot open page\";\n return;\n }\n switch ($wt){\n case \"Title\" : $urlname=\"/\"; break;\n case \"Credits\" : $urlname=\"/fullcredits\"; break;\n case \"CrazyCredits\": $urlname=\"/crazycredits\"; break;\n case \"Plot\" : $urlname=\"/plotsummary\"; break;\n case \"Taglines\" : $urlname=\"/taglines\"; break;\n case \"Episodes\" : $urlname=\"/episodes\"; break;\n case \"Quotes\" : $urlname=\"/quotes\"; break;\n case \"Trailers\" : $urlname=\"/videosites\"; break;\n case \"Trailer\" : $urlname=\"/video/screenplay\"; break;\n case \"Goofs\" : $urlname=\"/goofs\"; break;\n case \"Trivia\" : $urlname=\"/trivia\"; break;\n case \"Soundtrack\" : $urlname=\"/soundtrack\"; break;\n case \"MovieConnections\" : $urlname=\"/movieconnections\"; break;\n case \"ExtReviews\" : $urlname=\"/externalreviews\"; break;\n default :\n $this->page[$wt] = \"unknown page identifier\";\n $this->debug_scalar(\"Unknown page identifier: $wt\");\n return;\n }\n \n if ($this->usecache) {\n $fname = \"$this->cachedir$this->imdbID.$wt\";\n if ( $this->usezip ) {\n if ( ($this->page[$wt] = @join(\"\",@gzfile($fname))) ) {\n if ( $this->converttozip ) {\n @$fp = fopen ($fname,\"r\");\n $zipchk = fread($fp,2);\n fclose($fp);\n if ( !($zipchk[0] == chr(31) && $zipchk[1] == chr(139)) ) { //checking for zip header\n /* converting on access */\n $fp = @gzopen ($fname, \"w\");\n @gzputs ($fp, $this->page[$wt]);\n @gzclose ($fp);\n }\n }\n return;\n }\n } else { // no zip\n @$fp = fopen ($fname, \"r\");\n if ($fp) {\n $temp=\"\";\n while (!feof ($fp)) {\n\t $temp .= fread ($fp, 1024);\n\t $this->page[$wt] = $temp;\n }\n return;\n }\n }\n } // end cache\n\n $req = new IMDB_Request(\"\");\n $url = \"http://\".$this->imdbsite.\"/title/tt\".$this->imdbID.$urlname;\n $req->setURL($url);\n $req->sendRequest();\n $this->page[$wt]=$req->getResponseBody();\n if( $this->page[$wt] ){ //storecache\n if ($this->storecache) {\n $fname = \"$this->cachedir$this->imdbID.$wt\";\n if ( $this->usezip ) {\n $fp = gzopen ($fname, \"w\");\n gzputs ($fp, $this->page[$wt]);\n gzclose ($fp);\n } else { // no zip\n $fp = fopen ($fname, \"w\");\n fputs ($fp, $this->page[$wt]);\n fclose ($fp);\n }\n }\n return;\n }\n $this->page[$wt] = \"cannot open page\";\n $this->debug_scalar(\"cannot open page: $url\");\n }",
"function hw_getobjectbyqueryobj($link, $query, $maxhits) {}",
"function retrieve_content_object_publication($pid);",
"function browse() {\n list($hideFlag, $hideUrl, $hideImg) = hide_url('wiki_browse_documents', $this->gid);\n $hurl='<a href=\"'.$this->wikiLink.'&'.$hideUrl.'\">'.$hideImg.'</a>';\n print $GLOBALS['Language']->getText('plugin_phpwiki_views_wikiserviceviews', 'wiki_subtit_docu', array($hurl));\n if(!$hideFlag) {\n $this->_browseWikiDocuments();\n }\n }",
"function site_find_content($siteObj_or_id, $pageObj_or_id, $lang='') {\n\n $site_id = any2id('site', $siteObj_or_id);\n $page_id = any2id('site_page', $pageObj_or_id); \n if($pageContentObj = find_object('page_content', ['site_id' => $site_id, 'page_id' => $page_id, 'language' => $lang ?: $_SESSION['language']])) return site_page_object($pageContentObj, $pageObj);\n return any2obj('site_page', $pageObj_or_id);\n}",
"function build_page($elements) {\n $output = '';\n \n foreach ($elements as $id => $values) {\n switch ($values['type']) {\n case 'html':\n $output .= '<div id=\"' . $id . '\">' . $values['value'] . '</div>';\n break;\n case 'form':\n $output .= build_form($values['value']);\n break;\n }\n }\n return $output;\n}",
"function html_browse($proj, $repos) {\n\n if (isset($_GET['b'])) {\n html_blob($proj, $_GET['b'], $repos);\n } else {\n // Get the tree, otherwise default to HEAD\n if (isset($_GET['t'])) {\n $tree = $_GET['t'];\n } else {\n $tree = \"HEAD\";\n }\n html_tree($proj, $tree, $repos);\n }\n}",
"function iwi_get_objects_with_relation_query($relation = NULL, $nid = NULL) {\n $iw_is_predicate = ISLANDORA_WEBFORM_ISIW_PREDICATE;\n $iw_has_predicate = ISLANDORA_WEBFORM_HASIW_PREDICATE;\n $query = <<<EOQ\nPREFIX islandora-rels-ext: <http://islandora.ca/ontology/relsext#>\nPREFIX fedora-rels-ext: <info:fedora/fedora-system:def/relations-external#>\nSELECT DISTINCT ?object ?predicate ?secondobject\nFROM <#ri>\nWHERE {\n ?object <fedora-model:label> ?title ;\n islandora-rels-ext:$iw_is_predicate \"true\";\n !iw_node_match\n ?predicate ?secondobject .\n ?secondobject <info:fedora/fedora-system:def/model#hasModel> <info:fedora/fedora-system:FedoraObject-3.0> .\n !filters\n}\nEOQ;\n\n $filter_map = function ($filter) {\n return \"FILTER($filter)\\n\";\n };\n $query_filters = array();\n $query_extramatch = array();\n \n $iw_onlyuris_filters = \"isIRI(?secondobject)\"; //we want only relations that point to an object.\n \n $query_filters[] = $iw_onlyuris_filters;\n $query_filters[] =\"regex(str(?predicate), 'info:fedora/fedora-system:def/relations-external#','i')\";\n if (isset($relation) && !empty($relation)) {\n $iw_predicate_filters = \"sameTerm(?predicate, <fedora-rels-ext:{$relation}>)\"; //Only for a given predicate\n $query_filters[] = $iw_predicate_filters;\n }\n \n if (isset($nid) && !empty($nid)) {\n $iw_nodeid_match = \"islandora-rels-ext:{$iw_has_predicate} \\\"{$nid}\\\"\"; //Only for a given Node id association\n $query_extramatch[] = $iw_nodeid_match;\n }\n \n $query = format_string($query, array(\n '!iw_node_match' => !empty($query_extramatch) ? implode(' ;', $query_extramatch).\" ;\" : '',\n '!filters' => implode(' ', array_map($filter_map, $query_filters)),\n )); \n return $query;\n \n}",
"function socialwiki_get_page($pageid) {\n global $DB;\n return $DB->get_record('socialwiki_pages', array('id' => $pageid));\n}",
"function print_wiki($pdm_id){\n\tglobal $db;\n\t$query = $db->prepare('SELECT * FROM `wiki_departments` where pdm_id=:pdm_id ' );\n\t$query->bindValue(':pdm_id', \t\t\t$pdm_id, \t\t\tPDO::PARAM_STR); \n\t$query->execute();\n\t$mapper = $query->fetchObject();\n\t\n\t$query = $db->prepare('SELECT * FROM `wiki_hierarchy` where wiki_id=:wiki_id ' );\n\n\t$query->bindValue(':wiki_id', \t\t\t$mapper->wiki_id, \t\t\tPDO::PARAM_INT); \n\t$query->execute();\n\t$service = $query->fetchObject();\t\n\treturn $service;\n}",
"abstract protected function getHypermedia();",
"function showOBJLink() {\n global $base_url;\n module_load_include('inc', 'fedora_repository', 'api/fedora_item');\n $item = new Fedora_Item($this->pid);\n $streams = $item->get_datastreams_list_as_array();\n return \"<a href='\" . $base_url . \"/fedora/repository/\" . $this->pid . \"/OBJ/\" . $streams['OBJ']['label'] . \"'>\" . $streams['OBJ']['label'] . \"</a>\";\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Get the current category id if we are on an archive/category page / | function getCurrentCatID() {
global $wp_query;
if (is_category() || is_single()) {
$cat_ID = get_query_var('cat');
}
return $cat_ID;
} | [
"function getCurrentCatID(){\n\tglobal $wp_query;\n\tif(is_category() || is_single()){\n\t\t$cat_ID = get_query_var('cat');\n\t}\n\treturn $cat_ID;\n}",
"function eo_get_current_cat_id(){\n global $wp_query;\n $catID = 0;\n if(is_category() || is_single()){\n $catID = get_query_var('cat');\n }\n return $catID;\n}",
"public function CurrentCategoryID(){\n\t\treturn $this->categoryID;\n\t}",
"function wct_current_category() {\n\t//currently queried object\n\t$queriedObject = get_queried_object();\n\t//check if it has term id\n\tif ( property_exists( $queriedObject, 'term_id' ) ) {\n\t\treturn $queriedObject->term_id;\n\t} else {\n\t\treturn false; //we must be on the shop page\n\t}\n}",
"protected function _getCategoryId()\n\t{\n\t\tif ($this->_processor) {\n\t\t\t$categoryId = $this->_processor\n\t\t\t\t->getMetadata(Df_PageCache_Model_Processor_Category::METADATA_CATEGORY_ID);\n\t\t\tif ($categoryId) {\n\t\t\t\treturn $categoryId;\n\t\t\t}\n\t\t}\n\n\t\t//If it is not product page and not category page - we have no any category (not using last visited)\n\t\tif (!$this->_getProductId()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->_getCookieValue(Df_PageCache_Model_Cookie::COOKIE_CATEGORY_ID, null);\n\t}",
"public function getCurrentlySelectedCategoryId() {\n $helper = $this->helper('catalogcategorysearch');\n if ($helper->isCategoryPage() && $helper->selectCategoryOnCategoryPages()) {\n //find active category navigation filter\n foreach (Mage::getSingleton('catalog/layer')->getState()->getFilters() as $filterItem) {\n if ($filterItem->getFilter() instanceof Mage_Catalog_Model_Layer_Filter_Category) {\n //only return the category id when it does not exceed the level of the categories that are shown\n if ($filterItem->getFilter()->getCategory()->getLevel() <= $helper->getMaximumCategoryLevel()) {\n return $filterItem->getValue();\n }\n }\n }\n //get the current category from the main navigation\n return Mage::getSingleton('catalog/layer')->getCurrentCategory()->getEntityId();\n }\n if ($helper->isSearchResultsPage()) {\n //find first active category search filter\n foreach (Mage::getSingleton('catalogsearch/layer')->getState()->getFilters() as $filterItem) {\n if ($filterItem->getFilter() instanceof Mage_Catalog_Model_Layer_Filter_Category) {\n return $filterItem->getValue();\n }\n }\n }\n //get the root category\n return Mage::app()->getStore()->getRootCategoryId();\n }",
"public function getCategoryID() {\n\t\treturn $this->category_id;\n\t}",
"public function getCategoryID()\n {\n return $this->categoryID;\n }",
"public function getCurrentCategory()\n {\n return $this->registry->registry('current_category');\n }",
"function ipress_the_category_id() {\n echo get_the_category()[0]->cat_ID;\n}",
"public function getCategory_id()\n {\n return $this->category_id;\n }",
"private function get_current_gradebook_category_id()\n {\n $tbl_gradebook_category = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY);\n $curr_course_code = api_get_course_id();\n $curr_session_id = api_get_session_id();\n\n if (empty($curr_session_id)) {\n $session_condition = ' AND session_id is null ';\n } else {\n $session_condition = ' AND session_id = '.$curr_session_id;\n }\n\n $sql = 'SELECT id FROM '.$tbl_gradebook_category.'\n WHERE course_code = \"'.$curr_course_code.'\" '. $session_condition;\n $rs = Database::query($sql);\n $category_id = 0;\n if (Database::num_rows($rs) > 0) {\n $row = Database::fetch_row($rs);\n $category_id = $row[0];\n }\n\n return $category_id;\n }",
"public function getCategoryid()\n {\n return $this->categoryid;\n }",
"public function getCurrentCategory(){\n return Mage::registry('current_category');\n }",
"function getMainCatIDByURL(){\n\t$id = \"\";\n\t$page = str_replace(\".php\", \"\", getCurrentFilename());\n\t$id = int_mainCatID($page);\n\treturn $id;\n}",
"public function getCatId()\n\t{\n\t\treturn $this->categoria_id;\n\t}",
"public function getCategory()\n {\n return Mage::registry('current_category');\n }",
"private function getCurrentCategory()\n {\n $result = null;\n $catalogLayer = $this->layerResolver->get();\n\n if ($catalogLayer) {\n $result = $catalogLayer->getCurrentCategory();\n }\n\n return $result;\n }",
"public function getCatId()\n {\n return $this->cat_id;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a new isDisplayed | public function setIsDisplayed($isDisplayed)
{
$this->isDisplayed = $isDisplayed;
return $this;
} | [
"public function setDisplayed($var)\n {\n GPBUtil::checkBool($var);\n $this->displayed = $var;\n\n return $this;\n }",
"public function isDisplayed() \n\t{\n\t\t$command = new Commands\\Command($this->_driver, 'element_is_displayed', null , array('element_id' => $this->_elementId));\n\t\t$results = $command->execute();\n\t\treturn (trim($results['value']) == \"1\");\t\t\n\t}",
"public function getBIsDisplayed()\r\n {\r\n return $this->bIsDisplayed;\r\n }",
"public function isDisplayed(): bool\n\t{\n\t\treturn !in_array(\\CCrmFieldInfoAttr::NotDisplayed, $this->getAttributes(), true);\n\t}",
"public function setDisplay( $bool );",
"public function setVisible() {\r\n\t\t$this->visible_initial = true;\r\n\t}",
"public function canDisplayed()\r\n {\r\n if (!$this->allowAccess())\r\n return false;\r\n if ($this->getHidden() == \"Y\")\r\n return false;\r\n return true;\r\n }",
"public function hiddenCanBeSet()\n {\n $value = true;\n $this->instance->setHidden($value);\n $this->assertEquals($value, $this->instance->getHidden());\n }",
"function IsShownOnScreen(){}",
"public function setIsDisplayedInTitle($isDisplayedInTitle)\n {\n $this->isDisplayedInTitle = $isDisplayedInTitle;\n return $this;\n }",
"public function setOnDisplay($bool)\r\n {\r\n $this->onDisplay = $bool;\r\n $this->isActive = true;\r\n }",
"function IsShown(){}",
"abstract public function assertVisibleOption($locator);",
"public function setIsRendered($isRendered);",
"public function testVisibilityUsingShow()\n\t{\n\t\t$this->stub->show();\n\n\t\t$refl = new \\ReflectionObject($this->stub);\n\t\t$attributes = $refl->getProperty('attributes');\n\t\t$attributes->setAccessible(true);\n\n\t\t$attrib = $attributes->getValue($this->stub);\n\n\t\t$this->assertTrue($attrib['visible']);\n\t}",
"public function getIsDisplayedInTitle()\n {\n return $this->isDisplayedInTitle;\n }",
"public function isDisplayedInUtilities();",
"public function everyLeadisDisplayed()\n {\n return $this->lastleadDisplayed == count($this->module->getStoreService()->getEntries());\n }",
"public function testDisplay()\n {\n $this->assertTrue($this->compare->get_display_opt());\n\n $this->compare->set_display_opt(false);\n $this->assertFalse($this->compare->get_display_opt());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears phpbb's cache of WP header/footer. We need to do this whenever the main WP theme is changed, because when WordPress header/footer cache are called from phpBB, we have no way of knowing what the theme should be a WordPress is not invoked | public function clear_header_cache() {
$wpuCache = WPU_Cache::getInstance();
$wpuCache->template_purge();
} | [
"function ccfm_clear_cache_for_customized_theme() {\n ccfm_clear_cache_for_me( 'customize' ); \n}",
"function wp_clean_themes_cache($clear_update_cache = \\true)\n {\n }",
"function wp_cache_reset()\n {\n }",
"public function resetFooter();",
"function wp_ng_cache_clean () {\n\n if (function_exists('wp_cache_clear_cache') ) {\n wp_cache_clear_cache();\n }\n}",
"public function clearCachedDefinitions();",
"function wp_clean_update_cache()\n {\n }",
"public static function clearCache() {\n\t\tWCF::getCache()->clear(WCF_DIR.'cache', 'cache.pageMenu-*.php');\n\t}",
"function wp_clean_update_cache()\n{\n}",
"function drupal_page_footer() {\n if (variable_get('cache', 0)) {\n page_set_cache();\n }\n\n module_invoke_all('exit');\n}",
"public function clearStaticCache();",
"function page_footer() {\n\t\tif (webpulse::variable_get('cache', 0)) {\n\t\t\twebpulse::page_set_cache();\n\t\t}\n\t\t\n\t\t//module_invoke_all('exit');\n\t}",
"public static function flushPageCache() {\n\t\tif ( function_exists( 'wp_cache_clear_cache' ) ) {\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t$blog_id = get_current_blog_id();\n\t\t\t\twp_cache_clear_cache( $blog_id );\n\t\t\t} else {\n\t\t\t\twp_cache_clear_cache();\n\t\t\t}\n\t\t} else if ( has_action( 'cachify_flush_cache' ) ) {\n\t\t\tdo_action( 'cachify_flush_cache' );\n\t\t} else if ( function_exists( 'w3tc_pgcache_flush' ) ) {\n\t\t\tw3tc_pgcache_flush();\n\t\t} else if ( function_exists( 'wp_fast_cache_bulk_delete_all' ) ) {\n\t\t\twp_fast_cache_bulk_delete_all();\n\t\t} else if ( class_exists( 'WpFastestCache' ) ) {\n\t\t\t$wpfc = new WpFastestCache();\n\t\t\t$wpfc->deleteCache();\n\t\t} else if ( class_exists( 'c_ws_plugin__qcache_purging_routines' ) ) {\n\t\t\tc_ws_plugin__qcache_purging_routines::purge_cache_dir(); // quick cache\n\t\t} else if ( class_exists( 'zencache' ) ) {\n\t\t\tzencache::clear();\n\t\t} else if ( class_exists( 'comet_cache' ) ) {\n\t\t\tcomet_cache::clear();\n\t\t} else if ( class_exists( 'WpeCommon' ) ) {\n\t\t\t// WPEngine cache purge/flush methods to call by default\n\t\t\t$wpe_methods = [\n\t\t\t\t'purge_varnish_cache',\n\t\t\t];\n\n\t\t\t// More agressive clear/flush/purge behind a filter\n\t\t\tif ( apply_filters( 'wbcr/factory/flush_wpengine_aggressive', false ) ) {\n\t\t\t\t$wpe_methods = array_merge( $wpe_methods, [ 'purge_memcached', 'clear_maxcdn_cache' ] );\n\t\t\t}\n\n\t\t\t// Filtering the entire list of WpeCommon methods to be called (for advanced usage + easier testing)\n\t\t\t$wpe_methods = apply_filters( 'wbcr/factory/wpengine_methods', $wpe_methods );\n\n\t\t\tforeach ( $wpe_methods as $wpe_method ) {\n\t\t\t\tif ( method_exists( 'WpeCommon', $wpe_method ) ) {\n\t\t\t\t\tWpeCommon::$wpe_method();\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( function_exists( 'sg_cachepress_purge_cache' ) ) {\n\t\t\tsg_cachepress_purge_cache();\n\t\t} else if ( file_exists( WP_CONTENT_DIR . '/wp-cache-config.php' ) && function_exists( 'prune_super_cache' ) ) {\n\t\t\t// fallback for WP-Super-Cache\n\t\t\tglobal $cache_path;\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t$blog_id = get_current_blog_id();\n\t\t\t\tprune_super_cache( get_supercache_dir( $blog_id ), true );\n\t\t\t\tprune_super_cache( $cache_path . 'blogs/', true );\n\t\t\t} else {\n\t\t\t\tprune_super_cache( $cache_path . 'supercache/', true );\n\t\t\t\tprune_super_cache( $cache_path, true );\n\t\t\t}\n\t\t}\n\t}",
"public function cache_clear() {\n\t\t$cache = WP_CLI::get_cache();\n\n\t\tif ( ! $cache->is_enabled() ) {\n\t\t\tWP_CLI::error( 'Cache directory does not exist.' );\n\t\t}\n\n\t\t$cache->clear();\n\n\t\tWP_CLI::success( 'Cache cleared.' );\n\t}",
"protected function clear_page_caches() {\n\t\tif ( function_exists( 'w3tc_pgcache_flush' ) )\n\t\t\tw3tc_pgcache_flush();\n\t}",
"public function fix_clear_cache_for_widgets() {\n include_once WPCACHEHOME . 'wp-cache-phase1.php';\n }",
"public static function ao_ccss_clear_page_tpl_cache() {\n delete_transient( 'autoptimize_ccss_page_templates' );\n }",
"public function clearCache()\n {\n $types = array('full_page', 'block_html');\n foreach ($types as $type) {\n $this->_cacheTypeList->cleanType($type);\n }\n foreach ($this->_cacheFrontendPool as $cacheFrontend) {\n $cacheFrontend->getBackend()->clean();\n }\n }",
"function clearCache()\n\t{\n\t\t// TODO:\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the number of seats in the location of exam $exam_id | function getMaxSeats($exam_id){
$sqlResult = sqlExecute("SELECT seats FROM exam JOIN location ON (exam.location = location.loc_id) WHERE exam_id = :exam",
array(':exam' => $exam_id),
true);
return $sqlResult[0]["seats"];
} | [
"public function getAvailableSeats($examId)\n {\n \t$studentCount = $this->getStudentCount($examId);\n \t\n \t$sql = \"SELECT seats FROM exam_schedule WHERE id = :exam_schedule\";\n \t$query = $this->db->prepare($sql);\n \t$query->execute(array(':exam_schedule' => $examId));\n \t\n \treturn $query->fetch() - $studentCount; \t\n }",
"function getNumRegistered($exam_id){\r\n\t\t$sqlResult = sqlExecute(\"SELECT COUNT(student_id) as count FROM exam_roster WHERE exam_id LIKE :exam\",\r\n\t\t\t\t\t array(':exam' => $exam_id),\r\n\t\t\t\t\t true);\r\n\t\treturn $sqlResult[0][\"count\"];\r\n\t}",
"public function getNumberOfSeats ()\n {\n $mapsMapper = new Application_Model_Mapper_MapsMapper();\n $counter = 0;\n $maps = $mapsMapper->fetchAllByLanId($this->getId());\n if (count($maps) >= 1) {\n $desksMapper = new Application_Model_Mapper_DesksMapper();\n foreach ($maps as $map) {\n $desks = $desksMapper->fetchAllByMapId($map->getId());\n if (count($desks) >= 1) {\n $seatsMapper = new Application_Model_Mapper_SeatsMapper();\n foreach ($desks as $desk) {\n $seats = $seatsMapper->fetchAllByDeskId($desk->getId());\n $counter = $counter + count($seats);\n }\n }\n }\n }\n if ($counter == 0) {\n $counter = $this->getPlannedSeats();\n }\n return $counter;\n }",
"public function getSeatsNum();",
"function count_questions_of_an_exam($examid){\n\t$query = mysql_query(\"SELECT COUNT(*) FROM `mock_exam_questions` WHERE `quiz_id` = '$examid'\");\n\treturn mysql_fetch_row($query);\n}",
"public function getSeats(): int\n {\n return $this->seats;\n }",
"function studentCountTotalExams($student_id){\n\t\t//write sql\n\t\t$sql = \"SELECT COUNT(exam_id) AS studentTotalExams FROM registered_students WHERE student_id = (SELECT student_id FROM students WHERE student_id = '$student_id')\";\n\t\t//execute $sql;\n \t\t$result = $this->dbcon->query($sql);\n \t\tif ($this->dbcon->error){\n \t\t\t//logging of error into a file\n \t\t\t$exam_count_errors = 'exam_count_errors.txt';\n\t\t\t$error_msg = \"Unable to count all examination for student with id \".$student_id.\" to display on dashboard because \".$exam_id.\" because \".$this->dbcon->error.\" on \".date('l F Y h:i:s A').\".\".\"\\n\";\n\t\tfile_put_contents($exam_count_errors, $error_msg, FILE_APPEND);\n \t}elseif($result->num_rows > 0) {\n\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t$rows[] = $row;\n\t\t}\n\t\treturn $rows;\n\t}\n\t}",
"public function getNumberOfSeats()\n\t{\n\t\treturn self::NUMBER_OF_SEATS;\n\t}",
"public function getSeatCount()\r\n {\r\n return $this->getPassengerCount();\r\n }",
"public function getBookedSeatsCount()\n {\n if (!$this->getBookings()->exists()) {\n return 0;\n }\n return (int)$this->getBookings()->sum('adults');\n }",
"public function getSeatCount($office_id): int\n {\n $count = $this->model->where('office_id', '=', $office_id)->count();\n return $count;\n }",
"public function count(): int\n {\n return count($this->exercises);\n }",
"public function getTotalSearchedAttendance($course_id, $attendance_id) {\n $query = $this->connection->prepare(\"SELECT COUNT(id) AS total FROM student_attendance WHERE course_id = $course_id AND attendance_id = $attendance_id\");\n\n if($query->execute()) {\n $result = $query->fetch(PDO::FETCH_OBJ);\n return $result->total;\n } else {\n $this->error = implode(', ', $this->connection->errorInfo());\n return false;\n }\n }",
"public function getQuestionByExam($id){\n\t\t\t$query = \"SELECT * FROM tbl_ques WHERE examid='$id'\";\n\t\t\t$getData = $this->db->select($query);\n\t\t\tif ($getData) {\n\t\t\t\treturn $getData->num_rows;\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t}",
"public static function countAttemptsForQuestion($studentId, $assessmentId, $questionNumber, $debug) {\n\t\t$statementHelper = new StatementHelper();\n\n\t\t// Regex for assessment id and question number (since url for object IDs will change, but end part will be the same format)\n\t\t$regex = new MongoRegex('/' . $assessmentId . '\\.xml#' . $questionNumber . '$/');\n\t\t$questionDescription = \"Question #{$questionNumber} of assessment {$assessmentId}\";\n\t\t// Get the count of answered statements for this question for current user\n\t\t// TODO take the verb authority (adlnet/expapi/verbs/) part and put into a global constant\n\t\t$statements = $statementHelper->getStatements(\"openassessments\",[\n\t\t\t'statement.actor.name' => $studentId,\n\t\t\t'statement.verb.id' => 'http://adlnet.gov/expapi/verbs/answered',\n\t\t\t//'statement.object.id' => $regex,\n\t\t\t'statement.object.definition.name.en-US' => $questionDescription,\n\t\t], [\n\t\t\t'statement.result.success' => true,\n\t\t]);\n\t\tif ($statements[\"error\"]) {\n\t\t\t// TODO error handling\n\t\t} else {\n\t\t\t// My attempt at debugging slow queries to figure out how to speed them out\n\t\t\t//var_dump($statements[\"cursor\"]->explain());\n\t\t\treturn $statements[\"cursor\"]->count();\n\t\t}\n\t}",
"function totalRegisteredStudent($exam_id){\n \t\t//write sql\n \t\t$sql = \"SELECT COUNT(registration_id) AS registeredStudents FROM registered_students WHERE exam_id = (SELECT exam_id FROM examinations WHERE exam_id = '$exam_id')\";\n \t\t$rows = array();\n \t\t//execute $sql;\n \t\t$result = $this->dbcon->query($sql);\n \t\tif ($this->dbcon->error){\n \t\t\t//logging of error into a file\n \t\t\t$count_registered_student_errors = 'count_registered_student_errors.txt';\n\t\t\t$error_msg = \"Unable to fetch total number of registered student of examination with id \".$exam_id.\" because \".$this->dbcon->error.\" on \".date('l F Y h:i:s A').\".\".\"\\n\";\n\t\tfile_put_contents($count_registered_student_errors, $error_msg, FILE_APPEND);\n \t\t}elseif($result->num_rows > 0){\n \t\t\twhile ($row = $result->fetch_assoc()) {\n \t\t\t\t$rows[] = $row; \n\t\t\t}\n\t\t\treturn $rows;\n \t\t}\n \t}",
"function get_attendee_count($seminar_id)\n {\n $this->db->select('COUNT(seminar_attendee_id) + SUM(number_of_guests) AS total_attendees', FALSE);\n \n $this->db->where('seminar_id', $seminar_id);\n\n $attendees = $this->db->get($this->_table_name)->row();\n\n return $attendees->total_attendees;\n }",
"public static function getEmployeeShiftsCount($employee_id){\n if (DB::table('table_attendances')->where('table_attendances.employee_id', $employee_id)->exists()) {\n return DB::table('table_attendances')\n ->select('table_shifts.shift_id')\n ->join('table_employees','table_attendances.employee_id','=','table_employees.employee_id')\n ->where(['table_attendances.employee_id' => $employee_id])\n ->count();\n }else{\n return 0;\n }\n }",
"public function get_occupied_seats_count()\n\t{\n\t\treturn \\DB::select('users.id')\n\t\t\t\t\t->from('users')\n\t\t\t\t\t->join('checkins', 'right')\n\t\t\t\t\t->on('checkins.user_id', '=', 'users.id')\n\t\t\t\t\t->where('checkins.killed', '=', '0')\n\t\t\t\t\t->where('checkins.created_at', '>=', date('Y-m-d'))\n\t\t\t\t\t->where('checkins.reason_id', '=', 1)\n\t\t\t\t\t->execute()\n\t\t\t\t\t->count();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get members of collection. Returns an array with the members of the collection given by the path of the collection. The returned array holds elements which are either ezcWebdavCollection, or ezcWebdavResource. | protected function getCollectionMembers( $path )
{
$contents = array();
foreach ( $this->content[$path] as $child )
{
if ( is_array( $this->content[$child] ) )
{
// Add collection without any children
$contents[] = new ezcWebdavCollection(
$child
);
}
else
{
// Add files without content
$contents[] = new ezcWebdavResource(
$child
);
}
}
return $contents;
} | [
"public function getMembers(): Collection\n {\n return $this->members;\n }",
"public function collections() \n\t{\n\t\treturn $this->collection->get();\n\t}",
"public function members(): Collection\n {\n $key = $this->membersKey();\n if ($this->has($key)) {\n return $this->get($key);\n }\n\n $data = $this->campaign->members;\n\n $this->forever($key, $data);\n return $data;\n }",
"public function getCollections() ;",
"public function collections(): array\n\t{\n\t\tif (is_null($this->collections) && $document = $this->document())\n\t\t{\n\t\t\t$this->collections = [];\n\n\t\t\tforeach ($document->collections() as $collection)\n\t\t\t{\n\t\t\t\t$this->collections[$collection->id()] = $collection;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->collections ?? [];\n\t}",
"function get_members_of_access_collection($collection, $idonly = FALSE) {\n\tglobal $CONFIG;\n\t$collection = (int)$collection;\n\n\tif (!$idonly) {\n\t\t$query = \"SELECT e.* FROM {$CONFIG->dbprefix}access_collection_membership m\"\n\t\t\t. \" JOIN {$CONFIG->dbprefix}entities e ON e.guid = m.user_guid\"\n\t\t\t. \" WHERE m.access_collection_id = {$collection}\";\n\t\t$collection_members = get_data($query, \"entity_row_to_elggstar\");\n\t} else {\n\t\t$query = \"SELECT e.guid FROM {$CONFIG->dbprefix}access_collection_membership m\"\n\t\t\t. \" JOIN {$CONFIG->dbprefix}entities e ON e.guid = m.user_guid\"\n\t\t\t. \" WHERE m.access_collection_id = {$collection}\";\n\t\t$collection_members = get_data($query);\n\t\tif (!$collection_members) {\n\t\t\treturn FALSE;\n\t\t}\n\t\tforeach ($collection_members as $key => $val) {\n\t\t\t$collection_members[$key] = $val->guid;\n\t\t}\n\t}\n\n\treturn $collection_members;\n}",
"public function getCollection(): array {\n\t\treturn $this->users;\n\t}",
"public function loadCollectionItems(Collection $collection): array;",
"public function getMembers() {\n if(empty($this->members) || empty($this->members[0])) {\n $this->fetchMembers();\n }\n\n return $this->members;\n }",
"public function getCollections()\n {\n // Set method\n $this->params['method'] = 'flickr.collections.getTree';\n\n // Call Flickr Api\n $collections = $this->call_api();\n\n return $collections['collections']['collection'];\n }",
"public function getGroupMemberSet($principal) {\n $principal = $this->getPrincipalByPath($principal);\n if (!$principal) throw new Sabre_DAV_Exception('Principal not found');\n \n $stmt = $this->pdo->prepare(\"SELECT uid, tx_cal_calendar FROM fe_users WHERE uid = ? AND deleted=0\");\r\n $stmt->execute(array($principal['id']));\n \n $calendarIds = '';\r\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\r\n \t$calendarIds = $row['tx_cal_calendar'];\n }\n \n $stmt = $this->pdo->prepare(\"SELECT * FROM tx_cal_calendar WHERE uid in (?)\");\r\n $stmt->execute(array($calendarIds));\n\n $result = array();\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $result[] = $principal['uri'].'/'.$row['title'];\n\n }\n return $result;\n \n }",
"public function get($collection);",
"function GetAllCollections()\n {\n $collection_names = array();\n \n foreach ($this->xml_obj->collection as $collection)\n {\n $attrib = $collection->attributes();\n \n array_push($collection_names, \"\".$attrib[\"name\"]); \n \n }\n \n return $collection_names;\n }",
"public function getCollections()\n {\n return $this->collections;\n }",
"public function fetchAll($collectionPath, $collectionName,\n array $params = [], $page = null, $perPage = null);",
"protected function getCollections() : array\n {\n return [];\n }",
"private function get_collections() {\n\t\tif ( Options::get( 'api-key' ) === '' || ! isset( $_GET['page'] ) || $_GET['page'] !== 'helpscout-docs-api' ) {\n\t\t\treturn [];\n\t\t}\n\t\t$response = HelpScout_Request::get( 'collections' );\n\t\t$response = json_decode( wp_remote_retrieve_body( $response ) );\n\t\t$collections = [];\n\t\tforeach ( $response->collections->items as $collection ) {\n\t\t\t$collections[ $collection->id ] = $collection->name;\n\t\t}\n\n\t\treturn $collections;\n\t}",
"public function getMembers();",
"public function getUserPermissions() : Collection\n {\n if (null === $this->userPermissions) {\n $this->userPermissions = new ArrayCollection();\n }\n\n return $this->userPermissions;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Calls the Quasar Portfolio Shortcode function and uses the return HTML of Quasar Portfolio Shortcode | function quasar_call_portfolio_shortcode($atts=null){
if(!$atts) return;
if(!function_exists('rockthemes_make_swiperslider_shortcode') && $atts['use_swiper_for_thumbnails'] === 'true'){
$atts['use_swiper_for_thumbnails'] = 'false';
}
if(function_exists('rockthemes_shortcode_make_portfolio')){
echo rockthemes_shortcode_make_portfolio($atts);
}
return;
} | [
"function altitude_child_display_portfolio( $atts, $content = null ) {\r\n $atts = shortcode_atts (\r\n array(),\r\n $atts,\r\n 'display_portfolio'\r\n );\r\n\r\n ob_start();\r\n include 'templates/shortcodes/portfolio.php';\r\n return ob_get_clean();\r\n}",
"function tourcms_wp_shortcode($atts, $content, $code) {\n\t\tglobal $post;\n\t\t\n\t\t//error_log($tag);\n\t\t// Support tourcms_ prefixed shortcodes\n\t\t// added due to conflicts with other plugins/themes\n\t\tif(substr($code, 0, 8) == 'tourcms_') {\n\t\t\t$code = str_replace('tourcms_', '', $code);\n\t\t}\n\t\t\n\t\t//error_log($tag);\n\t\t\n\t\t$text = get_post_meta( $post->ID, 'tourcms_wp_'.$code, true );\n\t\t\n\t\tif($code==\"from_price\")\n\t\t\t$text = round(get_post_meta( $post->ID, 'tourcms_wp_'.$code, true ));\n\t\t\t\n\t\treturn $text;\n\t}",
"function ts_three_fifth( $atts, $content = null )\r\n{\r\n return '<div class=\"theme-three-fifth\">' . do_shortcode($content) . '</div>';\r\n}",
"function variant_page_builder_render_shortcode() {\n\t$output = 'No Shortcode Supplied';\n\t\n\tif( isset($_POST['shortcode']) ){\n\t\t$output = do_shortcode(str_replace('\"\"', '\"', stripslashes($_POST['shortcode'])));\n\t}\n\t\n\twp_die($output);\n}",
"function my_faq_shortcode( $attrs, $content = null ) {\n\n\textract( shortcode_atts( array(\n\t\t'question' => __( 'Hello?', 'my-faq' )\n\t), $attrs ) );\n\n\treturn '<div class=\"my-faq-section\"><h3 class=\"my-faq-title\"><a href=\"#\" class=\"toggle\" title=\"' . __( 'Click to see the answer!', 'my-faq' ) . '\">' . $question . '</a></h3><div class=\"my-faq-content\">' . $content . '</div></div>';\n}",
"function rht_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}",
"public function shortcode(){\n return \"add your image and html here...\";\n }",
"function cougar_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}",
"function tdshortcode_quote( $atts, $content = null, $tag ) {\n\treturn '<div class=\"tds-quote\">' . do_shortcode( $content ) . '</div>';\n}",
"function ts_four_fifth( $atts, $content = null )\r\n{\r\n return '<div class=\"theme-four-fifth\">' . do_shortcode($content) . '</div>';\r\n}",
"function sc_quote($atts, $content=null){\t\n extract(shortcode_atts(array(\n\t\t\"id\" => \"\",\n\t\t\"style\" => \"1\",\n\t\t\"title\" => \"\",\n\t\t\"cite\" => \"\"\n ), $atts));\n\t$cite_param = $cite != '' ? ' cite=\"' . $cite . '\"' : '';\n\t$title = $title=='' ? $cite : $title;\n\t$style = min(2, max(1, $style));\n\treturn ($style == 1 ? '<blockquote' : '<q' ) . ($id ? ' id=\"' . $id . '\"' : '') . $cite_param . ' class=\"sc_quote sc_quote_style_' . $style . '\"' . '>' . do_shortcode($content) . ($style == 1 ? ($cite!='' ? '<cite><a href=\"'.$cite.'\">'.$title.'</a></cite>' : ($title!='' ? '<cite>'.$title.'</cite>' : '')).'</blockquote>' : '</q>');\n}",
"function my_shortcode() {\n\n$options = get_option('foodrecipecptplugin_settings');\nreturn \"<p>Recipe Name:\" . $options['foodrecipecptplugin_text_field_0'] . \"</p>\".\"<p>Category: \" . $options['foodrecipecptplugin_text_field_1'].\"</p>\".\"<p>Ingredients: \". $options['foodrecipecptplugin_text_field_2'].\"</p>\".\"<p>Recipe Instructions: \" . $options['foodrecipecptplugin_text_field_3'] . \"</p>\";\n}",
"function acf_shortcode($atts) {}",
"function bienen_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}",
"function squaree_callback_shortcode_qwe()\n{\n return '</div>';\n\n}",
"function one_third_func( $atts, $content = null ) {\n return '<div class=\"one_third\">'.do_shortcode($content).'</div>';\n}",
"public function shortcode() { \n \n add_action( 'wp_footer', array( $this, 'register_scripts' ));\n return $this->_view('template');\n }",
"function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}",
"function three_fourth_func( $atts, $content = null ) {\n return '<div class=\"three_fourth\">'.do_shortcode($content).'</div>';\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test if this date is earlier than | public function isEarlier(\Rebelo\Date\Date $date): bool
{
return $this->date < $date->toDateTime();
} | [
"public function isBefore($date)\n {\n //check if the argument $date is an instance of this class\n if ( $date instanceof $this){\n $tmp = $date;\n }\n else {\n $tmp = new \\bbn\\Time($date);\n }\n return $this->getTime() < $tmp->getTime(); \n }",
"public function isBefore(Date $date): bool {\n return $this->getTime() < $date->getTime();\n }",
"public function isEarlier(Miqo_Util_Date $date) {\n return $this->dateObj < $date->dateObj;\n }",
"function dateBefore($srcDate,$compareDate) {\n\treturn (intval(str_replace('-', '', $srcDate)) < intval(str_replace('-', '', $compareDate)));\n}",
"function isNewerThan($date){ return $this->compare($date)>0; }",
"public function lessThan(Date $date): bool\n {\n return $this->timestamp < $date->timestamp;\n }",
"function is_before_date($date1, $date2)\n\t{\n\t\t$date1 = strtotime($date1);\n\t\t$date2 = strtotime($date2);\n\t\tif ($date1 > $date2) \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}",
"public function before($date) {\n return $this < new RockDatetime((string)$date);\n }",
"function zbase_date_before($first, $second)\r\n{\r\n\tif($first instanceof \\DateTime)\r\n\t{\r\n\t\t$first = zbase_date_instance($first);\r\n\t}\r\n\tif($second instanceof \\DateTime)\r\n\t{\r\n\t\t$second = zbase_date_instance($second);\r\n\t}\r\n\tif($first instanceof \\Carbon\\Carbon && $second instanceof \\Carbon\\Carbon)\r\n\t{\r\n\t\treturn $first->gt($second);\r\n\t}\r\n\treturn false;\r\n}",
"public function isSameOrBefore(Date $date): bool\n {\n return $this->compareTo($date) <= 0;\n }",
"protected function before($date) {\n\t\tif ( ! $date instanceof \\DateTime) {\n\t\t\t$date = $this->makeDate($date);\n\t\t}\n\t\t$var_date = $this->makeDate();\n\t\t// check for either date not being created successfully\n\t\tif ( ! $var_date || ! $date) {\n\t\t\t$this->setIssue('is date');\n\t\t\treturn;\n\t\t}\n\t\tif ($var_date >= $date) $this->setIssue('is before');\n\t}",
"public function isLater(Miqo_Util_Date $date) {\n return $this->dateObj > $date->dateObj;\n }",
"function dateBefore($date2, $date1 = \"\", $equal = true){\n\t\tif(!$this->compatible){\n\t\t\treturn tc_date_main::dateBefore($date2, $date1, $equal);\n\t\t}else{\n\t\t\t$date1 = ($date1 != \"\") ? $date1 : $this->getDate('Y-m-d');\n\n\t\t\t$date1 = new DateTime($date1);\n\t\t\t$date2 = new DateTime($date2);\n\t\t\treturn ($equal) ? $date1<=$date2 : $date1<$date2;\n\t\t}\n\t}",
"function isPast()\r\n {\r\n $agora = new Date();\r\n if($this->before($agora)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"function project_condition_projactivity_actividate_before($projactivity, $tdate) {\n return ($projactivity->actividate < $tdate);\n}",
"function datetime_date_before_date($date, $other_date, &$is_before, &$error) {\n\t// Get year, month, day, hour, minute and second of each dates\n\tif (!datetime_string_to_int($date, $year, $month, $day, $hour, $min, $sec, $error)) {\n\t\treturn FALSE;\n\t}\n\tif (!datetime_string_to_int($other_date, $other_year, $other_month, $other_day, $other_hour, $other_min, $other_sec, $error)) {\n\t\treturn FALSE;\n\t}\n\t\n\t// Compare year, month, day, hour, minute, second\n\t\n\t// Year\n\tif ($year<$other_year) {\n\t\t$is_before=0;\n\t\treturn TRUE;\n\t}\n\tif ($year>$other_year) {\n\t\t$is_before=2;\n\t\treturn TRUE;\n\t}\n\t\n\t// Month\n\tif ($month<$other_month) {\n\t\t$is_before=0;\n\t\treturn TRUE;\n\t}\n\tif ($month>$other_month) {\n\t\t$is_before=2;\n\t\treturn TRUE;\n\t}\n\t\n\t// Day\n\tif ($day<$other_day) {\n\t\t$is_before=0;\n\t\treturn TRUE;\n\t}\n\tif ($day>$other_day) {\n\t\t$is_before=2;\n\t\treturn TRUE;\n\t}\n\t\n\t// Hour\n\tif ($hour<$other_hour) {\n\t\t$is_before=0;\n\t\treturn TRUE;\n\t}\n\tif ($hour>$other_hour) {\n\t\t$is_before=2;\n\t\treturn TRUE;\n\t}\n\t\n\t// Minute\n\tif ($min<$other_min) {\n\t\t$is_before=0;\n\t\treturn TRUE;\n\t}\n\tif ($min>$other_min) {\n\t\t$is_before=2;\n\t\treturn TRUE;\n\t}\n\t\n\t// Second\n\tif ($sec<$other_sec) {\n\t\t$is_before=0;\n\t\treturn TRUE;\n\t}\n\tif ($sec>$other_sec) {\n\t\t$is_before=2;\n\t\treturn TRUE;\n\t}\n\t\n\t// Dates are equal\n\t$is_before=1;\n\t\n\treturn TRUE;\n}",
"public function before( $sDate );",
"public function isBeforeOrSameAs(JustDate $other): bool\n {\n return $this->timestamp <= $other->timestamp;\n }",
"public function date_before( $date, $field )\n {\n // If blank, then assume the datetime is not required\n if ( ! $date ) :\n\n return TRUE;\n\n endif;\n\n // --------------------------------------------------------------------------\n\n $CI =& get_instance();\n\n if ( ! array_key_exists( 'date_before', $CI->form_validation->_error_messages ) ) :\n\n $CI->form_validation->set_message( 'date_before', lang( 'fv_valid_date_before_field' ) );\n\n endif;\n\n // --------------------------------------------------------------------------\n\n return strtotime( $date ) < strtotime( $CI->input->post( $field ) ) ? TRUE : FALSE;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Regions for search autocomplete AJAX | public function searchAutocompleteRegionsAction() {
$em = $this->getDoctrine()->getManager();
$regions = $em->getRepository('AppBundle:Region')->searchRegionByString($_POST['query']);
$suggestions = array();
# Regions
foreach($regions as $region) {
$country = $region->getCountry()->getEn();
$suggestions[] = array(
"value" => $region->getEn().', '.$country,
"data" => $region->getEn().', '.$country
);
}
return new Response(json_encode(array('suggestions' => $suggestions)));
} | [
"function csl_ajax_search() {\n $this->find_locations( 'search' );\n }",
"function culturefeed_search_ui_city_suggestion_autocomplete_page($search_string, $include_regions = TRUE) {\n\n $matches = array();\n\n if ($search_string) {\n\n $parents = (isset($_GET['parents']) && !empty($_GET['parents'])) ? $_GET['parents'] : array();\n // Get the list of suggestions from service.\n $suggestions = culturefeed_search_get_city_suggestions($search_string, $include_regions, $parents);\n foreach ($suggestions as $key => $suggestion) {\n $matches[] = (object) array('value' => $key, 'label' => check_plain($suggestion));\n }\n\n }\n\n drupal_json_output($matches);\n\n}",
"function ajaxAutocompleteLocation() {\n\t\n\t\t/** DEBUG:\n\t\tprint \"<ul>\";\n\t\tforeach ($_GET as $n => $v) \n\t\t\tprint \"<li>GET: $n - $v</li>\";\n\t\tforeach ($_POST as $n => $v) \n\t\t\tprint \"<li>POST: $n - $v</li>\";\n\t\tprint \"</ul>\";\n\t\texit();\n\t\t*/\n\n\t\t$val = addslashes($_GET['term']).\"%\";\n\t\t$res = $this->query(\"SELECT caption FROM $this->table_locations WHERE caption LIKE \\\"$val\\\" LIMIT 20\");\n\n\t\t$arr = array();\n\t\twhile ($row = $res->fetch_assoc()) {\n\t\t\t$arr[] = stripslashes($row['caption']);\n\t\t}\n\n\t\theader('Content-Type: application/json; charset=utf-8');\n\t\tprint json_encode($arr);\n\t\texit();\n\t\n\t}",
"function ori_regform_ajax_callback_autocomplete() {\n //return $callback_name;\n //var_dump($callback_name);\n // тип поля autocomplete\n $field = $_POST['field'];\n // код страны по которой ищем\n $country = check_plain($_POST['country']);\n\n $arg = $_POST;\n\n if (!empty($field)) {\n $result = OriRegform::init($country)->getSelect($field, $arg);\n\n return drupal_json(\n array('result' => $result,\n 'count' => count($result))\n );\n }\n\n }",
"public function searchAutocompleteCitiesAction() {\n $em = $this->getDoctrine()->getManager();\n\n $cities = $em->getRepository('AppBundle:City')->searchCityByString($_POST['query']);\n $suggestions = array();\n\n # Cities\n foreach($cities as $city) {\n $subregion = ($city->getSubregion()) ? $city->getSubregion()->getEn() : '';\n $region = $city->getRegion()->getEn();\n $country = $city->getRegion()->getCountry()->getEn();\n\n $subregionString = ($subregion != '') ? $subregion . ', ' : '';\n\n $suggestions[] = array(\n \"value\" => $city->getEn() .', '. $subregionString .$region.', '.$country,\n \"data\" => $city->getEn() .', '.$subregion.', '.$region.', '.$country\n );\n }\n\n return new Response(json_encode(array('suggestions' => $suggestions)));\n }",
"public function autocomplete_callback();",
"public function searchAutocompleteCountriesAction() {\n $em = $this->getDoctrine()->getManager();\n\n $countries = $em->getRepository('AppBundle:Country')->searchCountryByString($_POST['query']);\n $suggestions = array();\n\n # Countries\n foreach($countries as $country) {\n $suggestions[] = array(\n \"value\" => $country->getEn(),\n \"data\" => $country->getEn()\n );\n }\n\n return new Response(json_encode(array('suggestions' => $suggestions)));\n }",
"function pms_userform_ajax_callback_autocomplete() {\n // тип поля autocomplete\n $field = $_POST['field'];\n // код страны по которой ищем\n $cid = check_plain($_POST['country']);\n $country = Country::get($cid);\n $arg = $_POST;\n\n if (!empty($field)) {\n $result = PMS_userform::init($country->geocode)->getSelect($field, $arg);\n\n return drupal_json(\n array('result' => $result,\n 'count' => count($result))\n );\n }\n}",
"function ajax_autoComplete()\r\n\t\t{\r\n\t\t\tif (!isset($this->data['Diagnosis']['search']))\r\n\t\t\t{\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$value = strtoupper($this->data['Diagnosis']['search']);\r\n\t\t\t\r\n\t\t\t$matches = $this->Diagnosis->find('all', array(\r\n\t\t\t\t'contain' => array(),\r\n\t\t\t\t'fields' => array('id', 'description', 'code'),\r\n\t\t\t\t'conditions' => array('code like' => $value . '%'),\r\n\t\t\t\t'index' => 'A'\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\tif (count($matches) == 0)\r\n\t\t\t{\r\n\t\t\t\t$matches = $this->Diagnosis->find('all', array(\r\n\t\t\t\t\t'contain' => array(),\r\n\t\t\t\t\t'fields' => array('id', 'description', 'code'),\r\n\t\t\t\t\t'conditions' => array('description like' => $value . '%'),\r\n\t\t\t\t\t'order' => array('description'),\r\n\t\t\t\t\t'index' => 'B'\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set('output', array(\r\n\t\t\t\t'data' => $matches,\r\n\t\t\t\t'id_field' => 'Diagnosis.id', \r\n\t\t\t\t'id_prefix' => '',\r\n\t\t\t\t'value_fields' => array('Diagnosis.description'),\r\n\t\t\t\t'informal_fields' => array('Diagnosis.code'),\r\n\t\t\t\t'informal_format' => '| %s'\r\n\t\t\t));\r\n\t\t}",
"function ajaxVehicleSearch() {\n $term = $this->requestPtr->getProperty('term');\n $vehicles = $this->ladeLeitWartePtr->vehiclesPtr->newQuery()\n ->multipleAndWhere('vin', 'ILIKE', '%' . $term . '%', 'OR', 'code', 'ILIKE', '%' . $term . '%', 'OR', 'depots.name', 'ILIKE', '%' . $term . '%')\n ->join('depots', 'depots.depot_id=vehicles.depot_id', 'LEFT JOIN')\n ->get(\"concat(vin,' (',code,')',' ',depots.name) as label,vehicle_id as value\");\n echo json_encode($vehicles);\n exit(0);\n }",
"public function get_autocomplete()\n {\n $data['result'] = $this->json_response($this->json_status['error']);\n \n if ($this->is_ajax()) {\n $term = $this->input->get('term', TRUE);\n $user_id = $this->input->get('user_id', TRUE);\n \n $this->object_model->db->like(array(\n 'name' => $term\n ));\n \n if ($user_id)\n $this->object_model->db->where(array(\n 'user_id' => $user_id\n ));\n \n $clients = $this->object_model->get(false, \"id, name as label, name as value\");\n \n if (! $clients) {\n $clients[] = array(\n 'id' => 0,\n 'value' => lang(\"no_record_found\")\n );\n }\n \n $data['result'] = json_encode($clients);\n }\n \n $this->template('/ajax', $data, TRUE);\n }",
"function ajax_autoComplete()\r\n\t\t{\r\n\t\t\tif (trim($this->data['County']['name']) == '')\r\n\t\t\t{\r\n\t\t\t\tdie();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$matches = $this->County->find('all', array(\r\n\t\t\t\t'contain' => array(),\r\n\t\t\t\t'fields' => array('id', 'odhs_county_number', 'name'),\r\n\t\t\t\t'conditions' => array(\r\n\t\t\t\t\t'name like' => strtoupper($this->data['County']['name']) . '%',\r\n\t\t\t\t\t'is_active' => 1\r\n\t\t\t\t),\r\n\t\t\t\t'index' => 'C',\r\n\t\t\t\t'order' => array('name')\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\t$this->set('output', array(\r\n\t\t\t\t'data' => $matches, \r\n\t\t\t\t'id_field' => 'County.id',\r\n\t\t\t\t'id_prefix' => '',\r\n\t\t\t\t'value_fields' => array('County.name'),\r\n\t\t\t\t'informal_fields' => array('County.odhs_county_number'),\r\n\t\t\t\t'informal_format' => ' (<span class=\"CountyCode\">%s</span>)'\r\n\t\t\t));\r\n\t\t}",
"public function get_autocomplete()\n {\n $term = $_GET['term'];\n $ciudades = $this->m_ciudad->get_by_nombre( $term );\n \n //Se acomoda el array de tal forma que sea legible por el autocomplete de jQuery\n foreach( $ciudades as $c ){\n $nombre = $c->nombre;\n $c->value = $nombre;\n unset($c->nombre);\n }\n \n echo json_encode($ciudades);\n }",
"function wp_ajax_ajax_tag_search() {}",
"function ajax_autoComplete()\r\n\t\t{\r\n\t\t\tif (!isset($this->data['Physician']['search']))\r\n\t\t\t{\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$value = $this->data['Physician']['search'];\r\n\t\t\t\r\n\t\t\t$single = $this->Physician->find('first', array(\r\n\t\t\t\t'contain' => array(),\r\n\t\t\t\t'fields' => array('id', 'name', 'address_1', 'phone_number'),\r\n\t\t\t\t'conditions' => array('physician_number' => $value),\r\n\t\t\t\t'order' => array('name')\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\tif ($single === false)\r\n\t\t\t{\r\n\t\t\t\t$matches = $this->Physician->find('all', array(\r\n\t\t\t\t\t'contain' => array(),\r\n\t\t\t\t\t'fields' => array('id', 'name', 'address_1', 'phone_number'),\r\n\t\t\t\t\t'conditions' => array('name like' => $value . '%'),\r\n\t\t\t\t\t'order' => array('name')\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$matches[0] = $single;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set('output', array(\r\n\t\t\t\t'data' => $matches,\r\n\t\t\t\t'id_field' => 'Physician.id', \r\n\t\t\t\t'id_prefix' => '',\r\n\t\t\t\t'value_fields' => array('Physician.name'),\r\n\t\t\t\t'informal_fields' => array('Physician.address_1', 'Physician.phone_number'),\r\n\t\t\t\t'informal_format' => ' | %s | %s'\r\n\t\t\t));\r\n\t\t}",
"function ajax_search() {\n\t\tglobal $wpdb;\n\t\t$term = (isset($_POST['term']) ? $wpdb->escape($_POST['term']) : false);\n\t\t\n\t\tif($term) {\n\t\t\t$textbins = $this->search($term);\n\t\t} else {\n\t\t\t$textbins = $this->readAll();\n\t\t}\n\t\trequire_once('views/list.php');\n\t\tdie();\n\t}",
"public function autocomplete(): void\n {\n $this->loadComponent('RequestHandler');\n $this->viewBuilder()->setClassName('Json');\n $data = [];\n $paramName = (string)$this->getRequest()->getQuery('parameter');\n $query = $this->getRequest()->getQuery('query');\n try {\n $parameter = $this->Filter->parameters()->get($paramName);\n } catch (\\Exception $e) {\n $parameter = null;\n }\n if (!empty($parameter)) {\n $method = $parameter->getConfig('autocompleteAction');\n $data = $method($query);\n $this->set('status', 'success');\n } else {\n $this->set('status', 'error');\n $this->set('message', __('Field not found'));\n }\n $this->set('data', $data);\n $this->viewBuilder()->setOption('serialize', ['data', 'status', 'message']);\n }",
"function get_autocomplete_ingredients()\r\n {\r\n if(isset($_GET['term']))\r\n {\r\n\t\t\t$ingredient = strtolower($_GET['term']);\r\n \t\t\t\r\n $result = $this->Create_model->get_similar_ingredient_name($ingredient);\r\n $result_array = array();\r\n while($row = mysql_fetch_assoc($result))\r\n {\r\n $result_array[] = $row['ingredientName'];\r\n }\r\n echo json_encode($result_array);\r\n } \r\n }",
"function ajaxVehicleVinSearch() {\n $term = $this->requestPtr->getProperty('term');\n $vehicles = $this->ladeLeitWartePtr->vehiclesPtr->newQuery()\n ->multipleAndWhere('vin', 'ILIKE', '%' . $term . '%')\n ->get(\"vin as label,vin as value\");\n echo json_encode($vehicles);\n exit(0);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is this refund failed? | public function isFailed()
{
return $this->status === RefundStatus::STATUS_FAILED;
} | [
"public function canRefund()\n {\n return $this->getQtyToRefund()>0;\n }",
"public function isRefund(): bool;",
"public function isStatusRefund()\n {\n return $this->status == 'refund';\n }",
"function HasFailedTrans() {}",
"public function isRefund()\n {\n return in_array($this->getType(), array(\n static::TRAN_TYPE_REFUND,\n static::TRAN_TYPE_REFUND_MULTI,\n static::TRAN_TYPE_REFUND_PART,\n ));\n }",
"public function isRefundable(): bool;",
"public function failed()\n {\n return $this->success === false;\n }",
"public function hasFailed()\n {\n return $this->status == 'failed';\n }",
"public function isFailed()\n {\n return $this->status === SettlementStatus::STATUS_FAILED;\n }",
"public function hasFailed()\n {\n return $this->status === 'failed';\n }",
"public function has_failed() {\n\n\t\treturn self::STATUS_UNSENT === $this->get_status();\n\t}",
"public function hasFailed()\n {\n return $this->getPushStatus() === self::STATUS_FAILED;\n }",
"public function canRefundPayment();",
"public function isFailure()\n {\n return $this->ebsrSubmissionStatus->getId() === self::FAILED_STATUS;\n }",
"public function isFailed()\n {\n return !in_array(\n $this->data['state'],\n [\n self::NOTSTARTED,\n self::SNAPSHOT_IN_PROGRESS_DIFF_IN_PROGRESS,\n self::SNAPSHOT_IN_PROGRESS,\n self::PROGRESS,\n self::COMPLETED,\n self::ZIPFILE,\n self::COMPLETED_HOOK_EXECUTED,\n self::WITHOUT_ZIP,\n ]\n );\n }",
"public function isSuccessful()\n {\n if (isset($this->data['object']) && 'transaction' === $this->data['object']) {\n return ($this->data['status'] == self::PAID || \n $this->data['status'] == self::AUTHORIZED ||\n $this->data['status'] == self::REFUNDED);\n }\n return !isset($this->data['errors']);\n }",
"public function canRefund()\n {\n }",
"public function hasRefunds()\n {\n return ! empty($this->_links->refunds);\n }",
"public function isRefunded() {\n return $this->hasState(Transaction::REFUND) ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the HEAD method with a pattern. | public function testHeadWithPattern() {
$pattern = '/:name/:version';
$params = self::$params;
$this->server->listen(8080, '0.0.0.0', function($server, $error) use ($pattern, $params) {
$this->assertNotNull($server);
$this->assertNull($error);
$this->routeMatcher->head($pattern, function($request) use ($params) {
$this->assertEquals(count($request->params), count($params));
foreach ($params as $key => $value) {
$this->assertEquals($value, $request->params[$key]);
}
$request->response->end();
});
$this->client->head(self::URI, function($response) {
$this->assertEquals($response->statusCode, 200);
$this->complete();
})->end();
});
} | [
"public function isHead()\n {\n return $this->getMethod() === 'HEAD';\n }",
"public static function isHEAD(){return self::$method==='HEAD';}",
"public function testHeadMethodRoute(): void\n {\n $this->head('/head/request_action/test_request_action');\n $this->assertResponseSuccess();\n }",
"public function getIsHead()\n {\n return $this->getMethod() === 'HEAD';\n }",
"#[@test]\n public function doHead() {\n $this->newRequest('HEAD', new \\peer\\URL('http://localhost/'));\n \n $s= newinstance('scriptlet.HttpScriptlet', array(), '{\n public function doHead($request, $response) {\n $response->write(\"Hello HEAD\");\n }\n }');\n $response= $s->process();\n $this->assertEquals(\\peer\\http\\HttpConstants::STATUS_OK, $response->statusCode);\n $this->assertEquals('Hello HEAD', $response->getContent());\n }",
"public function testRouteSpecifyingGetMatchesHead()\n {\n $route = new Route('/foo', 'foo', ['GET']);\n\n $uri = $this->prophesize(UriInterface::class);\n $uri->getPath()->willReturn('/foo');\n\n $request = $this->prophesize(ServerRequestInterface::class);\n $request->getUri()->willReturn($uri);\n $request->getMethod()->willReturn('HEAD');\n\n // This test needs to determine what the default dispatcher does with\n // HEAD requests when the route does not support them. As a result,\n // it does not mock the router or dispatcher.\n $router = new FastRouteRouter();\n $router->addRoute($route); // Must add, so we can determine middleware later\n $result = $router->match($request->reveal());\n $this->assertInstanceOf(RouteResult::class, $result);\n $this->assertTrue($result->isSuccess());\n }",
"public function processHeaderHead()\n {\n $this->headerList->putUserAgent('TestSuite');\n $httpRequest = new TeststubHTTPRequest($this->httpURL, $this->headerList, 2);\n $mockSocket = $this->getMock('stubSocket', array(), array('example.com'));\n $mockSocket->expects($this->once())->method('setTimeout')->with($this->equalTo(2));\n $mockSocket->expects($this->at(2))\n ->method('write')\n ->with($this->equalTo(stubHTTPRequest::METHOD_HEAD . ' / ' . stubHTTPRequest::VERSION_1_1 . stubHTTPConnection::END_OF_LINE));\n $mockSocket->expects($this->at(3))\n ->method('write')\n ->with($this->equalTo('Host: example.com' . stubHTTPConnection::END_OF_LINE));\n $mockSocket->expects($this->at(4))\n ->method('write')\n ->with($this->equalTo('User-Agent: TestSuite' . stubHTTPConnection::END_OF_LINE));\n $mockSocket->expects($this->at(5))\n ->method('write')\n ->with($this->equalTo('X-Binford: More power!' . stubHTTPConnection::END_OF_LINE));\n $mockSocket->expects($this->at(6))\n ->method('write')\n ->with($this->stringStartsWith('Date: '));\n $httpRequest->callProcessHeader($mockSocket, stubHTTPRequest::METHOD_HEAD, stubHTTPRequest::VERSION_1_1);\n }",
"public function addHead($pattern, $paths = null) {\n\n\t\treturn $this->_addRoute($pattern, $paths, 'HEAD');\n\t}",
"public function isHead()\n {\n return 'HEAD' === $this->requestMethod;\n }",
"public function testIsHead()\n {\n $env = \\Slim\\Environment::mock(array(\n 'REQUEST_METHOD' => 'HEAD',\n ));\n $req = new \\Slim\\Http\\Request($env);\n $this->assertFalse($req->isGet());\n $this->assertFalse($req->isPost());\n $this->assertFalse($req->isPut());\n $this->assertFalse($req->isDelete());\n $this->assertFalse($req->isOptions());\n $this->assertTrue($req->isHead());\n }",
"public function It_should_remove_body_from_HEAD_requests()\n\t{\n\t\t$response = self::responseFor( array( 'REQUEST_METHOD' => 'HEAD' ) );\n\t\t$this->assertEquals( 200, $response[ 0 ] );\n\t\t$this->assertEquals( array( 'Content-type' => 'test/plain', 'Content-length' => '3' ), $response[ 1 ] );\n\t\t$this->assertEquals( array(), $response[ 2 ] );\n\t}",
"public function testProxyCoreV1HEADNode()\n {\n\n }",
"public function isHead():Bool {\n\n\t\treturn ($this->getRequestMethod() === 'HEAD');\n\n\t}",
"public function head(string $pattern, $handler): RouteInterface;",
"public function isHEAD()\n {\n return ($this->getRequestMethod() == 'HEAD');\n }",
"public function isHead()\n {\n return ($this->getServer('REQUEST_METHOD') == 'HEAD');\n }",
"function http_head ($url = null, array $options = null , array &$info = null ) {}",
"function &head($url) {\n\t\t$this->setRequestMethod('HEAD');\n\t\t$this->head_custom($url);\n\n\t\t$this->connect();\n\n\t\treturn $this->send('');\n\t}",
"function _curl_head($ch,$buf)\n {\n // echo \"S3Connection::_curl_head($ch,$buf)\\n\";\n $ret = strlen($buf);\n /*\n if (preg_match('/^HTTP\\/1\\.1 (\\d{3}) (.+)/',$buf,$m))\n {\n $this->_status_code = $m[1];\n $this->_status_mesg = $m[2];\n }\n else\n */\n if (preg_match('/^(.+?):(.+)/',$buf,$m)) $this->_head[strtolower(trim($m[1]))] = trim($m[2]);\n // note: HTTP 1.1 (rfc2616) says that 404 and HEAD should not have response.\n // note: CURL will hang if we don't force close by return 0 here\n // note: http://developer.amazonwebservices.com/connect/thread.jspa?messageID=40930\n // Last Line of Headers\n if (($ret==2) && ($this->_http_request_verb=='HEAD')) return 0;\n return $ret;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
storeApplicationOtherFile this function store records for appliation files | function storeApplicationOtherFile($insertData = array()) {
if (!empty($insertData)) {
$this->db->insert('pulsed_teachers_other_files', $insertData);
return $this->db->insert_id();
}
else
return 0;
} | [
"public function storeFile() {}",
"function storeFiles()\n {\n }",
"protected function writeSysFileStorageRecords() {}",
"protected function writeSysFileRecords() {}",
"function store(){\r\n\t\t//store to file\r\n\t}",
"public function export_addFilesFromSysFilesRecords() {}",
"protected function set_store_files($vals){$this->user_attr ['store_files'] = $vals ;}",
"private function processAppData($application)\n\t{\n\t\t$application['author'] = $this->getAppAuthorName($application['author']);\n\t\t$application['logo'] = $this->getLogoPath($application['logo']);\n\t\t$application['screenshot'] = $this->getScreenshotsPath($application['screenshot']);\n\t\tif ($application['platforms'])\n\t\t{\n\t\t\tif ($platforms = $this->getAppPlatforms($application['id']));\n\t\t\t\t$application['platforms'] = implode(',', array_keys($platforms));\n\t\t}\n\t\telse {\n\t\t\t$application['platforms'] = null;\n\t\t}\n\t\tif (t3lib_extMgm::isLoaded('ics_od_categories'))\n\t\t{\n\n\t\t\tif ($application['categories'])\n\t\t\t{\n\t\t\t\tif ($categories = $this->getAppCategories($application['id']));\n\t\t\t\t\t$application['categories'] = implode(',', array_keys($categories));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$application['categories'] = null;\n\t\t\t}\n\t\t}\n\t\tif (t3lib_extMgm::isLoaded('ics_od_datastore'))\n\t\t{\n\n\t\t\tif ($application['datasets'])\n\t\t\t{\n\t\t\t\tif ($datasets = $this->getAppDatasets($application['id']));\n\t\t\t\t\t$application['datasets'] = implode(',', array_keys($datasets));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$application['datasets'] = null;\n\t\t\t}\n\t\t}\n\t\treturn $application;\n\t}",
"public function saveFile(string $app, string $language): void;",
"function registerMimeMeta($mimes_table_name\n , $appl_table_name\n , $filename\n , $filetype\n , $fileextension\n , $filesize\n , $filepath\n , $filefolder\n , $tablename\n , $sitepackage\n , $sitealias)\n {\n $this->gdlog()->LogInfoStartFUNCTION(\"registerMimeMeta()\");\n $fr;\n \n $this->mimes_table_name = $mimes_table_name;\n $this->appl_table_name = $appl_table_name;\n $this->filepath = $filepath;\n $this->filesize = $filesize;\n \n $sqlstmnt = \"INSERT INTO \". $this->mimes_table_name .\" SET \".\n \"uid=UUID(), createddt=NOW(), changeddt=NOW(), \".\n \"filename=:filename, filetype=:filetype, \".\n \"fileextension=:fileextension, filesize=:filesize, \".\n \"filepath=:filepath, filefolder=:filefolder, \".\n \"tablename=:tablename, sitepackage=:sitepackage, sitealias=:sitealias\";\n \n $dbcontrol = new ZAppDatabase();\n $dbcontrol->setApplicationDB(\"CROSSAPPDATA\");\n $dbcontrol->setStatement($sqlstmnt);\n $dbcontrol->bindParam(\":filename\", $filename);\n $dbcontrol->bindParam(\":filetype\", $filetype);\n $dbcontrol->bindParam(\":fileextension\", $fileextension);\n $dbcontrol->bindParam(\":filesize\", $this->filesize);\n $dbcontrol->bindParam(\":filepath\", $this->filepath);\n $dbcontrol->bindParam(\":filefolder\", $filefolder);\n $dbcontrol->bindParam(\":tablename\", $this->tablename);\n $dbcontrol->bindParam(\":sitepackage\", $sitepackage);\n $dbcontrol->bindParam(\":sitealias\", $sitealias);\n $dbcontrol->execUpdate();\n\n if($dbcontrol->getTransactionGood())\n {\n if($dbcontrol->getRowCount() > 0)\n {\n $lid = $dbcontrol->getLastInsertID();\n $this->saveActivityLog(\"MIME_REGISTERED\",\"Account has been registered\".\n \":lid:\".$lid.\n \":filename:\".$filename.\":\".\n \":filetype:\".$filetype.\":\".\n \":fileextension:\".$fileextension.\":\".\n \":filesize:\".$filesize.\":\".\n \":filepath:\".$filepath.\":\".\n \":filefolder:\".$filefolder.\":\".\n \":tablename:\".$tablename.\":\".\n \":sitepackage:\".$sitepackage.\":\".\n \":sitealias:\".$sitealias.\":\");\n\n $row = $dbcontrol->getRowfromLastId($dbcontrol, \"mimes\", $lid);\n $this->mimes_uid = $row[\"uid\"];\n $this->gdlog()->LogInfo(\"registerMime():MIME_REGISTERED\");\n $fr = \"MIME_REGISTERED\";\n }\n else\n {\n $this->gdlog()->LogInfo(\"registerMime():MIME_NOT_REGISTERED\");\n $fr = \"MIME_NOT_REGISTERED\";\n }\n }\n else\n {\n $this->gdlog()->LogError(\"registerMime():TRANSACTION_FAIL\");\n $fr = \"TRANSACTION_FAIL\";\n }\n $this->gdlog()->LogInfoEndFUNCTION(\"registerMimeMeta()\");\n return $fr;\n }",
"private function s_write_request_data_2_files() {\n\t\ttry {\n\t\t\t$arht_meta=array();\n\t\t\t$this->s_write_request_data_2_files_h2_file_uploads($arht_meta);\n\t\t\t$this->s_write_request_data_2_files_h1($_POST,\n\t\t\t\t$arht_meta,'s_progfte_post');\n\t\t\t$this->s_write_request_data_2_files_h1($_GET,\n\t\t\t\t$arht_meta,'s_progfte_get');\n\t\t\t$s_progfte_meta=sireProgFTE::ht2ProgFTE($arht_meta);\n\t\t\tsirelFS::str2file($s_progfte_meta,$this->s_fp_metadata_);\n\t\t}catch (Exception $err_exception) {\n\t\t\tsirelBubble_t2($err_exception,\n\t\t\t\t\" GUID='14c88124-0fd8-4ff0-a397-41f2f080bdd7'\");\n\t\t} // catch\n\t}",
"private function saveFile()\n\t{\n\t\tfile_put_contents($this->filename, serialize($this->persistenceArray));\n\t}",
"protected function saveApp()\n\t{\n\t\t// these are based off the asynch result... if there isn't a result, we have a problem.\n\t\t$ruleset = $this->getRuleset($this->ar->getRulesetId());\n\n\t\tif ($ruleset === FALSE)\n\t\t{\n\t\t\tthrow new Exception('Missing loan_type for cfe_rule_set, '.$this->ar->getRulesetId());\n\t\t}\n\n\t\t$this->inserts[self::INDEX_APPLICATION]->loan_type_id = $ruleset['loan_type_id'];\n\t\t$this->inserts[self::INDEX_APPLICATION]->cfe_rule_set_id = $this->ar->getRulesetId();\n\t\t$this->inserts[self::INDEX_APPLICATION]->rule_set_id = $ruleset['rule_set_id'];\n\n\t\tparent::saveApp();\n\t}",
"public function storeDocument($file);",
"abstract protected function storeExtension();",
"function saveAppBarcodeInfo($appId,$initiatingBarcode,$personalDetBarcode,$idDocBarcodes,$usedbydate)\n {\n $fieldArray['application_id'] = $appId;\n $fieldArray['initiating_barcode'] = str_replace(' ', '', $initiatingBarcode);\n $fieldArray['personal_barcode'] = str_replace(' ', '', $personalDetBarcode);\n $fieldArray['id_docB_barcode'] = str_replace(' ', '', $idDocBarcodes[0]);\n $fieldArray['id_docC_barcode'] = str_replace(' ', '', $idDocBarcodes[1]);\n $fieldArray['id_docD_barcode'] = str_replace(' ', '', $idDocBarcodes[2]);\n \n if(count($idDocBarcodes) == 4)$idDocBarcodes[4]='';\n if(count($idDocBarcodes) == 3)\n {\n $idDocBarcodes[3]='';\n $idDocBarcodes[4]='';\n }\n $fieldArray['id_docE_barcode'] = str_replace(' ', '', $idDocBarcodes[3]);\n $fieldArray['id_docF_barcode'] = str_replace(' ', '', $idDocBarcodes[4]);\n $fieldArray['used_by_date'] = $usedbydate;\n $fieldArray['fees'] = $this->TOTAL_FEE;\n $tableName = 'application_barcode_info';\n \n $this->Insert($tableName, $fieldArray);\n \n }",
"private function store()\n {\n $settings = [];\n foreach ($this->settings as $key => $value) {\n $settings[$key] = serialize($value);\n }\n $this->files->put($this->filepath, json_encode($settings));\n }",
"public function retrieve_other_files() \n {\n }",
"public function custom_save() {\n $path = storage_path('app/attachments');\n $filename = $this->token();\n $path = substr($path, -1) == DIRECTORY_SEPARATOR ? $path : $path.DIRECTORY_SEPARATOR;\n\n $file = File::put($path.$filename, $this->getContent()) !== false;\n\n $emailAttachment = new EmailAttachment();\n\n $emailAttachment->uid = $this->getMessage()->getUid();\n $emailAttachment->attachmentid = $this->id;\n $emailAttachment->filename = $filename = $this->token();\n $emailAttachment->original = $this->name;\n $emailAttachment->mime = \\Storage::disk('attachments')->mimeType($filename);\n\n $emailAttachment->save();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get URL for back (reset) button | public function getBackUrl()
{
return $this->getUrl('*/*/');
} | [
"public function getBackButton() {\n return $this->backButtonUrl;\n }",
"function getResetUrl();",
"private function getsetBackURL()\t{\n\t\ttrace('[CMD] '.__METHOD__);\n\n\t\t// try to get backURL from form or GPVARS\n\t\t$backURL = $this->piVars['backURL'];\ntrace($backURL);\n\t\tif (! $backURL) {\n\t\t\t$backURL = t3lib_div::_GP('backURL');\ntrace($backURL);\n\t\t}\n\n\t\t// check or set session\n\t\tif ($backURL) {\n\t\t\t// store in session for stuff such as language change\n \ttx_pttools_sessionStorageAdapter::getInstance()->store(self::SESSION_KEY_BACKURL, $backURL);\n\t\t}\n\t\telse {\n\t\t\t// try to fetch from session\n\t\t\t$backURL = tx_pttools_sessionStorageAdapter::getInstance()->read(self::SESSION_KEY_BACKURL);\ntrace($backURL);\n\t\t}\n\n\t\ttrace($backURL);\n\t\treturn $backURL;\n\t}",
"public function getBackButtonUrl()\n {\n if ($this->getCustomerAddressCount()) {\n return $this->getUrl('customer/address');\n } else {\n return $this->getUrl('customer/account/');\n }\n }",
"public function getBackUrl() {\n\t\treturn $this -> getUrl('*/*/index');\n\t}",
"public function getBackUrl()\n {\n if ($this->session->isLoggedIn()) {\n return $this->getUrl('*/*/index', array('_secure' => true, '_nosid' => true));\n }\n return $this->getUrl('*/*/form', array('_secure' => true, '_nosid' => true));\n }",
"public function getBackAction() \n\t{\n\t\treturn $this->getUrl('testone/');\n\t}",
"public function setUrlPrevious ();",
"public function back();",
"public function getBackRefUrl()\n {\n return $this->backRefUrl;\n }",
"protected function _getUrlToRedirectBackTo()\n {\n $urlToRedirectBackTo = $this->request->here(false);\n if (!$this->request->is('get')) {\n $urlToRedirectBackTo = $this->request->referer(true);\n }\n\n return $urlToRedirectBackTo;\n }",
"public function get_assessment_back_url();",
"function getbackButton(){\n return \">Zurück zur Startseite</button>\";\n}",
"public function previousUrl()\n {\n return $this->get('_previous.url');\n }",
"function referrer_url()\n {\n return app(UrlGenerator::class)->previous();\n }",
"public function getResetLink()\n {\n return $this->resetLink;\n }",
"protected function BackLink()\n {\n return BackendRouter::ModuleUrl(new Overview());\n }",
"public function getPreviousUrl() {\n return $this->get(self::PREVIOUS);\n }",
"public function getBackUrl() {\n \t/** Get Current url */\n $currentUrlVal = Mage::helper ( 'core/url' )->getCurrentUrl ();\n /** getting current Url */\n $secureVal = strstr ( $currentUrlVal, \"https\" );\n $true = true;\n if ($secureVal == $true) {\n return $this->getUrl ( 'marketplace/seller/login', array (\n '_secure' => true \n ) );\n } else {\n return $this->getUrl ( 'marketplace/seller/login' );\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method initialize ajax core | public function initAjaxCore(){
if (!$this->AJAX){
// Load JsHttpRequest backend.
require_once $this->vars['DOC_DIR']."share/js/JsHttpRequest/JsHttpRequest.php";
// Create main library object. You MUST specify page encoding!
$this->AJAX = new \JsHttpRequest($this->vars['codepage'], $this);
}
return $this->AJAX;
} | [
"public function initAjax()\n {\n }",
"public function initAjaxHooks();",
"function sajax_init() {\n\t}",
"function init(){\n\t //add a javascript library for easy interaction with the server\n\t Requirements::javascript('mysite/javascript/jQuery.js');\n\t if(Director::is_ajax() || $_GET[\"ajaxDebug\"]) {\n\t $this->isAjax = true;\n\t } else {\n\t $this->isAjax = false;\n\t } \n\t parent::init();\n\t }",
"public function init()\r\n {\r\n $ajaxContext = $this->_helper->getHelper(\"ajaxContext\")\r\n ->addActionContext('loginx','json')\r\n //->setAutoJsonSerialization(false)\r\n ->setAutoDisableLayout(true)\r\n ->initContext('json');\r\n }",
"public function init()\n\t{\n\n\t\t$ajaxContext = $this->_helper->getHelper('AjaxContext');\n $ajaxContext->addActionContext('prices', 'html')\n ->addActionContext('comments', 'html')\n ->addActionContext('newcomment', 'json')\n ->addActionContext('rate', 'json')\n ->initContext();\n\t}",
"public function ajax_init() {\n\n $jsObject = array( 'ajaxurl' => admin_url( 'admin-ajax.php' ).'?action='.$this->slug); \n wp_localize_script( 'jquery', $this->slug, $jsObject );\n // this hook is fired if the current viewer is not logged in\n add_action( 'wp_ajax_nopriv_'.$this->slug, array( &$this, 'ajax_handler' ) );\n add_action( 'wp_ajax_'.$this->slug, array( &$this, 'ajax_handler' ) );\n }",
"public function __construct()\n {\n parent::__construct();\n $this->addContext('html', array('suffix' => 'ajax'));\n }",
"public function ajax_request()\n {\n ;\n }",
"protected function _initAjaxContext()\r\n {\r\n if(isset($this->ajaxable)) {\r\n $this->_helper->ajaxContext->initContext();\r\n if($this->_helper->ajaxContext->getCurrentContext() != null)\r\n $this->_context = $this->_helper->ajaxContext->getCurrentContext();\r\n }\r\n }",
"public function ajax();",
"private function init_OptionsViaAJAX() {\n $this->set_QueryParams();\n if ( !empty( $this->formdata ) ) {\n array_walk($this->formdata , array($this,'set_ValidOptions') );\n }\n }",
"public function register_ajax_hooks()\n {\n }",
"public function init()\n {\n parent::init();\n\n $this->initBuffering();\n $this->initOptions();\n $this->initComponentProps();\n $this->initEvents();\n $this->registerJs();\n }",
"public function init()\n\t{\n\t\t$this->jsConfig = new stdClass();\n\t\t$this->jsConfig->urls = array('baseUrl' => Yii::app()->getBaseUrl(true), 'relativeUrl' => Yii::app()->getBaseUrl(false));\n\t\t$this->jsConfig->current = array('controller' => Yii::app()->controller->id, 'url' => Yii::app()->request->url);\n\t\t\n\t\tif (isset(Yii::app()->session['menu']))\n\t\t{\n\t\t\t$this->action_menu = Yii::app()->session['menu'];\n\t\t}\n\t\t\n\t\tparent::init();\n\t}",
"protected function _process_ajax() {}",
"public function register_ajax_hooks();",
"abstract protected function run_AJAX();",
"public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Paginator');\n $this->loadComponent('Resize');\n $this->loadComponent('Utility');\n $this->loadComponent('Cookie', ['expiry' => '30 day']);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filter the query on the last_update column Example usage: $query>filterByLastUpdate('20110314'); // WHERE last_update = '20110314' $query>filterByLastUpdate('now'); // WHERE last_update = '20110314' $query>filterByLastUpdate(array('max' => 'yesterday')); // WHERE last_update > '20110313' | public function filterByLastUpdate($lastUpdate = null, $comparison = null)
{
if (is_array($lastUpdate)) {
$useMinMax = false;
if (isset($lastUpdate['min'])) {
$this->addUsingAlias(SekolahPeer::LAST_UPDATE, $lastUpdate['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($lastUpdate['max'])) {
$this->addUsingAlias(SekolahPeer::LAST_UPDATE, $lastUpdate['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(SekolahPeer::LAST_UPDATE, $lastUpdate, $comparison);
} | [
"public function filterByLastUpdate($lastUpdate = null, $comparison = null)\n {\n if (is_array($lastUpdate)) {\n $useMinMax = false;\n if (isset($lastUpdate['min'])) {\n $this->addUsingAlias(PenggunaPeer::LAST_UPDATE, $lastUpdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastUpdate['max'])) {\n $this->addUsingAlias(PenggunaPeer::LAST_UPDATE, $lastUpdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(PenggunaPeer::LAST_UPDATE, $lastUpdate, $comparison);\n }",
"public function filterByLastUpdate($lastUpdate = null, $comparison = null)\n {\n if (is_array($lastUpdate)) {\n $useMinMax = false;\n if (isset($lastUpdate['min'])) {\n $this->addUsingAlias(LayananKhususPeer::LAST_UPDATE, $lastUpdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastUpdate['max'])) {\n $this->addUsingAlias(LayananKhususPeer::LAST_UPDATE, $lastUpdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(LayananKhususPeer::LAST_UPDATE, $lastUpdate, $comparison);\n }",
"public function filterByLastUpdate($lastUpdate = null, $comparison = null)\n {\n if (is_array($lastUpdate)) {\n $useMinMax = false;\n if (isset($lastUpdate['min'])) {\n $this->addUsingAlias(AnakPeer::LAST_UPDATE, $lastUpdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastUpdate['max'])) {\n $this->addUsingAlias(AnakPeer::LAST_UPDATE, $lastUpdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AnakPeer::LAST_UPDATE, $lastUpdate, $comparison);\n }",
"public function filterByLastUpdate($lastUpdate = null, $comparison = null)\n {\n if (is_array($lastUpdate)) {\n $useMinMax = false;\n if (isset($lastUpdate['min'])) {\n $this->addUsingAlias(PeranPeer::LAST_UPDATE, $lastUpdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastUpdate['max'])) {\n $this->addUsingAlias(PeranPeer::LAST_UPDATE, $lastUpdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(PeranPeer::LAST_UPDATE, $lastUpdate, $comparison);\n }",
"public function filterByLastUpdate($lastUpdate = null, $comparison = null)\n {\n if (is_array($lastUpdate)) {\n $useMinMax = false;\n if (isset($lastUpdate['min'])) {\n $this->addUsingAlias(RuangPeer::LAST_UPDATE, $lastUpdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastUpdate['max'])) {\n $this->addUsingAlias(RuangPeer::LAST_UPDATE, $lastUpdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(RuangPeer::LAST_UPDATE, $lastUpdate, $comparison);\n }",
"public function filterByLastUpdate($lastUpdate = null, $comparison = null)\n {\n if (is_array($lastUpdate)) {\n $useMinMax = false;\n if (isset($lastUpdate['min'])) {\n $this->addUsingAlias(AngkutanPeer::LAST_UPDATE, $lastUpdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastUpdate['max'])) {\n $this->addUsingAlias(AngkutanPeer::LAST_UPDATE, $lastUpdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AngkutanPeer::LAST_UPDATE, $lastUpdate, $comparison);\n }",
"public function filterByLastUpdate($lastUpdate = null, $comparison = null)\n {\n if (is_array($lastUpdate)) {\n $useMinMax = false;\n if (isset($lastUpdate['min'])) {\n $this->addUsingAlias(SasaranPengawasanPeer::LAST_UPDATE, $lastUpdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastUpdate['max'])) {\n $this->addUsingAlias(SasaranPengawasanPeer::LAST_UPDATE, $lastUpdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SasaranPengawasanPeer::LAST_UPDATE, $lastUpdate, $comparison);\n }",
"public function filterByLastUpdate($lastUpdate = null, $comparison = null)\n {\n if (is_array($lastUpdate)) {\n $useMinMax = false;\n if (isset($lastUpdate['min'])) {\n $this->addUsingAlias(PenggunaTableMap::COL_LAST_UPDATE, $lastUpdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastUpdate['max'])) {\n $this->addUsingAlias(PenggunaTableMap::COL_LAST_UPDATE, $lastUpdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(PenggunaTableMap::COL_LAST_UPDATE, $lastUpdate, $comparison);\n }",
"public function filterByLastUpdated($lastUpdated = null, $comparison = null)\n {\n if (is_array($lastUpdated)) {\n $useMinMax = false;\n if (isset($lastUpdated['min'])) {\n $this->addUsingAlias(ServiceTableMap::COL_LAST_UPDATED, $lastUpdated['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastUpdated['max'])) {\n $this->addUsingAlias(ServiceTableMap::COL_LAST_UPDATED, $lastUpdated['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ServiceTableMap::COL_LAST_UPDATED, $lastUpdated, $comparison);\n }",
"public function filterByLastUpdated($lastUpdated = null, $comparison = null)\n\t{\n\t\tif (is_array($lastUpdated)) {\n\t\t\t$useMinMax = false;\n\t\t\tif (isset($lastUpdated['min'])) {\n\t\t\t\t$this->addUsingAlias(IntentFormsPeer::LAST_UPDATED, $lastUpdated['min'], Criteria::GREATER_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif (isset($lastUpdated['max'])) {\n\t\t\t\t$this->addUsingAlias(IntentFormsPeer::LAST_UPDATED, $lastUpdated['max'], Criteria::LESS_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif ($useMinMax) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (null === $comparison) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(IntentFormsPeer::LAST_UPDATED, $lastUpdated, $comparison);\n\t}",
"public function filterByLastPasswordUpdate($lastPasswordUpdate = null, $comparison = null)\n {\n if (is_array($lastPasswordUpdate)) {\n $useMinMax = false;\n if (isset($lastPasswordUpdate['min'])) {\n $this->addUsingAlias(AccountPeer::LAST_PASSWORD_UPDATE, $lastPasswordUpdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastPasswordUpdate['max'])) {\n $this->addUsingAlias(AccountPeer::LAST_PASSWORD_UPDATE, $lastPasswordUpdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AccountPeer::LAST_PASSWORD_UPDATE, $lastPasswordUpdate, $comparison);\n }",
"public function lastUpdateDate();",
"private function GetLastUpdateDate()\r {\r \r // ----- get the records\r $where_pipeline = ($this->Pipeline_Status) ? \" AND pipeline_status='{$this->Pipeline_Status}'\" : '';\r $record = $this->SQL->GetRecord(array(\r 'table' => $this->Table,\r 'keys' => 'MAX(updated) AS MAXDATE',\r 'where' => \"active=1 AND status_hide_from_pipeline=0 {$where_pipeline}\",\r ));\r //$this->SQL->EchoQuery($this->Classname, __FUNCTION__, false);\r \r \r \r if (isset($record['MAXDATE'])) {\r $date_current = $record['MAXDATE'];\r $timezone_database = $this->Timezone_Database; // timezone of database\r $timezone_local = $this->Timezone_Local; // timezone of user\r $output_format = $this->Output_Format; // output timestamp format 'Y-m-d H:i:s T'\r $Obj_Date = new DateTime($date_current, new DateTimeZone($timezone_database));\r $Obj_Date->setTimezone(new DateTimeZone($timezone_local)); // set tiezone to local\r $output = $Obj_Date->format($output_format); // format and output date\r } else {\r $output = 'n/a';\r }\r \r return $output;\r }",
"public function getAllNewEvents($last_update) {\n $result = $this->con->query(\"SELECT * FROM uci_events WHERE (unix_timestamp(last_updated) > $last_update) AND ( (unix_timestamp(start_time) > unix_timestamp(NOW())) OR (end_time != null AND unix_timestamp(end_time) > unix_timestamp(now())) )\");\n return $result;\n }",
"public function applyLatestOnlyCondition(Event $event)\n {\n /** @var \\yii\\db\\BaseActiveRecord|\\zarv1k\\sync\\twoway\\behavior\\model\\SyncableBehavior $model */\n $model = $event->data;\n /** @var \\yii\\db\\ActiveRecordInterface $modelClass */\n $modelClass = $this->owner->modelClass;\n /** @var ActiveQuery $activeQuery */\n $activeQuery = $event->sender;\n\n $updatedAfterDate = \\Yii::$app->request->getQueryParam($model->timestampQueryParam);\n\n $orderBy = [$model->timestampColumn => SORT_ASC];\n foreach ($modelClass::primaryKey() as $column) {\n $orderBy[$column] = SORT_ASC;\n }\n\n $activeQuery\n ->andFilterWhere(['>', $model->timestampColumn, $updatedAfterDate])\n ->addOrderBy($orderBy);\n\n Event::off(ActiveQuery::className(), ActiveQuery::EVENT_INIT, [$this, 'applyLatestOnlyCondition']);\n }",
"public function filterByLastEntry($lastEntry = null, $comparison = null)\n {\n if (is_array($lastEntry)) {\n $useMinMax = false;\n if (isset($lastEntry['min'])) {\n $this->addUsingAlias(UserPeer::LAST_ENTRY, $lastEntry['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lastEntry['max'])) {\n $this->addUsingAlias(UserPeer::LAST_ENTRY, $lastEntry['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(UserPeer::LAST_ENTRY, $lastEntry, $comparison);\n }",
"public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(SchoolClassPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(SchoolClassPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SchoolClassPeer::UPDATED_BY, $updatedBy, $comparison);\n }",
"public function setLastAppliedUpdate($callback);",
"public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(SearchIndexPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(SearchIndexPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SearchIndexPeer::UPDATED_BY, $updatedBy, $comparison);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation listSubAccountTransfersAsync Retrieve transfer records between main and sub accounts Note: the input parameter is an associative array with the keys listed as the parameter name below | public function listSubAccountTransfersAsync($associative_array)
{
return $this->listSubAccountTransfersAsyncWithHttpInfo($associative_array)
->then(
function ($response) {
return $response[0];
}
);
} | [
"public function listSubAccountTransfersAsyncWithHttpInfo($associative_array)\n {\n $returnType = '\\GateApi\\Model\\SubAccountTransfer[]';\n $request = $this->listSubAccountTransfersRequest($associative_array);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function listSubAccountTransfersRequest($associative_array)\n {\n // unbox the parameters from the associative array\n $sub_uid = array_key_exists('sub_uid', $associative_array) ? $associative_array['sub_uid'] : null;\n $from = array_key_exists('from', $associative_array) ? $associative_array['from'] : null;\n $to = array_key_exists('to', $associative_array) ? $associative_array['to'] : null;\n $limit = array_key_exists('limit', $associative_array) ? $associative_array['limit'] : 100;\n $offset = array_key_exists('offset', $associative_array) ? $associative_array['offset'] : 0;\n\n if ($limit !== null && $limit > 1000) {\n throw new \\InvalidArgumentException('invalid value for \"$limit\" when calling WalletApi.listSubAccountTransfers, must be smaller than or equal to 1000.');\n }\n if ($limit !== null && $limit < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$limit\" when calling WalletApi.listSubAccountTransfers, must be bigger than or equal to 1.');\n }\n\n if ($offset !== null && $offset < 0) {\n throw new \\InvalidArgumentException('invalid value for \"$offset\" when calling WalletApi.listSubAccountTransfers, must be bigger than or equal to 0.');\n }\n\n\n $resourcePath = '/wallet/sub_account_transfers';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($sub_uid !== null) {\n if('form' === 'form' && is_array($sub_uid)) {\n foreach($sub_uid as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sub_uid'] = $sub_uid;\n }\n }\n\n // query params\n if ($from !== null) {\n if('form' === 'form' && is_array($from)) {\n foreach($from as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['from'] = $from;\n }\n }\n\n // query params\n if ($to !== null) {\n if('form' === 'form' && is_array($to)) {\n foreach($to as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['to'] = $to;\n }\n }\n\n // query params\n if ($limit !== null) {\n if('form' === 'form' && is_array($limit)) {\n foreach($limit as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['limit'] = $limit;\n }\n }\n\n // query params\n if ($offset !== null) {\n if('form' === 'form' && is_array($offset)) {\n foreach($offset as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['offset'] = $offset;\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 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 // this endpoint requires Gate APIv4 authentication\n $signHeaders = $this->config->buildSignHeaders('GET', $resourcePath, $queryParams, $httpBody);\n $headers = array_merge($headers, $signHeaders);\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 subAccountTransfer($params)\n {\n return $this->httpPostJson('/api/v4/wallet/sub_account_transfers', $params, [], 'SIGN');\n }",
"public function listSubAccountTransfersWithHttpInfo($associative_array)\n {\n $request = $this->listSubAccountTransfersRequest($associative_array);\n\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n $responseBody = $e->getResponse() ? (string) $e->getResponse()->getBody() : null;\n if ($responseBody !== null) {\n $gateError = json_decode($responseBody, true);\n if ($gateError !== null && isset($gateError['label'])) {\n throw new GateApiException(\n $gateError,\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $responseBody\n );\n }\n }\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $responseBody\n );\n }\n\n $returnType = '\\GateApi\\Model\\SubAccountTransfer[]';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }",
"public function listSubAccountBalancesAsync($associative_array)\n {\n return $this->listSubAccountBalancesAsyncWithHttpInfo($associative_array)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function listSubAccountFuturesBalancesAsync($associative_array)\n {\n return $this->listSubAccountFuturesBalancesAsyncWithHttpInfo($associative_array)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getTransfers() {\n\t\t$args = [];\n\t\t$args[\"jsonrpc\"] = self::RPC_V;\n\t\t$args[\"method\"] = \"get_transfers\";\n\t\t$args[\"id\"] = $this->id_connection;\n\t\t$args[\"params\"] = [];\n\n\t\t$result = [];\n\t\t$data = $this->apiCall($args);\n\t\t$result[\"status\"] = false;\n\n\t\tif (!$data === false) {\n\t\t\tif (isset($data[\"id\"])) {\n\t\t\t\tif ($data[\"id\"] == $this->id_connection) {\n\t\t\t\t\t$result[\"status\"] = true;\n\t\t\t\t\tif (isset($data[\"result\"][\"transfers\"])) {\n\t\t\t\t\t\t$result[\"status\"] = true;\n\t\t\t\t\t\tforeach ($data[\"result\"][\"transfers\"] as $key => $transfer) {\n\t\t\t\t\t\t\t$transferItem = [];\n\t\t\t\t\t\t\t$transferItem[\"address\"] = $transfer[\"address\"];\n\t\t\t\t\t\t\t$transferItem[\"amount\"] = self::balanceFormat($transfer[\"amount\"]);\n\t\t\t\t\t\t\t$transferItem[\"fee\"] = self::balanceFormat($transfer[\"fee\"]);\n\t\t\t\t\t\t\t$transferItem[\"block_index\"] = $transfer[\"blockIndex\"];\n\t\t\t\t\t\t\t$transferItem[\"output\"] = $transfer[\"output\"];\n\t\t\t\t\t\t\t$transferItem[\"payment_id\"] = $transfer[\"paymentId\"];\n\t\t\t\t\t\t\t$transferItem[\"time\"] = $transfer[\"time\"];\n\t\t\t\t\t\t\t$transferItem[\"transaction_hash\"] = $transfer[\"transactionHash\"];\n\t\t\t\t\t\t\t$transferItem[\"unlock_time\"] = $transfer[\"unlockTime\"];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$result[\"transfers\"][$key] = $transferItem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function listSubaccounts() {\n return $this->makeRequest(\"getSubaccounts\", NULL, NULL);\n }",
"public function GetSubAccountList() {\n return ApiClient::Request('account/getsubaccountlist');\n }",
"public function listSubAccountMarginBalancesAsyncWithHttpInfo($associative_array)\n {\n $returnType = '\\GateApi\\Model\\SubAccountMarginBalance[]';\n $request = $this->listSubAccountMarginBalancesRequest($associative_array);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function listSubAccountMarginBalancesAsync($associative_array)\n {\n return $this->listSubAccountMarginBalancesAsyncWithHttpInfo($associative_array)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getAllTransfers()\n {\n $this->_params = array(\n \"per_page\"=> isset($this->per_page) ? $this->per_page : 25,\n \"status\"=> isset($this->status) ? $this->status : '',\n \"start\"=> isset($this->start) ? $this->start : date('2020-01-01 00:00:00'),\n \"end\"=> isset($this->end) ? $this->end : date('Y-m-d 23:59:59'),\n \"currency_code\"=> isset($this->currency_code) ? $this->currency_code : '',\n \"designation\"=> isset($this->designation) ? $this->designation : ''\n );\n return $this->sendAPIRequest('GET',\"/transfers\",json_encode($this->_params));\n }",
"public function listSubAccountFuturesBalancesWithHttpInfo($associative_array)\n {\n $request = $this->listSubAccountFuturesBalancesRequest($associative_array);\n\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n $responseBody = $e->getResponse() ? (string) $e->getResponse()->getBody() : null;\n if ($responseBody !== null) {\n $gateError = json_decode($responseBody, true);\n if ($gateError !== null && isset($gateError['label'])) {\n throw new GateApiException(\n $gateError,\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $responseBody\n );\n }\n }\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $responseBody\n );\n }\n\n $returnType = '\\GateApi\\Model\\SubAccountFuturesBalance[]';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }",
"public function listSubAccountFuturesBalances($associative_array)\n {\n list($response) = $this->listSubAccountFuturesBalancesWithHttpInfo($associative_array);\n return $response;\n }",
"function subAccountGetList() {\n $params = array();\n return $this->invokeMethod(\"subaccountgetlist\", $params);\n }",
"public function transferWithSubAccountAsync($sub_account_transfer)\n {\n return $this->transferWithSubAccountAsyncWithHttpInfo($sub_account_transfer)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function listSubAccountCrossMarginBalancesAsync($associative_array)\n {\n return $this->listSubAccountCrossMarginBalancesAsyncWithHttpInfo($associative_array)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function transferWithSubAccountAsyncWithHttpInfo($sub_account_transfer)\n {\n $returnType = '';\n $request = $this->transferWithSubAccountRequest($sub_account_transfer);\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 getSubaccountsWithTokensAsync($getSubaccountsWithTokensInputObject, $page = '1', $limit = '10')\n {\n return $this->getSubaccountsWithTokensAsyncWithHttpInfo($getSubaccountsWithTokensInputObject, $page, $limit)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
012207 this is the action called by the form manyToManyform.htm. The | function createManyToManyRelationship() {
// inputs on the form look like this:
//
// <select name="firstTable">
//
// <option value="">(No choice made)</option>
// <option value="Bug_Tracker">Bug_Tracker</option>
// <option value="application_config">application_config</option>
// <option value="application_field">application_field</option>
// <option value="application_group">application_group</option>
// <option value="application_note">application_note</option>
// <option value="application_payment_table">application_payment_table</option>
// <option value="application_table">application_table</option>
//
// <option value="application_user">application_user</option>
// <option value="application_user_custom_field">application_user_custom_field</option>
// <option value="application_user_group">application_user_group</option>
// <option value="cacvb_activities">cacvb_activities</option>
// <option value="site_identification">site_identification</option>
// </select>
//
// <select name="secondTable">
//
// <option value="">(No choice made)</option>
// <option value="Bug_Tracker">Bug_Tracker</option>
// <option value="application_config">application_config</option>
// <option value="application_field">application_field</option>
// <option value="application_group">application_group</option>
// <option value="application_note">application_note</option>
// <option value="application_payment_table">application_payment_table</option>
// <option value="application_table">application_table</option>
//
// <option value="application_user">application_user</option>
// <option value="application_user_custom_field">application_user_custom_field</option>
// <option value="application_user_group">application_user_group</option>
// <option value="cacvb_activities">cacvb_activities</option>
// <option value="site_identification">site_identification</option>
// </select>
//
//
// We need to do 3 things:
//
// 1.) create an index table to hold pointers from each table to the other
// 2.) create a form for all items from the first table to be assigned to one item in the second table
// 3.) create a form for all items from the second table to be assigned to one item in the first table
global $controller;
$firstTable = $controller->getVar("firstTable");
$secondTable = $controller->getVar("secondTable");
if ($firstTable && $secondTable) {
// 01-22-07 - here is an example of what the SQL should look like when creating a table. I just
// used phpMyAdmin to generate this example.
//
// CREATE TABLE `webcal_index` (
// `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
// `id_first_table` INT NOT NULL ,
// `id_second_table` INT NOT NULL
// ) TYPE = MYISAM ;
$databaseTableName = "index_of_".$firstTable."_and_".$secondTable;
$firstTableField = "id_".$firstTable;
$secondTableField = "id_".$secondTable;
$query = "
CREATE TABLE $databaseTableName (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
$firstTableField INT NOT NULL,
$secondTableField INT NOT NULL,
owning_table varchar(255) NOT NULL default ''
) TYPE = MYISAM ;
";
$result = $controller->command("makeQuery", $query, "createManyToManyRelationship");
if ($result) {
$controller->addToResults("We've created the database table '$databaseTableName' to keep track of these many-to-many relationships.");
$controller->command("createHtmlForManyToManyTableRelationshipForms", $firstTable, $secondTable, $databaseTableName);
} else {
$controller->error("In createManyToManyRelationship we failed to create a new index table in the database. Our query was '$query'.");
}
} else {
$controller->addToResults("We were expecting the names of two database tables, but we only got '$firstTable' and '$secondTable'. Please pick two tables.");
}
} | [
"public function relationshipsaveAction()\n\t{\n\n\n\t}",
"public function relationshipsaveAction()\n {\n\n\n }",
"public function SaveActionItems() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtAction) $this->objActionItems->Action = $this->txtAction->Text;\n\t\t\t\tif ($this->lstStrategy) $this->objActionItems->StrategyId = $this->lstStrategy->SelectedValue;\n\t\t\t\tif ($this->lstScorecard) $this->objActionItems->ScorecardId = $this->lstScorecard->SelectedValue;\n\t\t\t\tif ($this->lstWhoObject) $this->objActionItems->Who = $this->lstWhoObject->SelectedValue;\n\t\t\t\tif ($this->calWhen) $this->objActionItems->When = $this->calWhen->DateTime;\n\t\t\t\tif ($this->lstStatusTypeObject) $this->objActionItems->StatusType = $this->lstStatusTypeObject->SelectedValue;\n\t\t\t\tif ($this->txtComments) $this->objActionItems->Comments = $this->txtComments->Text;\n\t\t\t\tif ($this->lstCategory) $this->objActionItems->CategoryId = $this->lstCategory->SelectedValue;\n\t\t\t\tif ($this->txtCount) $this->objActionItems->Count = $this->txtCount->Text;\n\t\t\t\tif ($this->lstModifiedByObject) $this->objActionItems->ModifiedBy = $this->lstModifiedByObject->SelectedValue;\n\t\t\t\tif ($this->chkRank) $this->objActionItems->Rank = $this->chkRank->Checked;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the ActionItems object\n\t\t\t\t$this->objActionItems->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}",
"public function getMany(){}",
"public function GetToManyRelation();",
"function Trigger_Default_ManyToMany(&$tNG) {\n $mtm = new tNG_ManyToMany($tNG);\n $mtm->setTable(\"rel_prods_cats\");\n $mtm->setPkName(\"id_producto\");\n $mtm->setFkName(\"id_categoria\");\n $mtm->setFkReference(\"mtm\");\n return $mtm->Execute();\n}",
"public function personalizeRelatedAction() {\n\t\t$model = new tx_ptgsaconfmgm_persrelatedform($this->fieldPrefix, $this->params);\n\t\t$model->createFormFieldsFromCartItems();\n\n\t\t$view = $this->getView('persrelatedform');\n\t\t$view->addItem($this->fieldPrefix, 'fieldprefix');\n\t\t$view->addItem($model, 'articleform');\n\t\t\n\t\treturn $view->render();\n\t}",
"public function hasMany()\n {\n $this->bind(func_get_args(), Doctrine_Relation::MANY);\n }",
"function act_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado los datos de la Unidad de Medida.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}",
"public function testFetchRelatedSpecificActionMapped() {\n\t\t$this->model->bindModel(array('belongsTo' => array('Author'), 'hasAndBelongsToMany' => array('Tag')));\n\t\t$this->Crud->mapRelatedList(array('Tag'), 'admin_add');\n\t\t$expectedTags = array(1 => '1', 2 => '2', 3 => '3');\n\n\t\t$this->Crud->executeAction('admin_add', array('1'));\n\t\t$vars = $this->controller->viewVars;\n\t\t$this->assertEquals($expectedTags, $vars['tags']);\n\t\t$this->assertFalse(isset($vars['authors']));\n\t}",
"public static function adminAppendToItemsBatchEditForm()\n {\n $formSelectProperties = self::getFormSelectProperties();\n?>\n<fieldset id=\"item-fields\" style=\"width: 70%; margin-bottom:2em;\">\n<legend>Items Relation</legend>\n<table>\n <thead>\n <tr>\n <th>Subjects</th>\n <th>Relation</th>\n <th>Object</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>These Items</td>\n <td><?php echo get_view()->formSelect('custom[item_relations_property_id]', null, array('multiple' => false), $formSelectProperties); ?></td>\n <td>Item ID <?php echo get_view()->formText('custom[item_relations_item_relation_object_item_id]', null, array('size' => 8)); ?></td>\n </tr>\n </tbody>\n</table>\n</fieldset>\n<?php\n }",
"public function testBetaGroupsBuildsGetToManyRelated()\n {\n }",
"abstract protected function getCrudForm();",
"function Trigger_Default_ManyToMany(&$tNG) {\n $mtm = new tNG_ManyToMany($tNG);\n $mtm->setTable(\"lista_chequeo\");\n $mtm->setPkName(\"id\");\n $mtm->setFkName(\"tipo_auditoria\");\n $mtm->setFkReference(\"mtm\");\n return $mtm->Execute();\n}",
"public function testBetaGroupsBuildsCreateToManyRelationship()\n {\n }",
"public function indexAction() {\r\n //variable initiation and instance creation\r\n $this->view->cleanurl = $this->_cleanUrl;\r\n $table_related = new Model_DbTable_Related;\r\n $table_reldesc = new Model_DbTable_RelatedDescription();\r\n $filter_data = $table_related->getAllTypeDesc();\r\n $this->view->related_type = $filter_data;\r\n //get messages from CRUD process\r\n $message = $this->_flash->getMessages();\r\n if (!empty($message)) {\r\n $this->view->message = $message;\r\n }\r\n\r\n //set variable initial value\r\n $filter = null;\r\n $new_search = FALSE;\r\n\r\n //get params for the filter\r\n if ($this->getRequest()->isPost()) {\r\n $new_search = TRUE;\r\n $param = $_POST['filterType'];\r\n $this->_paginator_sess->param = $param;\r\n }\r\n\r\n //set paginator for list of destination data\r\n $param = $this->_paginator_sess->param;\r\n $select = $table_reldesc->getQueryAll($param, 1);\r\n\r\n //get pagerow setting and send to the paginator control\r\n $page_row = $this->_getParam('filterPageRow');\r\n $this->view->row = $page_row;\r\n\r\n if ($page_row != null) {\r\n $paginator = parent::setPaginator($select, $page_row);\r\n } else {\r\n $paginator = parent::setPaginator($select);\r\n }\r\n\r\n if ($new_search) {\r\n $paginator->setCurrentPageNumber(1);\r\n }\r\n\r\n //send variables to the view class\r\n $this->view->paginator = $paginator;\r\n\r\n /** Return alert to view on filter selected */\r\n if ($new_search or !empty($param)) {\r\n foreach ($filter_data as $key => $value) {\r\n $parent[$key] = $value;\r\n }\r\n $filter_alert = \"Related links with '\" . $parent[$param]\r\n . \"' category\";\r\n $this->view->alert = $filter_alert;\r\n }\r\n }",
"public function delete_many () {\n global $__in, $__out;\n try {\n $group = new group();\n $group->delete_many($__in['arr_ids']);\n return dispatcher::redirect(array(\"action\"=>\"getall\"), \"deleted_successfully\");\n } catch (ValidationException $ex) {\n $ex->publish_errors();\n return dispatcher::redirect(array(\"action\"=>\"getall\"));\n } catch (Exception $ex) {\n throw $ex;\n }\n }",
"public function massRelateToEachOtherAction()\n\t{\n\t\t$this->_linkProductsToEachOther(self::LINK_TYPE_RELATED, 'Successfully related %d products to each other (%d new links, %d already existed).');\n\t}",
"public function overviewFormSubmit() {}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets file duration in s. | public function getDuration($file); | [
"public function timeUploadedDuration() {\n return PeopleBookDateTime::formatDuration($this->time_uploaded);\n }",
"public function get_duration();",
"private function _getDuration() {\n\t\n\t\t$millis\t= (int)shell_exec('/usr/bin/mediainfo --Inform=\"General;%Duration%\" '.$this->video);\n\t\t\n//\t\n//\t\n// $cmd = \"{$this->ffmpeg} -i {$this->video} 2>&1\";\n// if (preg_match('/Duration: ((\\d+):(\\d+):(\\d+))/s', `$cmd`, $time)) {\n// return ($time[2] * 3600) + ($time[3] * 60) + $time[4];\n// }\n\t\tif ($millis) {\n\t\t\treturn $millis/1000;\n\t\t}\n return 0;\n }",
"public function getDurationSec()\n {\n return isset($this->duration_sec) ? $this->duration_sec : 0;\n }",
"public function get_duration()\n {\n return $this->_duration;\n }",
"function getDownloadDuration() {\n return $this->downloadtimer;\n }",
"public function durationSec() {\n if ($this->_m_durationSec !== null)\n return $this->_m_durationSec;\n $this->_m_durationSec = ($this->durationSamples() / $this->sampleRate());\n return $this->_m_durationSec;\n }",
"public function getDurationTime()\n {\n return $this->duration * 60 * 60;\n }",
"public function getDuration()\n {\n if ($this->duration === null\n && $this->inbounds->count()\n ) {\n if (($inbound = $this->inbounds->last())\n && ($file = $inbound->getVideoFile())\n ) {\n $this->setDuration($file->getDuration());\n }\n }\n\n return $this->duration;\n }",
"private function getDuration()\n {\n return $this->_vevent->getAttribute('DURATION');\n }",
"public function duration(){\n\t\techo $this->duration;\n\t}",
"private function duration() {\n//\t\t$dur = explode(':', $this->time['duration']);\n//\t\treturn (($dur[0] * HOUR) + ($dur[1] * MINUTE) + $dur[2]) / HOUR;\n\t\treturn number_format($this->time->duration() / HOUR , 2);\n\t}",
"public function getTotalDuration()\n {\n return $this->total_duration;\n }",
"public function getDurationSeconds()\n {\n return $this->duration_seconds;\n }",
"public function getDuration()\n {\n return $this->videoData['duration'];\n }",
"public function get_request_duration()\n\t{\n\t\treturn $this->get_info(CURLINFO_TOTAL_TIME);\n\t}",
"public function getTotalDuration()\n {\n return $this->totalDuration;\n }",
"function getStreamDuration(){\n\t\treturn 'Start: '.$this->start.' End: '.$this->end;\n\t}",
"function getMediaDuration($filepath)\n{\n\t//get extension\n\t$filepathInfo = pathinfo($filepath);\n\t$ext = strtolower($filepathInfo[\"extension\"]);\n\t\n\ttry{\n\t\t$ft = FileType::getFileTypeFromExtension($ext);\n\t} catch(NoSuchFileTypeException $e){\n\t\treturn null;\n\t}\n\t\n\t//get command to extract duration\n\t$durationCmd = $ft->getDurationCommand();\n\tif($durationCmd == null)\n\t\treturn null;\n\t\n\t//get the bitrate command with variables expanded\n\t$durationCmd = expandCmdString($durationCmd, \n\t\tarray(\n\t\t\t\"path\" \t\t=> $filepath,\n\t\t)\n\t);\n\t\n\tappLog(\"Running duration command: $durationCmd\", appLog_DEBUG);\n\t\n\t$duration = exec($durationCmd);\n\t\n\tappLog(\"Output of duration command: '\" . $duration . \"'\", appLog_DEBUG);\n\t\n\treturn ((int)$duration);\n\t\n\t\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation creditorWarehouseAddressDELETERequestCreditorIDWarehouseAddressWarehouseAddressIDDeleteAsyncWithHttpInfo Deletes a warehouse address from a creditor. | public function creditorWarehouseAddressDELETERequestCreditorIDWarehouseAddressWarehouseAddressIDDeleteAsyncWithHttpInfo($accept, $creditor_id, $warehouse_address_id, $jiwa_stateful = null, $description = null, $address1 = null, $address2 = null, $address3 = null, $address4 = null, $postcode = null, $country = null, $notes = null, $courier_details = null, $default_delivery_days = null, $is_default = null)
{
$returnType = '\Jiwa\Model\Object';
$request = $this->creditorWarehouseAddressDELETERequestCreditorIDWarehouseAddressWarehouseAddressIDDeleteRequest($accept, $creditor_id, $warehouse_address_id, $jiwa_stateful, $description, $address1, $address2, $address3, $address4, $postcode, $country, $notes, $courier_details, $default_delivery_days, $is_default);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | [
"public function creditorWarehouseAddressDELETERequestCreditorIDWarehouseAddressWarehouseAddressIDDeleteWithHttpInfo($accept, $creditor_id, $warehouse_address_id, $jiwa_stateful = null, $description = null, $address1 = null, $address2 = null, $address3 = null, $address4 = null, $postcode = null, $country = null, $notes = null, $courier_details = null, $default_delivery_days = null, $is_default = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->creditorWarehouseAddressDELETERequestCreditorIDWarehouseAddressWarehouseAddressIDDeleteRequest($accept, $creditor_id, $warehouse_address_id, $jiwa_stateful, $description, $address1, $address2, $address3, $address4, $postcode, $country, $notes, $courier_details, $default_delivery_days, $is_default);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 204:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function warehouseTransferOutLineDELETERequestWarehouseTransferOutIDLinesWarehouseTransferOutLineIDDeleteAsyncWithHttpInfo($accept, $warehouse_transfer_out_id, $warehouse_transfer_out_line_id, $jiwa_stateful = null, $item_no = null, $inventory_id = null, $part_no = null, $description = null, $decimal_places = null, $quantity_wanted = null, $quantity_transferred = null, $quantity_back_ordered = null, $cost = null, $ref = null, $back_order_id = null, $purchase_order_id = null, $purchase_order_line_id = null, $total_cost_transferred = null, $total_cost_received = null, $added_cost_ledger1_rec_id = null, $added_cost_ledger1_account_no = null, $added_cost_ledger1_description = null, $added_cost_ledger2_rec_id = null, $added_cost_ledger2_account_no = null, $added_cost_ledger2_description = null, $added_cost_ledger3_rec_id = null, $added_cost_ledger3_account_no = null, $added_cost_ledger3_description = null, $line_details = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->warehouseTransferOutLineDELETERequestWarehouseTransferOutIDLinesWarehouseTransferOutLineIDDeleteRequest($accept, $warehouse_transfer_out_id, $warehouse_transfer_out_line_id, $jiwa_stateful, $item_no, $inventory_id, $part_no, $description, $decimal_places, $quantity_wanted, $quantity_transferred, $quantity_back_ordered, $cost, $ref, $back_order_id, $purchase_order_id, $purchase_order_line_id, $total_cost_transferred, $total_cost_received, $added_cost_ledger1_rec_id, $added_cost_ledger1_account_no, $added_cost_ledger1_description, $added_cost_ledger2_rec_id, $added_cost_ledger2_account_no, $added_cost_ledger2_description, $added_cost_ledger3_rec_id, $added_cost_ledger3_account_no, $added_cost_ledger3_description, $line_details);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function telegrafsTelegrafIDOwnersUserIDDeleteAsyncWithHttpInfo($user_id, $telegraf_id, $zap_trace_span = null)\n {\n $returnType = '';\n $request = $this->telegrafsTelegrafIDOwnersUserIDDeleteRequest($user_id, $telegraf_id, $zap_trace_span);\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 restAccountsAddressesContactRelationsAddressContactRelationIdDeleteAsyncWithHttpInfo($address_contact_relation_id)\n {\n $returnType = '';\n $request = $this->restAccountsAddressesContactRelationsAddressContactRelationIdDeleteRequest($address_contact_relation_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function goodsReceivedNotePurchaseOrderDELETERequestGRNIDPurchaseOrdersOrderIDDeleteAsyncWithHttpInfo($accept, $grnid, $order_id, $jiwa_stateful = null, $purchase_order_received_id = null, $order_no = null, $order_type = null, $ordered_date = null, $freight_tax_id = null, $freight = null, $freight_tax_amount = null, $duty_tax_id = null, $duty = null, $duty_tax_amount = null, $insurance_tax_id = null, $insurance = null, $insurance_tax_amount = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->goodsReceivedNotePurchaseOrderDELETERequestGRNIDPurchaseOrdersOrderIDDeleteRequest($accept, $grnid, $order_id, $jiwa_stateful, $purchase_order_received_id, $order_no, $order_type, $ordered_date, $freight_tax_id, $freight, $freight_tax_amount, $duty_tax_id, $duty, $duty_tax_amount, $insurance_tax_id, $insurance, $insurance_tax_amount);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function orgsOrgIDOwnersUserIDDeleteAsyncWithHttpInfo($user_id, $org_id, $zap_trace_span = null)\n {\n $returnType = '';\n $request = $this->orgsOrgIDOwnersUserIDDeleteRequest($user_id, $org_id, $zap_trace_span);\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 scrapersScraperTargetIDOwnersUserIDDeleteAsyncWithHttpInfo($user_id, $scraper_target_id, $zap_trace_span = null)\n {\n $returnType = '';\n $request = $this->scrapersScraperTargetIDOwnersUserIDDeleteRequest($user_id, $scraper_target_id, $zap_trace_span);\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 debtorNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteAsyncWithHttpInfo($accept, $note_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->debtorNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteRequest($accept, $note_type_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteAsyncWithHttpInfo($accept, $note_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteRequest($accept, $note_type_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function journalSetNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteAsyncWithHttpInfo($accept, $note_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->journalSetNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteRequest($accept, $note_type_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function tasksTaskIDOwnersUserIDDeleteAsyncWithHttpInfo($user_id, $task_id, $zap_trace_span = null)\n {\n $returnType = '';\n $request = $this->tasksTaskIDOwnersUserIDDeleteRequest($user_id, $task_id, $zap_trace_span);\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 creditorWarehouseAddressPOSTRequestCreditorIDWarehouseAddressPostAsyncWithHttpInfo($accept, $creditor_id, $jiwa_stateful = null, $description = null, $address1 = null, $address2 = null, $address3 = null, $address4 = null, $postcode = null, $country = null, $notes = null, $courier_details = null, $default_delivery_days = null, $is_default = null, $body = null)\n {\n $returnType = '\\Jiwa\\Model\\CreditorWarehouseAddress';\n $request = $this->creditorWarehouseAddressPOSTRequestCreditorIDWarehouseAddressPostRequest($accept, $creditor_id, $jiwa_stateful, $description, $address1, $address2, $address3, $address4, $postcode, $country, $notes, $courier_details, $default_delivery_days, $is_default, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function telegrafsTelegrafIDOwnersUserIDDeleteWithHttpInfo($user_id, $telegraf_id, $zap_trace_span = null)\n {\n $request = $this->telegrafsTelegrafIDOwnersUserIDDeleteRequest($user_id, $telegraf_id, $zap_trace_span);\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 default:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\InfluxDB2Generated\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function deleteTelegrafsIDOwnersIDAsyncWithHttpInfo($user_id, $telegraf_id, $zap_trace_span = null)\n {\n $returnType = '';\n $request = $this->deleteTelegrafsIDOwnersIDRequest($user_id, $telegraf_id, $zap_trace_span);\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 orgsOrgIDDeleteAsyncWithHttpInfo($org_id, $zap_trace_span = null)\n {\n $returnType = '';\n $request = $this->orgsOrgIDDeleteRequest($org_id, $zap_trace_span);\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 debtorNoteDELETERequestDebtorIDNotesNoteIDDeleteAsyncWithHttpInfo($accept, $debtor_id, $note_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->debtorNoteDELETERequestDebtorIDNotesNoteIDDeleteRequest($accept, $debtor_id, $note_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function restPropertiesRelationsValuesPropertiesRelationValueIdDeleteAsyncWithHttpInfo($property_relation_value_id, $properties_relation_value_id)\n {\n $returnType = '';\n $request = $this->restPropertiesRelationsValuesPropertiesRelationValueIdDeleteRequest($property_relation_value_id, $properties_relation_value_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function creditorDELETERequestCreditorIDDeleteAsync($accept, $creditor_id, $jiwa_stateful = null)\n {\n return $this->creditorDELETERequestCreditorIDDeleteAsyncWithHttpInfo($accept, $creditor_id, $jiwa_stateful)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function checkoutsConsignmentsByCheckoutIdAndConsignmentIdDeleteAsyncWithHttpInfo($checkout_id, $accept, $content_type, $consignment_id)\n {\n $returnType = '\\BigCommerce\\Api\\V3\\Model\\Checkout\\Checkout1';\n $request = $this->checkoutsConsignmentsByCheckoutIdAndConsignmentIdDeleteRequest($checkout_id, $accept, $content_type, $consignment_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Bulk DB log table actions. | private static function log_table_bulk_actions()
{
} | [
"public function admin_table_bulk_actions($actions)\n {\n }",
"public function process_bulk_action() {}",
"public function process_bulk_action() {\n\n\n\t}",
"public function process_bulk_action() {\n\n\t}",
"private function logAction(string $action, array $data): void\n {\n $data['action'] = $action;\n $this->wpdb->insert(self::TABLE_NAME, $data);\n }",
"public function log_game_actions(BMGame $game) {\n $query = 'INSERT INTO game_action_log ' .\n '(game_id, game_state, action_type, acting_player, message) ' .\n 'VALUES ' .\n '(:game_id, :game_state, :action_type, :acting_player, :message)';\n foreach ($game->actionLog as $gameAction) {\n $statement = self::$conn->prepare($query);\n $statement->execute(\n array(':game_id' => $game->gameId,\n ':game_state' => $gameAction->gameState,\n ':action_type' => $gameAction->actionType,\n ':acting_player' => $gameAction->actingPlayerId,\n ':message' => json_encode($gameAction->params))\n );\n }\n $game->empty_action_log();\n }",
"private function log(): void\n {\n LogAccountAudit::dispatch([\n 'company_id' => $this->data['company_id'],\n 'action' => 'task_created',\n 'author_id' => $this->author->id,\n 'author_name' => $this->author->name,\n 'audited_at' => Carbon::now(),\n 'objects' => json_encode([\n 'employee_id' => $this->employee->id,\n 'employee_name' => $this->employee->name,\n 'title' => $this->data['title'],\n ]),\n ])->onQueue('low');\n\n LogEmployeeAudit::dispatch([\n 'employee_id' => $this->data['employee_id'],\n 'action' => 'task_created',\n 'author_id' => $this->author->id,\n 'author_name' => $this->author->name,\n 'audited_at' => Carbon::now(),\n 'objects' => json_encode([\n 'title' => $this->data['title'],\n ]),\n ])->onQueue('low');\n }",
"public function process_bulk_action() {\n\t\t// No bulk actions\n\t}",
"function bulkOperation()\n {\n }",
"private function purgeUnusedLogActions()\n {\n $this->createTempTable();\n\n // get current max ID in log tables w/ idaction references.\n $maxIds = $this->getMaxIdsInLogTables();\n\n // do large insert (inserting everything before maxIds) w/o locking tables...\n $this->insertActionsToKeep($maxIds, $deleteOlderThanMax = true);\n\n // ... then do small insert w/ locked tables to minimize the amount of time tables are locked.\n $this->lockLogTables();\n $this->insertActionsToKeep($maxIds, $deleteOlderThanMax = false);\n\n // delete before unlocking tables so there's no chance a new log row that references an\n // unused action will be inserted.\n $this->deleteUnusedActions();\n Db::unlockAllTables();\n }",
"function logAction($con, $table, $user, $action) {\n //Insert everything into the table, and return the result (returning is used to determine if the query was successful or not)\n return mysqli_query($con,\"INSERT INTO \".$table.\" (`Username`, `IP Address`, `Action`) VALUES ('\".$user.\"', '\".$_SERVER['REMOTE_ADDR'].\"', '\".$action.\"')\");\n }",
"protected function LogAction()\n\t\t{\n\t\t\t$GLOBALS['ISC_CLASS_LOG']->LogAdminAction($this->GetId(), $this->GetName());\n\t\t}",
"protected function addLogTables()\n {\n $table = $this->getTable();\n $database = $table->getDatabase();\n\n foreach ($this->getColumns() as $column) {\n $logTableName = sprintf('%s_%s_log', $table->getName(), $column->getName());\n\n if ($database->hasTable($logTableName)) {\n $logTable = $database->getTable($logTableName);\n } else {\n $logTable = $database->addTable(\n array(\n 'name' => $logTableName,\n 'package' => $table->getPackage(),\n 'schema' => $table->getSchema(),\n 'namespace' => $table->getNamespace() ? '\\\\' . $table->getNamespace() : null,\n 'skipSql' => $table->isSkipSql()\n )\n );\n }\n\n $this->logTables[$column->getName()] = $logTable;\n\n $this->addPrimaryKey($logTable);\n $this->addForeignKey($logTable);\n $this->addColumnToLog($logTable, $column);\n $this->addLogColumns($logTable);\n }\n }",
"public function get_bulk_actions() :array {\n\n /*\n * on hitting apply in bulk actions the url paramas are set as\n * ?action=bulk-download&paged=1&action2=-1\n * \n * action and action2 are set based on the triggers above and below the table\t\t \t\t \n */\n $actions = [\n 'bulk-delete' => 'Delete'\n ];\n \n return $actions;\n\n }",
"private function logToMigrationsTable() : void\n {\n $this->connection->insert('migrations', [\n 'name' => $this->fileName,\n 'time' => date('Y-m-d H:i:s',time())\n ]);\n }",
"public function log_sql_query( $wp_query ) {\n\t\t$query = $wp_query->request;\n\n\t\t/**\n\t\t * Bulk Delete query is getting logged.\n\t\t *\n\t\t * @since 5.6\n\t\t *\n\t\t * @param string $query Bulk Delete SQL Query.\n\t\t */\n\t\tdo_action( 'bd_log_sql_query', $query );\n\n\t\terror_log( 'Bulk Delete Query: ' . $query );\n\t}",
"public function actionDatabaseQueries() {\n echo \"Database Debug Log:\";\n $this->showLog('dbDebug.log');\n }",
"public function delete_all_logs() {\n\t\tglobal $wpdb;\n\n\t\t$table_name = $this->get_log_table_name();\n\n\t\treturn $wpdb->query( \"DELETE FROM {$table_name}\" ); //@codingStandardsIgnoreLine\n\t}",
"function taskLog($data) {\n //info\n $peroid = REQUEST($data,\"Peroid\");\n $symbol = REQUEST($data,\"Symbol\");\n $account = REQUEST($data,\"Account\");\n $targetid = REQUEST($data,\"TargetID\");\n $state = REQUEST($data,\"State\");\n $message = REQUEST($data,\"Msg\");\n $table = getDBPre().\"_\".$symbol.\"_\".$peroid.\"_log\";\n $nowtime=\"[\".date(\"Y-m-d H:m:s\").\"]\";\n if($peroid==null || $symbol==null) {\n echo $nowtime.\"LOG FAILED! EMPTY Peroid || Symbol!\";\n die();\n }\n try {\n $db=getDBConn();\n $result=$db->query(\"SHOW TABLES LIKE '\". $table.\"'\");\n //判断表是否存在,不存在就创建\n if(mysqli_num_rows($result)!==1)\n {\n $sql = \"CREATE TABLE \".$table.\" (\".\n \"id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,\".\n \"account VARCHAR(30) NOT NULL,\".\n \"targetid INT(11),\".\n \"MD5 VARCHAR(32),\".\n \"message TEXT,\".\n \"created INT(11),\".\n \"UNIQUE KEY atm(account,targetid,MD5)\".\n \")ENGINE=InnoDB DEFAULT CHARSET=utf8;\";\n if($db->query($sql)===FALSE) {\n echo $nowtime.\"CREATE TABLE \".$table.\" FAILED!\".mysqli_error($db);\n die();\n }\n }\n\n //INSERT\n $sBulkString=\"('\".$account.\"',\".$targetid.\",\".time().\",'\".$message.\"','\". md5($message).\"')\";\n $sql=\"insert into \".$table.\" (account,targetid,created,message,MD5) values\".$sBulkString;\n// if($db->query($sql)===FALSE) {\n// echo $nowtime.\"INSERT INTO FAILED! \".$sql.\" \".mysqli_error($db);\n// die();\n// }\n \n $db->query($sql);\n\n } catch (Exception $e) {\n echo $nowtime.\"LOG Exception!\".$e->getMessage();\n die();\n }\n\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns dashboard country content template. | function spc_health_dashboard_country_content($country){
$data = array();
$health_dashboard_data = get_health_dashboard_data('health_json_fid', 'default');
foreach($health_dashboard_data['countries-data'] as $country_data){
if ($country_data['id'] == $country){
$data['title'] = $country_data['title'] . t(' - summary of status of indicators across the categories (%)');
$data['country'] = $country_data['title'];
$data['country_id'] = $country_data['id'];
$data['indicators'] = $country_data['indicators'];
$data['categories'] = variable_get('health_dashboard_categories_list', []);
$country_chart = _health_dashboard_country_chart($country_data['indicators']);
if (!empty($fid = variable_get('pdf_' . $country . '_fid'))){
$pdf_country_file = file_load($fid);
$pdf_country_file_url = file_create_url($pdf_country_file->uri);
$data['chart-pdf-export'] = $pdf_country_file_url;
}
}
}
$indicator_detales = [];
if ($indicator_detales = get_health_dashboard_data('health_indicators_fid', 'indicators')) {
drupal_add_js(array('spc_health_chart' => array('indicator_detales' => $indicator_detales)), array('type' => 'setting'));
}
drupal_add_js(array('spc_health_chart' => array('summary_chart' => $country_chart)), array('type' => 'setting'));
$content = theme('spc_health_dashboard_country_content', array('data' => $data));
return $content;
} | [
"function spc_health_dashboard_country($country = NULL) {\n $countries = variable_get('health_dashboard_countries', []);\n if (!isset($country, $countries[$country])) {\n drupal_not_found();\n }\n \n return theme(\n 'spc_health_dashboard_page',\n [\n 'title' => _health_dashboard_title(),\n 'content' => spc_health_dashboard_country_content($country),\n 'breadcrumbs' => _country_breadcrumbs($country),\n 'search' => spc_health_dashboard_home_search(),\n 'subtitle' => '',\n ]);\n}",
"public function render()\n {\n\n parent::render();\n\n return \"country_list.tpl\";\n }",
"function ol_country_data_page() {\r\n\t\r\n\t// Check that the user has the required capability \r\n\tif (!current_user_can('ol_country_data')) {\r\n\t\twp_die( __('You do not have sufficient permissions to access this page.') );\r\n\t}\r\n\t\r\n\t// Display page content\r\n\techo '<div class=\"wrap\">';\r\n\r\n\t\tinclude_once( OLDEV_PATH .'country-ip-data/ol-country-data.php');\r\n\t\r\n\techo '</div>';\r\n}",
"public function country_settings()\n {\n\n\t\t$country['data'] = Settings::getcountryData();\n\n\t\treturn view('admin.country-settings',[ 'country' => $country]);\n\n }",
"public function index()\n {\n return $this->view('geography.countries.index')->with('items', Country::all());\n }",
"public function getStaticcontent() {\n return view ( 'cms::customer.static.staticContentTemplate' );\n }",
"protected function displayRestrictedCountryPage(){\n\t}",
"protected function displayRestrictedCountryPage()\n {\n }",
"public function getDashboardTpl(){\n return $this->templates['dashboard'];\n }",
"protected function displayRestrictedCountryPage()\n {\n return;\n }",
"public function getAddCountry()\n {\n $list = has_admin_permission(ModuleEnum::COUNTRY, CountryPermission::ADD_COUNTRY);\n $payment_options = Config::get('app.payment_options');\n if ($list == false) {\n return parent::getAdminError($this->theme_path);\n }\n $crumbs = [\n trans('admin/dashboard.dashboard') => 'cp',\n trans('admin/country.manage_country_list') => 'country',\n trans('admin/country.add_country_pagetitle') => '',\n ];\n $this->layout->breadcrumbs = Common::getBreadCrumbs($crumbs);\n $this->layout->pageicon = trans('admin/country.add_country_pageicon');\n $this->layout->header = view('admin.theme.common.header');\n $this->layout->sidebar = view('admin.theme.common.sidebar')\n ->with('mainmenu', 'country');\n\n $this->layout->pagetitle = trans('admin/country.add_country_pagetitle');\n $this->layout->pagedescription = trans('admin/country.add_country_pagedescription');\n $this->layout->content = view('admin.theme.country.add_country')\n ->with('payment_options', $payment_options);\n $this->layout->footer = view('admin.theme.common.footer');\n }",
"public function Content()\n {\n return new View('dashboard1/Dashboard.tpl');\n }",
"private function showDashboard()\n {\n //Si es Admin\n if($this->registry->getObject('authenticate')->getUser()->isAdmin())\n {\n $this->registry->getObject('template')->buildFromTemplates(\n $this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base')).$this->registry->getObject('constants')->getHeaderTpl(),\n $this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base')).$this->registry->getObject('constants')->getDashboardTpl(),\n $this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base')).$this->registry->getObject('constants')->getFooterTpl()\n );\n }else\n { //Si es usuario normal\n $this->registry->getObject('template')->buildFromTemplates(\n $this->registry->getObject('constants')->getHeaderTpl(), \n $this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_logged_base')).$this->registry->getObject('constants')->getDashboardTpl(), \n $this->registry->getObject('constants')->getFooterTpl()\n );\n }\t\n }",
"public function zonetemplateAction()\n {\n $theme = $this->params('theme', null);\n $template = $this->getZoneTemplate($theme);\n\n return $template;\n }",
"public function getCountryBasedContinentAction()\n {\n $continent = $this->getRequest()->getParam(\"continent_name\"); \n $countryList = array(); \n $storeCol = Mage::getModel('archana_storelocator/storelocator')->getCollection()\n ->addFieldToFilter('continent', $continent); \n $storeCol->getSelect()->group('country');\n $html = '<select name=\"country\" id=\"country\">\n\t\t\t<option value=\"\"> -- Please Select -- </option>';\n foreach ($storeCol as $_country) {\n $countryCode= $_country->getCountry();\n $country = Mage::helper('archana_storelocator')->getCountryNameByCode($countryCode);\n $html .= '<option value=\"' . $countryCode . '\">' . $country . '</option>';\n }\n $html.='</select>'; \n echo $html; \n }",
"public function country(Request $request) {\n\n $latest = $this->repository->allRegion(5);\n $parent = $this->repository->allProvince();\n \n if($request->isXmlHttpRequest()) {\n return view('admin.ajaxify.territory.country',compact('latest','parent'));\n } else {\n return view('admin.territory.country',compact('latest','parent'));\n }\n\n }",
"public function content_template() { ?>\n\n <# if ( data.label ) { #>\n <span class=\"customize-control-title\">{{{ data.label }}}</span>\n <# } #>\n <# if ( data.description ) { #>\n <span class=\"description customize-control-description\">{{{ data.description }}}</span>\n <# } #>\n <div class=\"zoom-color-picker-container\">\n <label>\n <input type=\"text\" class=\"color-picker-hex zoom-alpha-color-picker\" value=\"{{ data.value }}\" data-palette=\"{{ data.palette }}\" data-default-color=\"{{ data.defaultValue }}\" data-show-opacity=\"{{ data.showOpacity }}\" data-customize-setting-link=\"{{ data.settings.default }}\" />\n </label>\n </div>\n\n <?php\n }",
"function rmh_country_flag_page() {\n\n $build = array();\n\n $build['table'] = _rmh_country_list_table();\n\n $build['add_new'] = array(\n '#prefix' => \"<div>\",\n '#suffix' => \"</div>\",\n '#markup' => l('Add new', 'admin/config/system/country_flag/add-new'),\n );\n\n return $build;\n\n}",
"public function countryfilterAction()\n {\n $page = $this->params()->fromQuery('page', 1);\n $filter = $this->params()->fromRoute('country', null);\n\n // Filter posts by Country\n $query = $this->entityManager->getRepository(Post::class)->findPostsByCountry($filter);\n\n $adapter = new DoctrineAdapter(new ORMPaginator($query, false));\n $paginator = new Paginator($adapter);\n $paginator->setDefaultItemCountPerPage(15);\n $paginator->setCurrentPageNumber($page);\n\n /* Change layout */\n $this->layout()->setTemplate('layout/layout-front');\n\n /* Latest 3 posts */\n $latestPosts = $this->entityManager->getRepository(Post::class)->findLatestPosts(2);\n\n /* Countries List */\n $countries = $this->entityManager->getRepository(Post::class)->getCountries();\n\n /* Cuisine Types list */\n $types = $this->entityManager->getRepository(Post::class)->getCuisineTypes();\n\n // Render the view template.\n return new ViewModel([\n 'posts' => $paginator,\n 'postManager' => $this->postManager,\n 'countries' => $countries,\n 'types' => $types,\n 'latestPosts' => $latestPosts\n ]);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation getRegistrationLaunchHistoryWithHttpInfo Get launch history for a Registration | public function getRegistrationLaunchHistoryWithHttpInfo($registration_id, $include_history_log = 'false')
{
$returnType = '\RusticiSoftware\Cloud\V2\Model\LaunchHistoryListSchema';
$request = $this->getRegistrationLaunchHistoryRequest($registration_id, $include_history_log);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\RusticiSoftware\Cloud\V2\Model\LaunchHistoryListSchema',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 400:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\RusticiSoftware\Cloud\V2\Model\MessageSchema',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 404:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\RusticiSoftware\Cloud\V2\Model\MessageSchema',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
} | [
"public function getRegistrationInstanceLaunchHistoryWithHttpInfo($engine_tenant_name, $registration_id, $instance_id, $include_history_log = 'false')\n {\n $returnType = '\\Swagger\\Client\\Model\\LaunchHistoryListSchema';\n $request = $this->getRegistrationInstanceLaunchHistoryRequest($engine_tenant_name, $registration_id, $instance_id, $include_history_log);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\LaunchHistoryListSchema',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\MessageSchema',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\MessageSchema',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getRegistrationInstanceLaunchHistoryWithHttpInfo($registration_id, $instance_id, $include_history_log = 'false')\n {\n $returnType = '\\RusticiSoftware\\Cloud\\V2\\Model\\LaunchHistoryListSchema';\n $request = $this->getRegistrationInstanceLaunchHistoryRequest($registration_id, $instance_id, $include_history_log);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\RusticiSoftware\\Cloud\\V2\\Model\\LaunchHistoryListSchema',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\RusticiSoftware\\Cloud\\V2\\Model\\MessageSchema',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\RusticiSoftware\\Cloud\\V2\\Model\\MessageSchema',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getRegistrationLaunchHistoryAsync($registration_id, $include_history_log = 'false')\n {\n return $this->getRegistrationLaunchHistoryAsyncWithHttpInfo($registration_id, $include_history_log)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function get_history()\n {\n $this->token_checker();\n\n $call = \"history\";\n $key = ($call.$this->_hash);\n $result = $this->_get_cache($key);\n\n if(!$result)\n {\n $this->_api_headers();\n $url = $this->_apiUrl .$call;\n $this->_call_api($url, 'GET');\n $result = $this->result;\n\n $this->_set_cache($key,$result);\n }\n return $result;\n }",
"function get_history($floor = null) {\n\t// Build the base response.\n\thttp_response_code(200);\n\t$response = array(\n\t\t\"info\" => array(\n\t\t\t\"level\" => 2,\n\t\t\t\"status\" => \"ok\",\n\t\t\t\"message\" => \"Devices history found in database.\"\n\t\t),\n\t\t\"list\" => array()\n\t);\n\n\t// Go through devices adding them as arrays to the response.\n\tforeach (History\\Entry::List($floor) as $entry) {\n\t\tarray_push($response[\"list\"], $entry->as_array());\n\t}\n\n\t// Send response.\n\techo json_encode($response);\n}",
"protected function getRegistrationInstanceLaunchHistoryRequest($registration_id, $instance_id, $include_history_log = 'false')\n {\n // verify the required parameter 'registration_id' is set\n if ($registration_id === null || (is_array($registration_id) && count($registration_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $registration_id when calling getRegistrationInstanceLaunchHistory'\n );\n }\n // verify the required parameter 'instance_id' is set\n if ($instance_id === null || (is_array($instance_id) && count($instance_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $instance_id when calling getRegistrationInstanceLaunchHistory'\n );\n }\n\n $resourcePath = '/registrations/{registrationId}/instances/{instanceId}/launchHistory';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($include_history_log !== null) {\n $queryParams['includeHistoryLog'] = ObjectSerializer::toQueryValue($include_history_log);\n }\n\n // path params\n if ($registration_id !== null) {\n $resourcePath = str_replace(\n '{' . 'registrationId' . '}',\n ObjectSerializer::toPathValue($registration_id),\n $resourcePath\n );\n }\n // path params\n if ($instance_id !== null) {\n $resourcePath = str_replace(\n '{' . 'instanceId' . '}',\n ObjectSerializer::toPathValue($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 ['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\\Query::build($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 // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getRegistrationLaunchHistoryAsync($engine_tenant_name, $registration_id, $include_history_log = 'false')\n {\n return $this->getRegistrationLaunchHistoryAsyncWithHttpInfo($engine_tenant_name, $registration_id, $include_history_log)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function pushassist_notification_history(){\n\n\t\t$remote_data = array(\n\t\t\t'method' => 'GET',\n\t\t\t'remoteAction' => 'notifications/'\n\t\t );\n\t\treturn $this->pushassist_remote_request($remote_data);\n\t}",
"public function getHistory();",
"public function history() {\n\n //parse inputs\n $resourcePath = \"/stats/history\";\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n $method = \"GET\";\n $queryParams = array();\n $headerParams = array();\n $headerParams['Accept'] = 'application/json';\n $headerParams['Content-Type'] = 'application/json';\n\n // Generate form params\n if (! isset($body)) {\n $body = array();\n }\n if (empty($body)) {\n $body = null;\n }\n\n // Make the API Call\n $response = $this->apiClient->callAPI($resourcePath, $method,\n $queryParams, $body,\n $headerParams);\n\n\n if(! $response){\n return null;\n }\n\n $responseObject = $this->apiClient->deserialize($response,\n 'Array[StatsHistory]');\n return $responseObject;\n\n }",
"public function queryRmsAlarmhistoryappstatsEx($request, $headers, $runtime)\n {\n Utils::validateModel($request);\n\n return QueryRmsAlarmhistoryappstatsResponse::fromMap($this->doRequest('1.0', 'antcloud.monitor.rms.alarmhistoryappstats.query', 'HTTPS', 'POST', '/gateway.do', Tea::merge($request), $headers, $runtime));\n }",
"public function queryRmsAlarmhistoryappstatsEx($request, $headers, $runtime){\n Utils::validateModel($request);\n return QueryRmsAlarmhistoryappstatsResponse::fromMap($this->doRequest(\"1.0\", \"antcloud.monitor.rms.alarmhistoryappstats.query\", \"HTTPS\", \"POST\", \"/gateway.do\", Tea::merge($request), $headers, $runtime));\n }",
"public function changeHistoryObjectsGetWithHttpInfo()\n {\n $request = $this->changeHistoryObjectsGetRequest();\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() ? (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 $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\HistoryObjects' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\HistoryObjects', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\HistoryObjects';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\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\\HistoryObjects',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getHistory () {}",
"public function v1getMachinesHistoryWithHttpInfo($body)\n {\n $returnType = '\\Samsara\\Php\\Client\\Model\\V1MachineHistoryResponse';\n $request = $this->v1getMachinesHistoryRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Samsara\\Php\\Client\\Model\\V1MachineHistoryResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 0:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Samsara\\Php\\Client\\Model\\V1ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getRegistrationInstancesWithHttpInfo($engine_tenant_name, $registration_id, $since = null, $until = null, $more = null, $include_child_results = 'false', $include_interactions_and_objectives = 'false', $include_runtime = 'false')\n {\n $returnType = '\\Swagger\\Client\\Model\\RegistrationListSchema';\n $request = $this->getRegistrationInstancesRequest($engine_tenant_name, $registration_id, $since, $until, $more, $include_child_results, $include_interactions_and_objectives, $include_runtime);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\RegistrationListSchema',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\MessageSchema',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\MessageSchema',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function api_gets_user_migration_history_ok() {\n initialize_users_management_permissions();\n\n //create user migrations\n $userMigration = $this->createUserMigrations();\n $this->signInAsUserManager('api')\n ->json('GET', '/api/v1/management/users-migration/history')\n ->assertStatus(200)\n ->assertJson([\n 'current_page' => 1,\n 'data' => [\n ['id'=> $userMigration->id,\n 'source_user_id' => $userMigration->source_user_id,\n 'source_user' => $userMigration->source_user,\n 'created_at' => $userMigration->created_at->toDateTimeString(),\n 'updated_at' => $userMigration->updated_at->toDateTimeString()\n ]\n ],\n 'from' => 1,\n 'last_page' => 1,\n 'next_page_url' => null,\n 'per_page' => 15,\n 'prev_page_url' => null,\n 'to' => 1,\n 'total' => 1\n ]);\n }",
"public function history($parameters) {\r\n $request = FlexmailAPI_Email::parseArray($parameters);\r\n\r\n $response = $this->execute(\"GetEmailAddressHistory\", $request);\r\n return FlexmailAPI::stripHeader($response, $this->config->get('debug_mode'));\r\n }",
"public function getStatusHistory()\n\t{\n\t\t$history = array();\n\t\t$model = $this->factory->getModel('StatusHistory');\n\t\t$statuses = $this->persistor->loadAllBy($model, array('application_id' => $this->application_id));\n\n\t\tif ($statuses !== FALSE && count($statuses) > 0)\n\t\t{\n\t\t\t$ref_list = $this->factory->getReferenceList('ApplicationStatusFlat');\n\t\t\tforeach ($statuses as $status)\n\t\t\t{\n\t\t\t\t$status_name = $ref_list->toName($status->application_status_id);\n\t\t\t\t$history[] = array(\n\t\t\t\t\t\"name\" =>$status_name,\n\t\t\t\t\t\"created\" => $status->date_created);\n\t\t\t}\n\t\t}\n\t\treturn $history;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
let the visitor visit all children of $path | public function visitChildren($path, ItemVisitor $visitor)
{
$node = $this->rootnode->getNode($path);
foreach($node as $child) {
$child->accept($visitor);
}
} | [
"public function getChildren($path) {\n\n $node = $this->getNodeForPath($path);\n $children = $node->getChildren();\n foreach($children as $child) {\n\n $this->cache[trim($path,'/') . '/' . $child->getName()] = $child;\n\n }\n return $children;\n\n }",
"function findPublishedPathNodes($path);",
"function findPathNodes($path);",
"function visit($visitor)\n\t{\n\t $visitor->beforeVisitingFolder($this);\n\t $visitor->visitFolder($this);\n\t\t\n\t\tforeach ($this->children as $child)\n\t\t\t$child->visit($visitor);\n\t\t$visitor->afterVisitingFolder($this);\n\t}",
"public function children($path = ''): array\n {\n if ($path) {\n $parts = $this->split($path);\n $name = array_shift($parts);\n\n $children = [];\n if (isset($this->subTrees[$name])) {\n $subtree = $this->subTrees[$name];\n $this->appendChildren(\n $children, $name, $subtree->children($parts)\n );\n }\n } else {\n $children = $this->own();\n foreach ($this->subTrees as $name => $subtree) {\n $this->appendChildren(\n $children, $name, $subtree->children()\n );\n }\n }\n\n return $children;\n }",
"public abstract function get_children_recursive();",
"private function buildRelativeChildren(){\n\n if(!is_array($this->children)){\n $this->children = static::resolveRouterPath($this->children); \n }//if\n\n $children = Array();\n\n foreach($this->children as $uri => $route){\n if(count($this->variableRestrictions)){\n if(!array_key_exists('where',$route)){\n $route['where'] = $this->variableRestrictions;\n }//if\n else {\n $route['where'] = array_merge($route['where'],$this->variableRestrictions);\n }//el\n }//if\n $children[$this->uri . $uri] = $route;\n }//foreach\n\n static::processRouterArray($children);\n\n }",
"public function prepareChildren ($parentPath = null);",
"public function children();",
"function walkPathExpression($pathExpr);",
"public function getPathElements();",
"public function subdirs($path = '/')\n {\n }",
"public function getter_children();",
"public function addPostParentsByPath($path){\n $path = trim($path, '/');\n\n if ( empty($path) || !$this->args['parse_path']){\n return;\n }\n\n $post = get_page_by_path($path);\n\n if ($post instanceof \\WP_Post) {\n $this->addPostParentsItems($post->ID);\n }elseif ($post === null){\n // Separate post names into separate paths by '/'\n $path = trim($path, '/');\n preg_match_all(\"/\\/.*?\\z/\", $path, $matches);\n if (!isset($matches)) {\n return;\n }\n // Reverse the array of matches to search for posts in the proper order.\n $matches = array_reverse($matches);\n // Loop through each of the path matches.\n foreach ($matches as $match) {\n if(!isset($match[0])){\n continue;\n }\n // Get the parent post by the given path.\n $path = str_replace($match[0], '', $path);\n $post = get_page_by_path(trim($path, '/'));\n if(!$post instanceof \\WP_Post){\n continue;\n }\n if($post->ID <= 0){\n continue;\n }\n // If a parent post is found, set the $post_id and break out of the loop.\n $this->addPostParentsItems($post->ID);\n break;\n }\n }\n }",
"function get_category_children($id, $before = '/', $after = '', $visited = array())\n{\n}",
"public function retrieveChildren(Node $node);",
"function add_path_parents( $path ) {\n\n\t\t\t/* Trim '/' off $path in case we just got a simple '/' instead of a real path. */\n\t\t\t$path = trim( $path, '/' );\n\n\t\t\t/* If there's no path, return. */\n\t\t\tif ( empty( $path ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// process default Cherry permalinks by own way\n\t\t\tif ( in_array( $path, array( 'tag', 'category' ) ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/* Get parent post by the path. */\n\t\t\t$post = get_page_by_path( $path );\n\n\t\t\tif ( ! empty( $post ) ) {\n\t\t\t\t$this->add_post_parents( $post->ID );\n\t\t\t} elseif ( is_null( $post ) ) {\n\n\t\t\t\t/* Separate post names into separate paths by '/'. */\n\t\t\t\t$path = trim( $path, '/' );\n\t\t\t\tpreg_match_all( '/\\/.*?\\z/', $path, $matches );\n\n\t\t\t\t/* If matches are found for the path. */\n\t\t\t\tif ( isset( $matches ) ) {\n\n\t\t\t\t\t/* Reverse the array of matches to search for posts in the proper order. */\n\t\t\t\t\t$matches = array_reverse( $matches );\n\n\t\t\t\t\t/* Loop through each of the path matches. */\n\t\t\t\t\tforeach ( $matches as $match ) {\n\n\t\t\t\t\t\t/* If a match is found. */\n\t\t\t\t\t\tif ( isset( $match[0] ) ) {\n\n\t\t\t\t\t\t\t/* Get the parent post by the given path. */\n\t\t\t\t\t\t\t$path = str_replace( $match[0], '', $path );\n\t\t\t\t\t\t\t$post = get_page_by_path( trim( $path, '/' ) );\n\n\t\t\t\t\t\t\t/* If a parent post is found, set the $post_id and break out of the loop. */\n\t\t\t\t\t\t\tif ( ! empty( $post ) && 0 < $post->ID ) {\n\t\t\t\t\t\t\t\t$this->add_post_parents( $post->ID );\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function testServeRecursive() {\n\t\t$this->Tree = new FlagTree();\n\t\t$this->Tree->order = null;\n\t\t$this->Tree->initialize(4, 1, null, null);\n\t\t\n\t\tRouter::connect('/*', array(\n\t\t\t'controller' => 'pages',\n\t\t\t'action' => 'view'\n\t\t));\n\t\t\n\t\t$this->Tree->Behaviors->load('TestRoutable', array(\n\t\t\t'route' => '/*',\n\t\t\t'fields' => 'name',\n\t\t\t'recursive' => true\n\t\t));\n\t\t\n\t\t$this->Tree->save(array(\n\t\t\t'name' => '1.1.1.1.1'\n\t\t));\n\t\t\n\t\t$result = $this->Tree->serve('/1.%20Root/1.1/1.1.1/1.1.1.1/1.1.1.1.1');\n\t\t$expected = 5;\n\t\t\n\t\t$this->assertEquals($expected, $result);\n\t\t$this->assertNotEmpty($this->Tree->data);\n\t}",
"public function getChildren(SeaMistObject $object);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scope limiting application to given key. | public function scopeWhereAppKey(Builder $query, string $key): Builder
{
return $query->where("key", $key);
} | [
"public function setScope($key,$scope,$owner=null);",
"public function scopeByKey($query, $key)\n {\n return $query->where([\n 'key' => $key,\n ]);\n }",
"public function getScope();",
"public function getScope($group, $key) {\n $method = 'getScope'.ucfirst($group);\n if(method_exists($this, $method)) {\n return $this->$method()->get($key);\n } return false;\n }",
"public function setScope($scope) {\n static::$server->setApplicationScope(\n rawurlencode(PermissionScopes::prepare($scope))\n );\n }",
"public function setAppScopeId($val)\n {\n $this->_propDict[\"appScopeId\"] = $val;\n return $this;\n }",
"public function setApplicationKey($key)\r\n {\r\n $this->application_key = $key;\r\n }",
"function key_filter(DatastoreClient $datastore)\n{\n // [START key_filter]\n $query = $datastore->query()\n ->kind('Task')\n ->filter('__key__', '>', $datastore->key('Task', 'someTask'));\n // [END key_filter]\n return $query;\n}",
"public function get_restriction($key = 0)\n {\n }",
"public function scopeRankKey($query, $rank_key)\n {\n return $query->where('rank_key', 'LIKE', $rank_key);\n }",
"public function setScopeCode($code);",
"public static function get_all_caps_scope() {\n\treturn '*';\n }",
"public function setAppKey($key)\n\t{\n\t\t$this->_appKey = (string)$key;\n\t}",
"public function validate(string $key, array $scope = [], array $input = []): void\n {\n $value = $key == '*' ? '*' : $scope[$key] ?? null;\n\n ($this->validate)($value, $key, $scope, $input);\n }",
"public function withRequiredScopeInsufficientScope()\n {\n $storage = new \\OAuth2\\Storage\\Memory(\n [\n 'access_tokens' => [\n 'atokenvalue' => [\n 'access_token' => 'atokenvalue',\n 'client_id' => 'a client id',\n 'user_id' => 'a user id',\n 'expires' => 99999999900,\n 'scope' => 'aScope anotherScope',\n ],\n ],\n ]\n );\n\n $server = new \\OAuth2\\Server(\n $storage,\n [\n 'enforce_state' => true,\n 'allow_implicit' => false,\n 'access_lifetime' => 3600\n ]\n );\n\n \\Slim\\Environment::mock(\n [\n 'CONTENT_TYPE' => 'application/json',\n 'PATH_INFO' => '/foo',\n ]\n );\n\n $slim = self::getSlimInstance();\n $authorization = new Authorization($server);\n $authorization->setApplication($slim);\n $slim->get('/foo', $authorization->withRequiredScope(['allowFoo']), self::$emptyFunction);\n\n $env = \\Slim\\Environment::getInstance();\n $slim->request = new \\Slim\\Http\\Request($env);\n $slim->request->headers->set('Authorization', 'Bearer atokenvalue');\n $slim->response = new \\Slim\\Http\\Response();\n\n $slim->run();\n\n $this->assertSame(403, $slim->response->status());\n $this->assertSame(\n '{\"error\":\"insufficient_scope\",\"error_description\":\"The request requires higher privileges than provided '\n . 'by the access token\"}',\n $slim->response->body()\n );\n }",
"public function setScope($scope);",
"public function getDefaultScope();",
"public function scopeOrWhereHasMeta(Builder $query, string|array $key): void\n {\n $query->whereHasMeta($key, 'or');\n }",
"public function filterByKey($key)\n {\n $this->filter[] = $this->field('key').' = '.$this->quote($key);\n return $this;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return pairs of days with their expected diff in business days with the default behaviour, i.e. that working time is Monday to Friday 09:00 to 17:00 and the precision is 1 hour. | public function diffInBusinessDaysDefaultProvider(): array
{
return [
// Going forward in time midnight to midnight.
['Monday 2018-05-14', 'Monday 2018-05-14', 0],
['Monday 2018-05-14', 'Tuesday 2018-05-15', 1],
['Monday 2018-05-14', 'Wednesday 2018-05-16', 2],
['Monday 2018-05-14', 'Thursday 17th May 2018', 3],
['Monday 2018-05-14', 'Friday 2018-05-18 ', 4],
['Monday 2018-05-14', 'Saturday 2018-05-19', 5],
['Monday 2018-05-14', 'Sunday 20th May 2018', 5],
// Going forward in time with specific hours.
['Friday 2018-05-18 17:00', 'Saturday 2018-05-19 17:00', 0],
['Friday 2018-05-18 15:00', 'Saturday 2018-05-19 17:00', 0],
['Monday 2018-05-14 00:00', 'Monday 2018-05-14 13:00', 0],
['Monday 2018-05-14 08:00', 'Monday 2018-05-14 13:00', 0],
['Monday 2018-05-14 09:00', 'Monday 2018-05-14 13:00', 0],
['Monday 2018-05-14 13:00', 'Monday 2018-05-14 17:00', 0],
['Monday 2018-05-14 09:00', 'Tuesday 2018-05-15 13:00', 1],
['Monday 2018-05-14 09:00', 'Friday 2018-05-18 13:00', 4],
['Monday 2018-05-14 09:00', 'Friday 2018-05-18 17:00', 5],
['Monday 2018-05-14 09:00', 'Friday 2018-05-18 19:00', 5],
['Monday 2018-05-14 09:00', 'Saturday 2018-05-19 07:00', 5],
['Monday 2018-05-14 09:00', 'Sunday 20th May 2018 13:00', 5],
['Monday 2018-05-14 09:00', 'Monday 30th May 2018 16:00', 15],
// Going back in time midnight to midnight.
['Monday 2018-05-14', 'Monday 7th May 2018', 5],
['Monday 2018-05-14', 'Tuesday 8th May 2018', 4],
['Monday 2018-05-14', 'Wednesday 9th May 2018', 3],
['Monday 2018-05-14', 'Thursday 10th May 2018', 2],
['Monday 2018-05-14', 'Friday 2018-05-11', 1],
['Monday 2018-05-14', 'Saturday 12th May 2018', 0],
['Monday 2018-05-14', 'Sunday 13th May 2018', 0],
// Going back in time with specific hours.
['Monday 2018-05-14 09:00', 'Monday 7th May 2018 09:00', 5],
['Monday 2018-05-14 17:00', 'Monday 7th May 2018 09:00', 6],
['Monday 2018-05-14 17:00', 'Monday 7th May 2018 13:00', 5],
['Monday 2018-05-14 10:00', 'Tuesday 8th May 2018 12:00', 3],
['Monday 2018-05-14 11:00', 'Wednesday 9th May 2018 13:00', 2],
['Monday 2018-05-14 17:00', 'Thursday 10th May 2018 13:00', 2],
['Monday 2018-05-14 15:00', 'Friday 2018-05-11 09:00', 1],
['Monday 2018-05-14 13:00', 'Saturday 12th May 2018 13:00', 0],
['Monday 2018-05-14 18:00', 'Sunday 13th May 2018 01:00', 1],
];
} | [
"public function testGetWorkingDaysTwoWeeks()\n {\n $monday = \\DateTime::createFromFormat('Y-m-d', '2020-06-08');\n $friday = \\DateTime::createFromFormat('Y-m-d', '2020-06-19');\n $calculator = new WorkingDaysCalculator();\n $this->assertEquals(10, $calculator->getWorkingDays($monday, $friday));\n }",
"public function subBusinessHoursProvider(): array\n {\n return [\n // Subtracting less than a day.\n ['Wednesday 2018-05-23 17:00', 0, 'Wednesday 2018-05-23 17:00'],\n ['Wednesday 2018-05-23 17:00', 0.25, 'Wednesday 2018-05-23 16:45'],\n ['Wednesday 2018-05-23 17:00', 0.5, 'Wednesday 2018-05-23 16:30'],\n ['Wednesday 2018-05-23 17:00', 0.75, 'Wednesday 2018-05-23 16:15'],\n ['Wednesday 2018-05-23 17:00', 1, 'Wednesday 2018-05-23 16:00'],\n ['Wednesday 2018-05-23 17:00', 1.25, 'Wednesday 2018-05-23 15:45'],\n ['Wednesday 2018-05-23 17:00', 1.5, 'Wednesday 2018-05-23 15:30'],\n ['Wednesday 2018-05-23 17:00', 1.75, 'Wednesday 2018-05-23 15:15'],\n ['Wednesday 2018-05-23 17:00', 2, 'Wednesday 2018-05-23 15:00'],\n // Subtracting a whole business day or more.\n ['Wednesday 2018-05-23 17:00', 8, 'Wednesday 2018-05-23 09:00'],\n ['Wednesday 2018-05-23 17:00', 8.25, 'Tuesday 2018-05-22 16:45'],\n ['Wednesday 2018-05-23 17:00', 8.5, 'Tuesday 2018-05-22 16:30'],\n ['Wednesday 2018-05-23 17:00', 8.75, 'Tuesday 2018-05-22 16:15'],\n ['Wednesday 2018-05-23 17:00', 9, 'Tuesday 2018-05-22 16:00'],\n ['Wednesday 2018-05-23 17:00', 16, 'Tuesday 2018-05-22 09:00'],\n ['Wednesday 2018-05-23 17:00', 23, 'Monday 2018-05-21 10:00'],\n ['Wednesday 2018-05-23 17:00', 24, 'Monday 2018-05-21 09:00'],\n // Negative values.\n ['Wednesday 2018-05-23 17:00', -0, 'Wednesday 2018-05-23 17:00'],\n ['Wednesday 2018-05-23 17:00', -0.25, 'Thursday 2018-05-24 09:15'],\n ['Wednesday 2018-05-23 17:00', -0.5, 'Thursday 2018-05-24 09:30'],\n ['Wednesday 2018-05-23 17:00', -0.75, 'Thursday 2018-05-24 09:45'],\n ['Wednesday 2018-05-23 17:00', -1, 'Thursday 2018-05-24 10:00'],\n ['Wednesday 2018-05-23 17:00', -1.25, 'Thursday 2018-05-24 10:15'],\n ['Wednesday 2018-05-23 17:00', -1.5, 'Thursday 2018-05-24 10:30'],\n ['Wednesday 2018-05-23 17:00', -1.75, 'Thursday 2018-05-24 10:45'],\n ['Wednesday 2018-05-23 17:00', -2, 'Thursday 2018-05-24 11:00'],\n ];\n }",
"public function testWorkingDays()\n {\n $this->assertEquals(23, $this->testTraitClass->getWorkingDays(5, 1, 2019));\n $this->assertEquals(20, $this->testTraitClass->getWorkingDays(5, 2, 2019));\n $this->assertEquals(23, $this->testTraitClass->getWorkingDays(5, 7, 2019));\n $this->assertEquals(19, $this->testTraitClass->getWorkingDays(4, 7, 2019));\n $this->assertEquals(5, $this->testTraitClass->getWorkingDays(1, 7, 2019));\n $this->assertEquals(10, $this->testTraitClass->getWorkingDays(2, 7, 2019));\n $this->assertEquals(15, $this->testTraitClass->getWorkingDays(3, 7, 2019));\n $this->assertEquals(19, $this->testTraitClass->getWorkingDays(4, 7, 2019));\n }",
"public function addBusinessHoursProvider(): array\n {\n return [\n // Adding less than a day.\n ['Monday 2018-05-14 09:00', 0, 'Monday 2018-05-14 09:00'],\n ['Monday 2018-05-14 09:00', 0.25, 'Monday 2018-05-14 09:15'],\n ['Monday 2018-05-14 09:00', 0.5, 'Monday 2018-05-14 09:30'],\n ['Monday 2018-05-14 09:00', 0.75, 'Monday 2018-05-14 09:45'],\n ['Monday 2018-05-14 09:00', 1, 'Monday 2018-05-14 10:00'],\n ['Monday 2018-05-14 09:00', 1.25, 'Monday 2018-05-14 10:15'],\n ['Monday 2018-05-14 09:00', 1.5, 'Monday 2018-05-14 10:30'],\n ['Monday 2018-05-14 09:00', 1.75, 'Monday 2018-05-14 10:45'],\n ['Monday 2018-05-14 09:00', 2, 'Monday 2018-05-14 11:00'],\n ['Monday 2018-05-14 09:00', 7.75, 'Monday 2018-05-14 16:45'],\n // Adding a whole business day or more.\n ['Monday 2018-05-14 09:00', 8, 'Monday 2018-05-14 17:00'],\n ['Monday 2018-05-14 09:00', 8.25, 'Tuesday 2018-05-15 09:15'],\n ['Monday 2018-05-14 09:00', 8.5, 'Tuesday 2018-05-15 09:30'],\n ['Monday 2018-05-14 09:00', 8.75, 'Tuesday 2018-05-15 09:45'],\n ['Monday 2018-05-14 09:00', 9, 'Tuesday 2018-05-15 10:00'],\n ['Monday 2018-05-14 09:00', 16, 'Tuesday 2018-05-15 17:00'],\n ['Monday 2018-05-14 09:00', 23, 'Wednesday 2018-05-16 16:00'],\n ['Monday 2018-05-14 09:00', 24, 'Wednesday 2018-05-16 17:00'],\n // Negative values.\n ['Monday 2018-05-14 09:00', -0, 'Monday 2018-05-14 09:00'],\n ['Monday 2018-05-14 09:00', -0.25, 'Friday 2018-05-11 16:45'],\n ['Monday 2018-05-14 09:00', -0.5, 'Friday 2018-05-11 16:30'],\n ['Monday 2018-05-14 09:00', -0.75, 'Friday 2018-05-11 16:15'],\n ['Monday 2018-05-14 09:00', -1, 'Friday 2018-05-11 16:00'],\n ['Monday 2018-05-14 09:00', -1.25, 'Friday 2018-05-11 15:45'],\n ['Monday 2018-05-14 09:00', -1.5, 'Friday 2018-05-11 15:30'],\n ['Monday 2018-05-14 09:00', -1.75, 'Friday 2018-05-11 15:15'],\n ['Monday 2018-05-14 09:00', -2, 'Friday 2018-05-11 15:00'],\n ];\n }",
"public function getTuesdayEndTimes ();",
"public function diffInBusinessDays()\n {\n /**\n * Returns the difference between 2 dates in business days.\n *\n * @param \\Carbon\\Carbon|\\Carbon\\CarbonImmutable|\\Carbon\\CarbonInterface $other other date\n *\n * @return int\n */\n return static function ($other = null) {\n /** @var Carbon|BusinessDay $self */\n $self = static::this();\n\n return $self->diffInDaysFiltered(static function ($date) {\n /* @var Carbon|static $date */\n\n return $date->isBusinessDay();\n }, $other);\n };\n }",
"function _calcWeekDays()\r\n\t{\r\n\t\tif ($this->_spandir==1) // start is before stop (positive span)\r\n\t\t{\r\n\t\t\t$dtStart = new DateClass($this->StartDate);\r\n\t\t\t$dtStop = $this->StopDate;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$dtStart = new DateClass($this->StopDate);\r\n\t\t\t$dtStop = $this->StartDate;\r\n\t\t}\r\n\t\t\r\n\t\t//--------------------------------------------------\r\n\t\t//\tcount times crossing period boundries\r\n\t\t//--------------------------------------------------\r\n\t\t$counter=0;\r\n\t\twhile ($dtStart->TimeStamp() < $dtStop->TimeStamp())\r\n\t\t{\r\n\t\t\tif ($dtStart->DatePart(\"wday\") > 0 && $dtStart->DatePart(\"wday\") < 5)\r\n\t\t\t\t$counter++;\t\t\t\r\n\t\t\t$dtStart->Add(\"day\",1);\r\n\t\t}\r\n\t\t$this->_weekdays = $counter;\r\n\t\t$this->_weekdays *= $this->_spandir;\r\n\t\t\r\n\t\treturn ($this->_weekdays);\r\n\r\n\t}",
"private function calculateDifference()\n {\n $one = $this->timestamp;\n $two = $this->comparisonDateTimestamp;\n $invert = false;\n\n if ($one > $two) {\n list($one, $two) = [$two, $one];\n $invert = true;\n }\n\n $key = [\"y\", \"m\", \"d\", \"h\", \"i\", \"s\"];\n $a = array_combine($key, array_map(\"intval\", explode(\" \", date(\"Y m d H i s\", $one))));\n $b = array_combine($key, array_map(\"intval\", explode(\" \", date(\"Y m d H i s\", $two))));\n\n $result = [];\n $result[\"y\"] = $b[\"y\"] - $a[\"y\"];\n $result[\"m\"] = $b[\"m\"] - $a[\"m\"];\n $result[\"d\"] = $b[\"d\"] - $a[\"d\"];\n $result[\"h\"] = $b[\"h\"] - $a[\"h\"];\n $result[\"i\"] = $b[\"i\"] - $a[\"i\"];\n $result[\"s\"] = $b[\"s\"] - $a[\"s\"];\n $result[\"isBefore\"] = $invert ? 0 : 1;\n $result[\"days\"] = intval(abs(($one - $two)/86400));\n\n if ($invert)\n $this->dateNormalize($a, $result);\n else\n $this->dateNormalize($b, $result);\n\n $this->comparisonArray = $result;\n }",
"public static function periodEquivalentDays()\n {\n return [\n static::HOURLY => 1/24,\n static::DAILY => 1,\n static::WEEKLY => 7,\n static::MONTHLY => 30,\n static::YEARLY => 365,\n ];\n }",
"function questions_time_diff($beginTS, $endTS) {\n\n\t$settingBeginHour = elgg_get_plugin_setting(\"workflow_workingtimes_begin_hour\", \"questions\");\n\t$settingBeginMinute = elgg_get_plugin_setting(\"workflow_workingtimes_begin_minute\", \"questions\");\n\t$settingEndHour = elgg_get_plugin_setting(\"workflow_workingtimes_end_hour\", \"questions\");\n\t$settingEndMinute = elgg_get_plugin_setting(\"workflow_workingtimes_end_minute\", \"questions\");\n\t$workingDays = unserialize(elgg_get_plugin_setting(\"workflow_workingtimes_days\", \"questions\"));\n\n\tif ($beginTS == 0 | $endTS == 0 | $beginTS >= $endTS) {\n\t\treturn 0;\n\t}\n\n\tif (isset($settingBeginHour) && isset($settingBeginMinute)) {\n\t\t$workBeginTime = new DateTime($settingBeginHour . \":\" . $settingBeginMinute);\n\t} else {\n\t\t$workBeginTime = new DateTime(\"09:00\");\n\t}\n\n\tif (isset($settingEndHour) && isset($settingEndMinute)) {\n\t\t$workEndTime = new DateTime($settingEndHour . \":\". $settingEndMinute);\n\t} else {\n\t\t$workEndTime = new DateTime(\"17:00\");\n\t}\n\n\tif (!is_array($workingDays)) {\n\t\t$workingDays = array(1,2,3,4,5);\n\t}\n\n\t$begin = new DateTime();\n\t$begin->setTimeStamp($beginTS);\n\t$end = new DateTime();\n\t$end->setTimeStamp($endTS);\n\n\t// on the same day\n\tif ($begin->format(\"Ymd\") == $end->format(\"Ymd\")) {\n\t\t// return zero if this day is not a working day\n\t\tif (!in_array($begin->format(\"N\"), $workingDays)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// format as times\n\t\t$beginTime = new DateTime($begin->format(\"H:i:s\"));\n\t\t$endTime = new DateTime($end->format(\"H:i:s\"));\n\n\t\tif ($beginTime < $workBeginTime) {\n\t\t\t$lowerBound = $workBeginTime;\n\t\t} else {\n\t\t\tif ($beginTime > $workEndTime) {\n\t\t\t\t$lowerBound = $workEndTime;\n\t\t\t} else {\n\t\t\t\t$lowerBound = $beginTime;\n\t\t\t}\n\t\t}\n\n\t\tif ($endTime > $workEndTime) {\n\t\t\t$upperBound = $workEndTime;\n\t\t} else {\n\t\t\tif ($endTime < $workBeginTime) {\n\t\t\t\t$upperBound = $workBeginTime;\n\t\t\t} else {\n\t\t\t\t$upperBound = $endTime;\n\t\t\t}\n\t\t}\n\n\t\t$diff = $lowerBound->diff($upperBound);\n\t\treturn (($diff->h*3600) + ($diff->i*60) + ($diff->s));\n\t} else {\n\t\t// not on the same day\n\t\t$totalTime = 0;\n\n\t\t// calculate the working time on the first day\n\t\tif (in_array($begin->format('N'), $workingDays)) {\n\t\t\t$beginTime = new DateTime($begin->format(\"H:i:s\"));\n\n\t\t\tif ($beginTime < $workBeginTime) {\n\t\t\t\t$lowerBound = $workBeginTime;\n\t\t\t} elseif ($beginTime > $workBeginTime && $beginTime < $workEndTime) {\n\t\t\t\t$lowerBound = $beginTime;\n\t\t\t} else {\n\t\t\t\t$lowerBound = $workEndTime;\n\t\t\t}\n\n\t\t\t$upperBound = $workEndTime;\n\n\t\t\t$diff = $lowerBound->diff($upperBound);\n\t\t\t$totalTime = $totalTime + ($diff->h*3600) + ($diff->i*60) + ($diff->s);\n\t\t}\n\n\t\t// calculate the working time on the last day\n\t\tif (in_array($end->format('N'), $workingDays)) {\n\t\t\t$endTime = new DateTime($end->format(\"H:i:s\"));\n\t\t\t\n\t\t\t$lowerBound = $workBeginTime;\n\n\t\t\tif ($endTime < $workBeginTime) {\n\t\t\t\t$upperBound = $workBeginTime;\n\t\t\t} elseif ($endTime > $workBeginTime && $endTime < $workEndTime) {\n\t\t\t\t$upperBound = $endTime;\n\t\t\t} else {\n\t\t\t\t$upperBound = $workEndTime;\n\t\t\t}\n\n\t\t\t$diff = $lowerBound->diff($upperBound);\n\t\t\t$totalTime = $totalTime + ($diff->h*3600) + ($diff->i*60) + ($diff->s);\n\t\t}\n\n\t\t// set to beginning of the next day\n\t\t$begin->modify('midnight +1 day');\t\n\n\t\t// set to last midnight\n\t\t$end->modify('midnight');\n\t\t\n\t\t$diff = $workBeginTime->diff($workEndTime);\n\t\t$secondsPerDay = ($diff->h*3600) + ($diff->i*60) + ($diff->s);\n\t\t\n\t\t// calculate the workingtime on the days inbetween\n\t\t$period = new DatePeriod($begin, new DateInterval('P1D'), $end);\t\t\n\t\tforeach ($period as $day) {\n\t\t\tif (in_array($day->format('N'), $workingDays)) {\n\t\t\t\t$totalTime = $totalTime + $secondsPerDay;\n\t\t\t}\n\t\t}\n\n\t\treturn $totalTime;\n\t}\n}",
"public function testLengthOfBusinessDayDefault()\n {\n // Given we have a business time with the default behaviour;\n $time = new BusinessTime();\n\n // Then the length of a business day should be 8 hours.\n self::assertEqualsWithDelta(\n 8,\n $time->lengthOfBusinessDay()->inHours(),\n 2,\n 'Should be 8 hours'\n );\n self::assertEqualsWithDelta(\n 480,\n $time->lengthOfBusinessDay()->inMinutes(),\n 2,\n 'Should be 480 minutes'\n );\n }",
"public function addBusinessHoursConstraintProvider(): array\n {\n return [\n [\n 'Monday 2018-05-14 09:00',\n // Exclude lunch time.\n (new BetweenHoursOfDay(9, 17))->except(\n new BetweenHoursOfDay(13, 14)\n ),\n 4,\n 'Monday 2018-05-14 13:00',\n ],\n [\n 'Monday 2018-05-14 09:00',\n // Exclude lunch time.\n (new BetweenHoursOfDay(9, 17))->except(\n new BetweenHoursOfDay(13, 14)\n ),\n 5, // Would be 14:00, but we're not counting lunch time.\n 'Monday 2018-05-14 15:00',\n ],\n [\n 'Monday 2018-05-14 09:00',\n // Exclude lunch time.\n (new BetweenHoursOfDay(9, 17))->except(\n new BetweenHoursOfDay(13, 14)\n ),\n 7 + 5, // 1 full day, plus 5 hours.\n 'Tuesday 2018-05-15 15:00',\n ],\n ];\n }",
"function getWorkingDays($startDate, $endDate, $holidays) {\n // do strtotime calculations just once\n $endDate = strtotime($endDate);\n $startDate = strtotime($startDate);\n\n\n //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\n //We add one to inlude both dates in the interval.\n $days = ($endDate - $startDate) / 86400 + 1;\n\n //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\n//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\n $workingDays = $days;\n\n //We subtract the holidays\n foreach ($holidays as $holiday) {\n $time_stamp = strtotime($holiday);\n //If the holiday doesn't fall in weekend\n if ($startDate <= $time_stamp && $time_stamp <= $endDate)\n $workingDays--;\n }\n\n return $workingDays;\n}",
"public function getDifferenceInDays();",
"function getWorkdays($date1, $date2, $workSat = FALSE, $patron = NULL) {\n if (!defined('SATURDAY')) define('SATURDAY', 6);\n if (!defined('SUNDAY')) define('SUNDAY', 0);\n\n // Array of all public festivities\n $publicHolidays = array('01-01', '01-06', '04-25', '05-01', '06-02', '08-15', '11-01', '12-08', '12-25', '12-26');\n // The Patron day (if any) is added to public festivities\n if ($patron) {\n $publicHolidays[] = $patron;\n }\n\n /*\n * Array of all Easter Mondays in the given interval\n */\n $yearStart = date('Y', strtotime($date1));\n $yearEnd = date('Y', strtotime($date2));\n\n for ($i = $yearStart; $i <= $yearEnd; $i++) {\n $easter = date('Y-m-d', easter_date($i));\n list($y, $m, $g) = explode(\"-\", $easter);\n $monday = mktime(0,0,0, date($m), date($g)+1, date($y));\n $easterMondays[] = $monday;\n }\n\n $start = strtotime($date1);\n $end = strtotime($date2);\n $workdays = 0;\n for ($i = $start; $i <= $end; $i = strtotime(\"+1 day\", $i)) {\n $day = date(\"w\", $i); // 0=sun, 1=mon, ..., 6=sat\n $mmgg = date('m-d', $i);\n if ($day != SUNDAY &&\n !in_array($mmgg, $publicHolidays) &&\n !in_array($i, $easterMondays) &&\n !($day == SATURDAY && $workSat == FALSE)) {\n $workdays++;\n }\n }\n\n return intval($workdays);\n}",
"function CalculateChangeBetweenDays($yesterday_results, $today_results, $min_diff=2){\n $result=array();\n $medium_change=0;\n $large_change=0;\n $crazy_change=0;\n foreach ( array_keys($today_results) as $x){\n $result[\"$x\"]=array();\n array_push($result[\"$x\"], \"{$today_results[\"$x\"][0]}\");\n for($y=1; $y<sizeof($today_results[\"$x\"])-3; $y++){\n if(isset($yesterday_results[\"$x\"][$y]) && $yesterday_results[\"$x\"][$y]!=0){\n $delta=0;\n #$delta = round($today_results[\"$x\"][$y] - $yesterday_results[\"$x\"][$y],2);\n $delta = $today_results[\"$x\"][$y] - $yesterday_results[\"$x\"][$y];\n if(($delta > $min_diff || $delta < (-1*$min_diff)) &&\n $today_results[\"$x\"][$y]!=0 &&\n $yesterday_results[\"$x\"][$y]!=0){\n $result[\"$x\"][$y-1]=(($today_results[\"$x\"][$y] - $yesterday_results[\"$x\"][$y])/$yesterday_results[\"$x\"][$y])*100;\n }\n else{\n $result[\"$x\"][$y-1]=\"n/a\";\n }\n }\n else{\n $result[\"$x\"][$y-1]=\"n/a\";\n }\n if($result[\"$x\"][$y-1]>=$GLOBALS['medium_change']){\n $GLOBALS['medium_number']++; \n }\n if($result[\"$x\"][$y-1]>=$GLOBALS['large_change']){\n $GLOBALS['large_number']++;\n }\n if($result[\"$x\"][$y-1]>=$GLOBALS['crazy_change']){\n $GLOBALS['crazy_number']++;\n }\n }//end for \n }//end foreach\n return $result;\n}",
"public function businessPeriodsDefaultProvider(): array\n {\n // Start\n // End\n // Sub-period timing pairs\n return [\n [\n 'Monday 2018-05-21 03:00',\n 'Monday 2018-05-21 19:00',\n [\n ['Monday 09:00', 'Monday 17:00'],\n ],\n ],\n [\n 'Monday 2018-05-21 09:00',\n 'Tuesday 2018-05-22 17:00',\n [\n ['Monday 09:00', 'Monday 17:00'],\n ['Tuesday 09:00', 'Tuesday 17:00'],\n ],\n ],\n [\n 'Monday 2018-05-21 05:00',\n 'Wednesday 2018-05-23 23:00',\n [\n ['Monday 09:00', 'Monday 17:00'],\n ['Tuesday 09:00', 'Tuesday 17:00'],\n ['Wednesday 09:00', 'Wednesday 17:00'],\n ],\n ],\n [\n 'Friday 2018-05-25 13:00',\n 'Tuesday 2018-05-29 11:00',\n [\n ['Friday 13:00', 'Friday 17:00'],\n ['Monday 09:00', 'Monday 17:00'],\n ['Tuesday 09:00', 'Tuesday 11:00'],\n ],\n ],\n ];\n }",
"public function workingHours()\n {\n $workingHours = $this->openings->reduce(function ($workingHours, $opening) {\n return $workingHours + $opening->length();\n });\n\n return BusinessTime::secondsToHours($workingHours, 1);\n }",
"public function daysWithReducedWorkingHours()\n {\n return Hour::convertToArray($this->hours->where('closed', Hour::OPEN_WITH_REDUCED_WORKING_HOURS));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Each service provider has multi appointments | public function serviceproviderAppointment() {
return $this->hasMany(UserAppointments::class, 'service_provider_id');
} | [
"public function get_service_vice_appointments()\r\n\t{\r\n\t\t$this->load->model('reports_model');\r\n\r\n\t\t$query_service_vice_appointments = $this->reports_model->get_service_vice_appointments();\r\n\r\n\t\tif(!$query_service_vice_appointments == 0)\r\n\t\t{ \r\n\t\t\treturn $query_service_vice_appointments;\r\n\t\t}\r\n\r\n\t}",
"function getAvailableAppointments()\n{\n\t$app = Application::getInstance();\n\t$app->getAvailableAppointments();\n}",
"public function fetchAppointmentList();",
"public function getAppointments()\n {\n return $this->hasMany(Appointment::className(), ['id' => 'id']);\n }",
"public function storeAppointments($appointments);",
"public function GetAllAppointments()\n\t{\n\t\t$appointments = Appointment::all();\n\t\t$calendarAppointments = array();\n\t\tforeach($appointments as $a) {\n\n\t\t\t$customer = Customer::find($a['customer_id']);\n\t\t\t$customer = $customer->first_name.' '.$customer->last_name;\n\n\t\t\t$package = Package::find($a['appointment_type']);\n\n\t\t\t$startDate = date_create($a['appointment_datetime']);\n\t\t\t$endDate = date_create($a['appointment_datetime']);\n\t\t\t$time = (string)$package->package_time.' hours';\n\t\t\t$endDate = date_add($endDate, date_interval_create_from_date_string($time));\n\t\t\t$event = array(\n\t\t\t\t'id' => $a['id'],\n\t\t\t\t'title' => 'Appointment with '.$customer,\n\t\t\t\t'start' => $startDate->format('Y-m-d\\TH:i:s'),\n\t\t\t\t'end' => $endDate->format('Y-m-d\\TH:i:s'),\n\t\t\t);\n\t\t\tarray_push($calendarAppointments, $event);\n\t\t}\n\n\t\treturn response()->json($calendarAppointments);\n\t}",
"public function listAllAppointments() {\n\t\t$appointment = new Appointment();\n\t\treturn $appointment->getList('', $this->db->formatQuery('WHERE t.politician = %i ORDER BY t.time_end DESC', $this->id));\n\t}",
"public function getAppointments()\n {\n return $this->appointments;\n }",
"public function appointmentsResourceCollection()\n {\n $apps = Appointment::all();\n\n return AppointmentResource::collection($apps);\n }",
"public function appointments()\n {\n return $this->hasMany('App\\Appointment');\n }",
"public function testSearchEntityAppointments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function getAppointments()\n {\n return $this->hasMany(Appointment::className(), ['car_id' => 'id']);\n }",
"public function getAppointments()\n {\n if (array_key_exists(\"appointments\", $this->_propDict)) {\n return $this->_propDict[\"appointments\"];\n } else {\n return null;\n }\n }",
"function Sycle_Appointments() {\n\treturn Sycle_Appointments::instance();\n}",
"public function get_calendar_appointments() {\n\t\t\n\t\t$data = $this->glbl('practitioner_access');\n\t\t$allAppointments = array();\n\t\t$user_id\t \t = $this->tank_auth->ci->session->userdata['user_id'];\n\t\t//$clinicData = $this->manage_locations->getClinicId($user_id);\n\t\t//$clinicLocations = $this->manage_locations->clinicLocationsArray($clinicData->clinic_id);\n\t\t//$myLocation = $this->manage_locations->getLocationID($user_id);\n\t\t\n\t\t$locationPracs = $this->manage_locations->locationPractitioner($this->encryption->decode($this->session->userdata['clinic_location']));\n\t\t//echo '<pre>'; print_r($locationPracs); die;\n\t\t/*if(isset($this->session->userdata['location_pracs']))\n\t\t\t$locationPracs = $this->session->userdata['location_pracs'];\n\t\telse\n\t\t\t$locationPracs = '';\n echo '<pre>'; print_r($locationPracs); die;\n\t\t\t\t*/\n\t\t$allAppointments = $this->appointments->get_appointments($this->encryption->decode($this->session->userdata['clinic_location']), $locationPracs);\n $this->session->unset_userdata('appointment_entered_date');\n\t\techo json_encode($allAppointments);\n\t\texit();\n\t}",
"function getAppointments($filters = [], $getOne = false)\n{\n $appointments = getRecords(APPOINTMENTS_COLLECTION, $filters, $getOne);\n if ($getOne) {\n return $appointments;\n }\n\n // remove duplicates\n return array_unique($appointments, SORT_REGULAR);\n}",
"public function testGetMessageListAppointments()\r\n\t{\r\n\t\t// Create an event to make sure we have at least one\r\n\t\t$obj = CAntObject::factory($this->dbh, \"calendar_event\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My Test Event\");\r\n\t\t$obj->setValue(\"ts_start\", date(\"m/d/Y\") . \" 12:00 PM\");\r\n\t\t$obj->setValue(\"ts_end\", date(\"m/d/Y\") . \" 01:00 PM\");\r\n\t\t$eid = $obj->save();\r\n\r\n\t\t// Get events\r\n\t\t$events = $this->backend->GetMessageList(\"calendar_root\", time()); // second param cuts off to today\r\n\t\t$found = false;\r\n\t\tforeach ($events as $evt)\r\n\t\t{\r\n\t\t\tif ($evt[\"id\"] == $eid)\r\n\t\t\t\t$found = true;\r\n\t\t}\r\n\t\t$this->assertTrue($found);\r\n\r\n\t\t// Cleanup\r\n\t\t$obj->removeHard();\r\n\t}",
"public static function getAppointmentProviderNonTimeBasedSMSNotifications()\n {\n return [\n [\n 'name' => 'provider_appointment_approved',\n 'entity' => 'appointment',\n 'type' => 'sms',\n 'time' => 'NULL',\n 'timeBefore' => 'NULL',\n 'timeAfter' => 'NULL',\n 'sendTo' => 'provider',\n 'subject' => 'NULL',\n 'content' =>\n 'Hi %employee_full_name%,\n \nYou have one confirmed %service_name% appointment at %location_name% on %appointment_date% at %appointment_start_time%. The appointment is added to your schedule.\n \nThank you,\n%company_name%'\n ],\n [\n 'name' => 'provider_appointment_pending',\n 'entity' => 'appointment',\n 'type' => 'sms',\n 'time' => 'NULL',\n 'timeBefore' => 'NULL',\n 'timeAfter' => 'NULL',\n 'sendTo' => 'provider',\n 'subject' => 'NULL',\n 'content' =>\n 'Hi %employee_full_name%,\n \nYou have new appointment in %service_name%. The appointment is waiting for a confirmation.\n \nThank you,\n%company_name%'\n ],\n [\n 'name' => 'provider_appointment_rejected',\n 'entity' => 'appointment',\n 'type' => 'sms',\n 'time' => 'NULL',\n 'timeBefore' => 'NULL',\n 'timeAfter' => 'NULL',\n 'sendTo' => 'provider',\n 'subject' => 'NULL',\n 'content' =>\n 'Hi %employee_full_name%,\n \nYour %service_name% appointment at %location_name%, scheduled for %appointment_date% at %appointment_start_time% has been rejected. \n \nThank you,\n%company_name%'\n ],\n [\n 'name' => 'provider_appointment_canceled',\n 'entity' => 'appointment',\n 'type' => 'sms',\n 'time' => 'NULL',\n 'timeBefore' => 'NULL',\n 'timeAfter' => 'NULL',\n 'sendTo' => 'provider',\n 'subject' => 'NULL',\n 'content' =>\n 'Hi %employee_full_name%,\n \nYour %service_name% appointment, scheduled on %appointment_date%, at %location_name% has been canceled.\n \nThank you,\n%company_name%'\n ],\n [\n 'name' => 'provider_appointment_rescheduled',\n 'entity' => 'appointment',\n 'type' => 'sms',\n 'time' => 'NULL',\n 'timeBefore' => 'NULL',\n 'timeAfter' => 'NULL',\n 'sendTo' => 'provider',\n 'subject' => 'NULL',\n 'content' =>\n 'Hi %employee_full_name%,\n \nThe details for your %service_name% appointment at %location_name% has been changed. The appointment is now set for %appointment_date% at %appointment_start_time%.\n \nThank you,\n%company_name%'\n ]\n ];\n }",
"public function listAppointments($region = null) {\n\t\t$rgid = is_object($region)? $region->id: ($region != null? intval($region): null);\n\t\t$appointment = new Appointment();\n\t\treturn $appointment->getList('', $this->db->formatQuery('WHERE t.politician = %i '.($rgid? 'AND t.region = %i ': '').' ORDER BY t.time_end DESC', $this->id, $rgid));\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test__Query tests that the query method properly returns a nonerror when send is successfull | public function test__Query() {
// Mock request
$request = Stub::make( "RestfulRecord\RestfulRecordRequest", array(
"_component" => $this->_mockRestfulRecordComponent,
"getClient" => function() {
return Stub::make( "GuzzleHttp\Client", array(
"send" => function( RequestInterface $request, array $options = array() ) {
return "foo";
}
) );
}
) );
// Verify an no error occurred
verify( $request->query() )->equals( array( false, "foo" ) );
} | [
"public function testQueryWithError()\n {\n $db = \\db::getSingleton();\n \n $res = $db->query(\"x=1\");\n\n $this->assertFalse($res);\n }",
"public function testQuery()\n {\n // Test query\n $sql = \"SELECT * FROM products\";\n $this->assertTrue($this->db->query($sql));\n }",
"public function testQuerying(){\n\n $data = $this->loadTestDataCSV(FIXTURES_PATH . $this->_data_source);\n if(!empty($data)){\n foreach($data as $case){\n $methodName = array_shift($case);\n if(!empty($methodName)){\n $methodName = 'query' . ucfirst($methodName);\n $args = @array_shift($case);\n $expected = eval('return ' . @array_shift($case) . ';');\n\n $db = self::$container->db;\n\n $reflection = new \\ReflectionClass($db);\n if($reflection->hasMethod($methodName)){\n $methodReflection = $reflection->getMethod($methodName);\n $result = $methodReflection->invokeArgs($db, (array)$args);\n\n $this->assertEquals($expected, $result, sprintf('Calling %s with provided params assertion failed', $methodName));\n }\n }\n }\n }\n }",
"public function testErrornousSingleResultSqlQuery() {\r\n $this->setExpectedException('Exception', 'Error in query: errornous sql query');\r\n $this->getPersistenceAdapter()->executeSingleResultQuery('errornous sql query');\r\n }",
"public function testQueryBatches()\n {\n }",
"public function testGetQueryResults()\n {\n $sQuery = 'Select f_name from names Where f_name = :firstname';\n $aBinds = array();\n $aBinds['firstname'] = 'jassiem';\n\n $aResults = $this->oDb->GetQueryResults($sQuery, $aBinds);\n $this->assertNotEmpty($aResults);\n }",
"public function testQuery()\n {\n if ($this->validate($this->queryValidationRules())) {\n $name = $this->request->getPost('queryName');\n $query = $this->request->getPost('query');\n return $this->displayQueryResult($query, \"CTCDB: '$name' query output\");\n } else {\n return $this->loadPageInNewWindow('queryTestFailed', 'Bad query');\n }\n }",
"abstract public function testSendSuccess();",
"public function testQueryError() {\n\t\t$this->setExpectedException('\\YapepBase\\Exception\\DatabaseException');\n\n\t\t$sql = '\n\t\t\tSLECT\n\t\t\t\t*\n\t\t\tFROM\n\t\t\t\ttest\n\t\t';\n\n\t\t$this->connection->query($sql);\n\t}",
"public function testCallingToStringThenDatabaseQuery()\n {\n $database = $this->databaseFactory();\n $query = $this->queryFactory($database);\n $query->table('fixture1')\n ->where('id = ?', 102)\n ->limit(1);\n $query->toString();\n\n // This should not throw an exception\n $query->query();\n }",
"public function testQueryLogging()\n {\n $logger = $this->getMockBuilder('Cake\\Log\\Engine\\BaseLog')->setMethods(['log'])->getMock();\n $logger->expects($this->once())->method('log');\n Log::config('elasticsearch', $logger);\n\n $connection = ConnectionManager::get('test');\n $connection->logQueries(true);\n $result = $connection->request('_stats');\n $connection->logQueries(false);\n\n $this->assertNotEmpty($result);\n }",
"public function testQueryWithEmptySql()\n {\n $db = \\db::getSingleton();\n \n $res = $db->query(0);\n\n $this->assertFalse($res);\n }",
"public function testRunASqlQuery(){\r\n $sql = \"Select * from orders;\";\r\n $db = new database;\r\n $db->connectToDatabase();\r\n $success = $db->runASqlQuery($sql);\r\n $this->assertEquals(true,$success);\r\n }",
"public function testQueryTaskResults()\n {\n }",
"public function testErrornousMultipleResultSqlQuery() {\r\n $this->setExpectedException('Exception', 'Error in query: errornous sql query');\r\n $this->getPersistenceAdapter()->executeMultipleResultQuery('errornous sql query');\r\n }",
"public function testQueryInstance() {\r\n $this->assertInstanceOf('\\PM\\Main\\Database\\Query', $this->_instance->query());\r\n }",
"public function testPostQuery(): void {\n $result = $this->query('query { root }', NULL, [], NULL, FALSE, Request::METHOD_POST);\n $this->assertSame(200, $result->getStatusCode());\n $this->assertSame([\n 'data' => [\n 'root' => 'test',\n ],\n ], json_decode($result->getContent(), TRUE));\n $this->assertFalse($result->isCacheable());\n }",
"public function testQueryValid() {\n\t $response = $this->yql->execute('select * from delicious.feeds.popular');\n\t $this->assertTrue(isset($response->query) && isset($response->query->results), 'Response contains valid results');\n\t}",
"public function testQueryUPCs()\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Usage: null, 'h2' => null, 'h3' => null, 'p' => null, 'hasButton' => false, 'link' => '', 'desktopName' => 'desk image', 'desktopWidth' => '25vw', 'tabletName' => null, 'tabletWidth' => '25vw', 'mobileName' => null, 'mobileWidth' => '95vw', 'altText' => 'TestAltText', 'class' => null, 'id' => null, 'dataValue' => null, 'debug' => false, 'debugWidth' => 1900, 'debugHeight' => 500 ]); ?> | function ddd_hero_image($args = array()) {
$defaults = array(
'h1' => null,
'h2' => null,
'h3' => null,
'p' => null,
'hasButton' => false,
'buttonText' => null,
'link' => '#',
'desktopName' => 'desk image',
'desktopWidth' => '25vw',
'tabletName' => null,
'tabletWidth' => '25vw',
'mobileName' => null,
'mobileWidth' => '95vw',
'altText' => null,
'class' => null,
'id' => null,
'dataValue' => null,
'debug' => false,
'debugWidth' => 1900,
'debugHeight' => 500
);
$args = wp_parse_args( $args, $defaults);
?>
<div class="hero-image-container">
<?php
do_action('ddd_add_responsive_image',
[
'desktopName' => $args['desktopName'],
'desktopWidth' => $args['desktopWidth'],
'tabletName' => $args['tabletName'],
'tabletWidth' => $args['tabletWidth'],
'mobileName' => $args['mobileName'],
'mobileWidth' => $args['mobileWidth'],
'altText' => $args['altText'],
'class' => $args['class'],
'id' => $args['id'],
'dataValue' => $args['dataValue'],
'debug' => $args['debug'],
'debugWidth' => $args['debugWidth'],
'debugHeight' => $args['debugHeight']
]);
?>
<?php if ($args['hasButton'] || ($args['h1'] != null) || ($args['h2'] != null) || ($args['h3'] != null) || ($args['p'] != null)) {?>
<div class="hero-image-text-container">
<?php if (isset($args['h1'])) {?>
<h1><?php echo $args['h1'] ?></h1>
<?php } ?>
<?php if (isset($args['h2'])) {?>
<h2><?php echo $args['h2'] ?></h2>
<?php } ?>
<?php if (isset($args['h3'])) {?>
<h3><?php echo $args['h3'] ?></h3>
<?php } ?>
<?php if (isset($args['p'])) {?>
<p><?php echo $args['p'] ?></p>
<?php } ?>
<?php if ($args['hasButton']) {?>
<a href="<?php echo $args['link'] ?>" class="book-appointment-button"><?php echo $args['buttonText'] ?></a>
<?php } ?>
</div>
<?php } ?>
</div>
<?php
} | [
"public function get_header_default_html(){\n\t\t\t\n\t\t$html = '';\n\t\t\n\t\t//collect theme mod values\n\t\t$retail_header_background_image = get_theme_mod('retail_header_background_image');\n\t\t$retail_header_background_color = get_theme_mod('retail_header_background_color');\n\t\t$retail_header_text_color = get_theme_mod('retail_header_text_color');\n\t\t$retail_header_overlay_color = get_theme_mod('retail_header_overlay_color');\n\t\t$retail_header_overlay_opacity = get_theme_mod('retail_header_overlay_opacity');\t\t\n\t\t$retail_header_logo = get_theme_mod('retail_header_logo');\n\t\t$retail_header_title = get_theme_mod('retail_header_title');\n\t\t$retail_header_subtitle = get_theme_mod('retail_header_subtitle');\n\t\t$retail_header_video_url = get_theme_mod('retail_header_video_url');\n\t\n\t\t\n\t\t//if we have a background-color\n\t\tif(!empty($retail_header_background_color)){\n\t\t\t$html .= '<div class=\"header-background-color\" style=\"background-color:' . $retail_header_background_color . ';\"></div>';\n\t\t}\n\t\t\n\t\t//if we have a background-image set\n\t\tif(!empty($retail_header_background_image)){\t\n\t\t\t$html .= '<div class=\"header-background-image background-image\" style=\"background-image: url(' . $retail_header_background_image . ');\"></div>';\t\n\t\t}\n\t\t\n\t\t//if we have an overlay color\n\t\tif(!empty($retail_header_overlay_color)){\n\t\t\t//display based on opacity\n\t\t\tif($retail_header_overlay_opacity){\n\t\t\t\t$html .= '<div class=\"header-overlay-color\" style=\"background-color: ' . $retail_header_overlay_color . '; opacity: ' . $retail_header_overlay_opacity . ';\"></div>';\n\t\t\t}else{\n\t\t\t\t$html .= '<div class=\"header-overlay-color\" style=\"background-color:' . $retail_header_overlay_color . ';\"></div>';\n\t\t\t}\n\t\t} \n\t\t\n\t\t\n\t\t//if we have a video\n\t\tif(!empty($retail_header_video_url)){\n\t\t\t\n\t\t\t$html .= '<div class=\"video-popup\">';\n\t\t\t\t$html .= '<div class=\"background-overlay\"></div>';\n\t\t\t\t$html .= '<div class=\"video-container\">';\n\t\t\t\t\t$html .= '<div class=\"toggle-video-popup\"><i class=\"icon fa fa-times\" aria-hidden=\"true\"></i></div>';\n\t\t\t\t\t$html .= '<iframe seamless=\"seamless\" src=\"' . $retail_header_video_url . '\"></iframe>';\n\t\t\t\t$html .= '</div>';\n\t\t\t$html .= '</div>';\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$style = '';\n\t\tif(!empty($retail_header_text_color)){\n\t\t\t$style = 'color: ' . $retail_header_text_color . ';';\n\t\t}\n\n\t\t$html .= '<div class=\"header-inner el-row inner small-padding-top-bottom-small medium-padding-top-bottom-medium medium-padding-bottom-large\" style=\"' . $style . ';\">';\n\t\t\t//Logo\n\t\t\t$html .= '<div class=\"logo-wrap el-col-small-6\">';\n\t\t\t\t$html .= '<a href=\"' . esc_url( home_url( '/' ) ) . '\">';\n\t\t\t\t\t$html .= '<img class=\"logo\" src=\"' . get_stylesheet_directory_uri() . '/img/retail_motion_logo_white.png\" alt=\"Retail Motion\"/>';\n\t\t\t\t$html .= '</a>';\n\t\t\t$html .= '</div>';\n\t\t\t//Menu + search\n\t\t\t$html .= '<div class=\"action-wrap el-col-small-6 small-align-right\">';\n\t\t\t\t$html .= '<div class=\"menu-toggle inline-block small-margin-right-small\" data-menu-id=\"primary-menu\">';\n\t\t\t\t\t$html .= '<i class=\"toggle-main-menu icon fa fa-bars fa-2x\" aria-hidden=\"true\"></i>';\n\t\t\t\t$html .= '</div>';\n\t\t\t\t$html .= '<div class=\"search-toggle inline-block\">';\n\t\t\t\t\t$html .= '<i class=\"toggle-search icon fa fa-search fa-2x\" aria-hidden=\"false\"></i>';\n\t\t\t\t$html .= '</div>';\n\t\t\t$html .= '</div>';\n\t\t\t\n\t\t\t\n\t\t\t//Main content block\n\t\t\t$html .=' <div class=\"content clear el-col-small-12 el-col-medium-8 el-col-medium-offset-2 small-align-center medium-margin-top-large medium-margin-bottom-large\">';\n\t\t\t\tif(!empty($retail_header_title)){\n\t\t\t\t\t$html .= '<h1 class=\"title uppercase big fat\">' . $retail_header_title . '</h1>';\n\t\t\t\t}\n\t\t\t\tif(!empty($retail_header_logo)){\n\t\t\t\t\t$html .= '<img class=\"header-logo small-margin-top-botom-large\" src=\"' . $retail_header_logo . '\"/>';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Video functionality\n\t\t\t\tif(!empty($retail_header_video_url)){\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<div class=\"video-button-wrap\">';\n\t\t\t\t\t\t$html .= '<div class=\"video-title\">Watch Video</div>';\n\t\t\t\t\t\t$html .= '<div class=\"video-button\"><i class=\"icon fa fa-play-circle\" aria-hidden=\"true\"></i></div>';\n\t\t\t\t\t$html .= '</div>';\n\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!empty($retail_header_subtitle)){\n\t\t\t\t\t$html .= '<h2 class=\"subtitle small-margin-top-bottom-large small-margin-top-large fat\">' . $retail_header_subtitle . '</h2>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t$html .= '</div>';\n\t\t\t$html .= '<div class=\"fold-arrow align-center\">';\n\t\t\t\t$html .= '<i class=\"fold-icon fa fa-angle-down\" aria-hidden=\"true\"></i>';\n\t\t\t$html .= '</div>';\n\t\t$html .= '</div>';\n\n\t\treturn $html;\n\t\t\n\t}",
"public function drawBasicMetatags() {\n \n //Meta\n echo '\n<!-- Site basic URL -->\n<base href=\"'.ShaContext::getSiteFullUrl().'/\" >\n \n<!-- Meta tags -->\n<meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\" >\n<meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1\">\n<meta http-equiv=\"content-language\" content=\"'.ShaContext::getLanguage()->getValue(\"language_abr\").'\" >\n<meta name=\"category\" content=\"'.ShaParameter::get(\"SITE_CATEGORY\").'\" >\n<meta name=\"Revisit-After\" content=\"'.$this->getValue('page_client_cache_duration').' days\" >\n<meta name=\"robots\" content=\"'.$this->getValue('page_robots').'\" >\n \n<!-- favicon -->\n<link rel=\"icon\" type=\"image/png\" href=\"favicon.png\" >\n \n<!-- Page info -->\n<title>[SHA_TITLE]</title>\n<meta name=\"description\" content=\"[SHA_DESCRIPTION]\" >\n<meta name=\"keywords\" content=\"'.$this->writeKeyWord($this->_shaPageObjects).'\" >\n';\n }",
"function ddd_image_card($args = array()) {\r\n $defaults = array(\r\n 'heading' => 'Test',\r\n 'text' => 'testing text',\r\n 'link' => '#',\r\n 'desktopName' => 'desk image',\r\n 'desktopWidth' => '15vw',\r\n 'tabletName' => null,\r\n 'tabletWidth' => '20vw',\r\n 'mobileName' => null,\r\n 'mobileWidth' => '90vw',\r\n 'altText' => 'TestAltText',\r\n 'class' => null,\r\n 'id' => null,\r\n 'dataValue' => null\r\n );\r\n\r\n $args = wp_parse_args( $args, $defaults);\r\n\r\n // $imageNameDesktop = $args['imageName'];\r\n $heading = $args['heading'];\r\n $textContent = $args['text'];\r\n $link = $args['link'];\r\n ?>\r\n <section class='image-card-container'>\r\n <?php\r\n // console_log($imageNameDesktop);\r\n do_action('ddd_add_responsive_image',\r\n [\r\n 'desktopName' => $args['desktopName'],\r\n 'desktopWidth' => $args['desktopWidth'],\r\n 'tabletName' => $args['tabletName'],\r\n 'tabletWidth' => $args['tabletWidth'],\r\n 'mobileName' => $args['mobileName'],\r\n 'mobileWidth' => $args['mobileWidth'],\r\n 'altText' => $args['altText'],\r\n 'class' => $args['class'],\r\n 'id' => $args['id']\r\n ]);\r\n ?>\r\n <h3><?php echo $heading ?></h3>\r\n <p><?php echo $textContent ?></p>\r\n <a href=\"<?php echo $link ?>\">Learn More</a>\r\n </section>\r\n <?php\r\n}",
"function oet_display_medium_embed($attributes, $ajax = false){\n $html = \"\";\n $shortcodeText = \"\";\n \n if (!empty($attributes)) {\n extract($attributes);\n\n $shortcodeText = \"[oet_medium\";\n if (isset($attributes['url']) && $attributes['url']!==\"\")\n $shortcodeText .= sprintf(\" url='%s'\",esc_url($attributes['url']));\n if (isset($attributes['title']) && $attributes['title']!==\"\")\n $shortcodeText .= sprintf(\" title='%s'\",$attributes['title']);\n if (isset($attributes['description']) && $attributes['description']!==\"\")\n $shortcodeText .= sprintf(\" description='%s'\",$attributes['description']);\n if (isset($attributes['align']) && $attributes['align']!==\"\")\n $shortcodeText .= sprintf(\" align='%s'\",$attributes['align']);\n if (isset($attributes['textalign']) && $attributes['textalign']!==\"\")\n $shortcodeText .= sprintf(\" textalign='%s'\",$attributes['textalign']);\n if (isset($attributes['bgImage']) && $attributes['bgImage']!==\"\")\n $shortcodeText .= sprintf(\" image='%s'\",$attributes['bgImage']);\n if (isset($attributes['bgcolor']) && $attributes['bgcolor']!==\"\")\n $shortcodeText .= sprintf(\" bgcolor='%s'\",str_replace('#','',$attributes['bgcolor']));\n if (isset($attributes['authorurl']) && $attributes['authorurl']!==\"\")\n $shortcodeText .= sprintf(\" authorurl='%s'\",$attributes['authorurl']);\n if (isset($attributes['authorname']) && $attributes['authorname']!==\"\")\n $shortcodeText .= sprintf(\" authorname='%s'\",$attributes['authorname']);\n if (isset($attributes['authorlogo']) && $attributes['authorlogo']!==\"\")\n $shortcodeText .= sprintf(\" authorlogo='%s'\",$attributes['authorlogo']);\n if (isset($attributes['heading']) && $attributes['heading']!==\"\")\n $shortcodeText .= sprintf(\" heading='%s'\",$attributes['heading']);\n else\n $shortcodeText .= sprintf(\" heading='%s'\",\"h2\");\n $shortcodeText .= \"]\";\n\n if (isset($shortcodeText)){\n $html .= do_shortcode($shortcodeText);\n }\n }\n \n return $html;\n}",
"public function media_html() {\n//\t\t\tif($this->get_option($this->prefix.'_show_image', 'on') == 'on') {\n\t\t\t\t$this->get_simple_thumb();\n//\t\t\t}\n\t\t}",
"public function image_meta() {\r\n\r\n\t\t/* If there's a width and height. */\r\n\t\tif ( !empty( $this->meta['width'] ) && !empty( $this->meta['height'] ) ) {\r\n\r\n\t\t\t$this->items['dimensions'] = array(\r\n\t\t\t\t/* Translators: Media dimensions - 1 is width and 2 is height. */\r\n\t\t\t\t'<a href=\"' . esc_url( wp_get_attachment_url() ) . '\">' . sprintf( __( '%1$s × %2$s', 'omega' ), number_format_i18n( absint( $this->meta['width'] ) ), number_format_i18n( absint( $this->meta['height'] ) ) ) . '</a>',\r\n\t\t\t\t__( 'Dimensions', 'omega' )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t/* If a timestamp exists, add it to the $items array. */\r\n\t\tif ( !empty( $this->meta['image_meta']['created_timestamp'] ) )\r\n\t\t\t$this->items['created_timestamp'] = array( date_i18n( get_option( 'date_format' ), $this->meta['image_meta']['created_timestamp'] ), __( 'Date', 'omega' ) );\r\n\r\n\t\t/* If a camera exists, add it to the $items array. */\r\n\t\tif ( !empty( $this->meta['image_meta']['camera'] ) )\r\n\t\t\t$this->items['camera'] = array( $this->meta['image_meta']['camera'], __( 'Camera', 'omega' ) );\r\n\r\n\t\t/* If an aperture exists, add it to the $items array. */\r\n\t\tif ( !empty( $this->meta['image_meta']['aperture'] ) )\r\n\t\t\t$this->items['aperture'] = array( sprintf( '<sup>f</sup>⁄<sub>%s</sub>', $this->meta['image_meta']['aperture'] ), __( 'Aperture', 'omega' ) );\r\n\r\n\t\t/* If a focal length is set, add it to the $items array. */\r\n\t\tif ( !empty( $this->meta['image_meta']['focal_length'] ) )\r\n\t\t\t/* Translators: Camera focal length. */\r\n\t\t\t$this->items['focal_length'] = array( sprintf( __( '%s mm', 'omega' ), $this->meta['image_meta']['focal_length'] ), __( 'Focal Length', 'omega' ) );\r\n\r\n\t\t/* If an ISO is set, add it to the $items array. */\r\n\t\tif ( !empty( $this->meta['image_meta']['iso'] ) ) {\r\n\t\t\t$this->items['iso'] = array(\r\n\t\t\t\t$this->meta['image_meta']['iso'], \r\n\t\t\t\t'<abbr title=\"' . __( 'International Organization for Standardization', 'omega' ) . '\">' . __( 'ISO', 'omega' ) . '</abbr>'\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t/* If a shutter speed is given, format the float into a fraction and add it to the $items array. */\r\n\t\tif ( !empty( $this->meta['image_meta']['shutter_speed'] ) ) {\r\n\r\n\t\t\tif ( ( 1 / $this->meta['image_meta']['shutter_speed'] ) > 1 ) {\r\n\t\t\t\t$shutter_speed = '<sup>' . number_format_i18n( 1 ) . '</sup>⁄';\r\n\r\n\t\t\t\tif ( number_format( ( 1 / $this->meta['image_meta']['shutter_speed'] ), 1 ) == number_format( ( 1 / $this->meta['image_meta']['shutter_speed'] ), 0 ) )\r\n\t\t\t\t\t$shutter_speed .= sprintf( '<sub>%s</sub>', number_format_i18n( ( 1 / $this->meta['image_meta']['shutter_speed'] ), 0, '.', '' ) );\r\n\t\t\t\telse\r\n\t\t\t\t\t$shutter_speed .= sprintf( '<sub>%s</sub>', number_format_i18n( ( 1 / $this->meta['image_meta']['shutter_speed'] ), 1, '.', '' ) );\r\n\t\t\t} else {\r\n\t\t\t\t$shutter_speed = $this->meta['image_meta']['shutter_speed'];\r\n\t\t\t}\r\n\r\n\t\t\t/* Translators: Camera shutter speed. \"sec\" is an abbreviation for \"seconds\". */\r\n\t\t\t$this->items['shutter_speed'] = array( sprintf( __( '%s sec', 'omega' ), $shutter_speed ), __( 'Shutter Speed', 'omega' ) );\r\n\t\t}\r\n\t}",
"function editor_element($params)\n\t\t{\n\t\t\t$params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n\t\t\t$params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n\t\t\t$params['content'] \t = NULL; //remove to allow content elements\n\t\t\treturn $params;\n\t\t}",
"function editor_element($params)\n\t\t\t{\n\t\t\t\t$params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n\t\t\t\t$params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n\t\t\t\treturn $params;\n\t\t\t}",
"function editor_element($params)\n\t\t\t{\n\t\t\t\t$params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n\t\t\t\t$params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n\t\t\t\t$params['content'] \t = NULL; //remove to allow content elements\n\t\t\t\treturn $params;\n\t\t\t}",
"function heading($data = '', $h = '1', $attributes = '') {\n return '<h' . $h . _stringify_attributes($attributes) . '>' . $data . '</h' . $h . '>';\n }",
"function theHTML($attributes) {\n ob_start(); ?>\n <h3>Today the sky is <?php echo esc_html($attributes['skyColor']); ?>, and grass is <?php echo esc_html($attributes['grassColor']); ?></h3> \n <?php return ob_get_clean();\n\n }",
"function editor_element($params)\n\t\t\t{\n\t\t\t\t$params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n\t\t\t\t$params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n\n\t\t\t\treturn $params;\n\t\t\t}",
"function va_get_info_symbol ($info_text){\r\n\treturn '<img src=\"' . VA_PLUGIN_URL . '/images/Help.png\" style=\"vertical-align: middle;\" title=\"' . $info_text . '\" class=\"infoSymbol\" />';\r\n}",
"function Content_Display_Parameters() {\n\n $cdp = array(\n\t\t\"default\" => \"Unknown\",\n\t\t\"chrome|pdf\" => \"Pdf\",\n\t\t\"firefox|pdf\" => \"Pdf\",\n\t\t\"edge|pdf\" => \"Pdf\",\n\t\t\"pdf\" => \"Unknown\",\n\t\t\"gif\" => \"Image\",\n\t\t\"jpg\" => \"Image\",\n\t\t\"jpeg\" => \"Image\",\n\t\t\"png\" => \"Image\",\n\t\t\"svg\" => \"Image\",\n\t\t\"firefox|odt\" => \"OfficeVisu\",\n\t\t\"firefox|ods\" => \"OfficeNovisu\",\n\t\t\"firefox|odg\" => \"OfficeVisu\",\n\t\t\"firefox|odp\" => \"OfficeVisu\",\n\t\t\"firefox|doc\" => \"OfficeVisu\",\n\t\t\"firefox|ppt\" => \"OfficeVisu\",\n\t\t\"firefox|xls\" => \"OfficeNovisu\",\n\t\t\"firefox|docx\" => \"OfficeVisu\",\n\t\t\"firefox|pptx\" => \"OfficeVisu\",\n\t\t\"firefox|xlsx\" => \"OfficeNovisu\",\n\t\t\"chrome|odt\" => \"OfficeVisu\",\n\t\t\"chrome|ods\" => \"OfficeNovisu\",\n\t\t\"chrome|odg\" => \"OfficeVisu\",\n\t\t\"chrome|odp\" => \"OfficeVisu\",\n\t\t\"chrome|doc\" => \"OfficeVisu\",\n\t\t\"chrome|ppt\" => \"OfficeVisu\",\n\t\t\"chrome|xls\" => \"OfficeNovisu\",\n\t\t\"chrome|docx\" => \"OfficeVisu\",\n\t\t\"chrome|pptx\" => \"OfficeVisu\",\n\t\t\"chrome|xlsx\" => \"OfficeNovisu\",\n\t\t\"edge|odt\" => \"OfficeVisu\",\n\t\t\"edge|ods\" => \"OfficeNovisu\",\n\t\t\"edge|odg\" => \"OfficeVisu\",\n\t\t\"edge|odp\" => \"OfficeVisu\",\n\t\t\"edge|doc\" => \"OfficeVisu\",\n\t\t\"edge|ppt\" => \"OfficeVisu\",\n\t\t\"edge|xls\" => \"OfficeNovisu\",\n\t\t\"edge|docx\" => \"OfficeVisu\",\n\t\t\"edge|pptx\" => \"OfficeVisu\",\n\t\t\"edge|xlsx\" => \"OfficeNovisu\",\n\t\t\"safari|odt\" => \"OfficeVisu\",\n\t\t\"safari|ods\" => \"OfficeNovisu\",\n\t\t\"safari|odg\" => \"OfficeVisu\",\n\t\t\"safari|odp\" => \"OfficeVisu\",\n\t\t\"safari|doc\" => \"OfficeVisu\",\n\t\t\"safari|ppt\" => \"OfficeVisu\",\n\t\t\"safari|xls\" => \"OfficeNovisu\",\n\t\t\"safari|docx\" => \"OfficeVisu\",\n\t\t\"safari|pptx\" => \"OfficeVisu\",\n\t\t\"safari|xlsx\" => \"OfficeNovisu\",\n\t\t\"txt\" => \"Text\",\n\t\t\"html\" => \"Html\",\n\t\t\"xapp\" => \"ExternApp\",\n\t\t\"xlnk\" => \"ExternLink\",\n\t\t\"mkv\" => \"Video\",\n\t\t\"mp4\" => \"Video\",\n\t\t\"avi\" => \"Video\",\n\t\t\"flv\" => \"Video\",\n\t\t\"mov\" => \"Video\",\n\t\t\"mpg\" => \"Video\",\n\t\t\"mts\" => \"Video\",\n\t\t\"mpeg\" => \"Video\",\n\t\t\"webm\" => \"Video\"\n\t\t);\n return $cdp;\n }",
"public function headingPreview(array $data)\n {\n }",
"protected function get_brick_html()\n {\n\n }",
"function titulo($class,$id,$style,$title,$titulo){\n\n$c= '\"';\n$class = $c . $class .$c; // Ej: \"example\"\n$id = $c . $id \t .$c;\n$style = $c . $style .$c;\n$title = $c . $title .$c;\t\n\n$nombre = 'h2';\n$izq\t= '<';\n$der\t= '>';\n$esp\t= ' ';\n$inicio = $izq . $nombre . $esp; \t\t// Ej: <h2\n$cierre = $izq . '/' . $nombre . $der;\t// Ej: </h2>\n\t\n$attr = array( \n\t\"css\" \t=> array ($class),\n\t\"id\" \t=> array ($id),\n\t\"style\" => array ($style),\n\t\"title\" => array ($title)\n\t);\n\t\necho $inicio;\n\n\tforeach ($attr as $indice => $valor){\n\t\techo ($indice); // attr\n\t\techo \"=\"; // Ej: css =\n\t\techo $attr[$indice] [0]; // (\" \") Ej: css=\"\"\n\t\techo \" \"; // espacio entre attr Ej: css=\"\" title=\"\" .... \n\t}\necho $der . \"Titulo\" . $cierre;\n\n\n\n}",
"function beaver_extender_fe_css_builder_html_elements_array() {\n\t\n\t$elements_array = array(\n\t\t'page_elements' => array(\n\t\t\t'HTML' => '/* HTML */' . \"\\n\" . 'html',\n\t\t\t'Body' => '/* Body */' . \"\\n\" . 'body',\n\t\t\t'Page Container' => '/* Page Container */' . \"\\n\" . '.fl-page',\n\t\t\t'Universal Link' => '/* Universal Link */' . \"\\n\" . 'a',\n\t\t\t'Universal Link Hover' => '/* Universal Link Hover */' . \"\\n\" . 'a:hover, a:focusS',\n\t\t\t'Universal Headings' => '/* Universal Headings */' . \"\\n\" . 'h1, h2, h3, h4, h5, h6',\n\t\t\t'H1 Headings' => '/* H1 Headings */' . \"\\n\" . 'h1',\n\t\t\t'H2 Headings' => '/* H2 Headings */' . \"\\n\" . 'h2',\n\t\t\t'H3 Headings' => '/* H3 Headings */' . \"\\n\" . 'h3',\n\t\t\t'H4 Headings' => '/* H4 Headings */' . \"\\n\" . 'h4',\n\t\t\t'H5 Headings' => '/* H5 Headings */' . \"\\n\" . 'h5',\n\t\t\t'H6 Headings' => '/* H6 Headings */' . \"\\n\" . 'h6',\n\t\t\t'Universal Menus' => '/* Universal Menus */' . \"\\n\" . '.fl-page-nav',\n\t\t\t'Image Align None' => '/* Image Align None */' . \"\\n\" . 'img.alignnone',\n\t\t\t'Image Align Left' => '/* Image Align Left */' . \"\\n\" . 'img.alignleft',\n\t\t\t'Image Align Center' => '/* Image Align Center */' . \"\\n\" . 'img.centered',\n\t\t\t'Image Align Right' => '/* Image Align Right */' . \"\\n\" . 'img.alignright',\n\t\t\t'Image WP Smiley' => '/* Image WP Smiley */' . \"\\n\" . 'img.wp-smiley, img.wp-wink',\n\t\t\t'Align Left' => '/* Align Left */' . \"\\n\" . '.alignleft',\n\t\t\t'Align Center' => '/* Align Center */' . \"\\n\" . '.aligncenter',\n\t\t\t'Align Right' => '/* Align Right */' . \"\\n\" . '.alignright',\n\t\t\t'WP Caption' => '/* WP Caption */' . \"\\n\" . '.wp-caption',\n\t\t\t'WP Caption Text' => '/* WP Caption Text */' . \"\\n\" . 'p.wp-caption-text',\n\t\t\t'Thumbnail Image' => '/* Thumbnail Image */' . \"\\n\" . '.attachment-thumbnail',\n\t\t\t'Post Format Image' => '/* Post Format Image */' . \"\\n\" . '.post-format-image',\n\t\t\t'Input/Select/Textarea' => '/* Input/Select/Textarea */' . \"\\n\" . 'input, select, textarea',\n\t\t\t'Input/Textarea Focus' => '/* Input/Textarea Focus */' . \"\\n\" . 'input:focus, textarea:focus',\n\t\t\t'Buttons' => '/* Buttons */' . \"\\n\" . 'button, input[type="button"], input[type="reset"], input[type="submit"], .button',\n\t\t\t'Buttons Hover' => '/* Buttons Hover */' . \"\\n\" . 'button:hover, input:hover[type="button"], input:hover[type="reset"], input:hover[type="submit"], .button:hover, button:focus, input:focus[type="button"], input:focus[type="reset"], input:focus[type="submit"], .button:focus',\n\t\t\t'Button Disabled' => '/* Button Disabled */' . \"\\n\" . '.site-container button:disabled, .site-container button:disabled:hover, .site-container input:disabled, .site-container input:disabled:hover, .site-container input[type="button"]:disabled, .site-container input[type="button"]:disabled:hover, .site-container input[type="reset"]:disabled, .site-container input[type="reset"]:disabled:hover, .site-container input[type="submit"]:disabled, .site-container input[type="submit"]:disabled:hover',\n\t\t\t'Table' => '/* Table */' . \"\\n\" . 'table',\n\t\t\t'Table Body' => '/* Table Body */' . \"\\n\" . 'tbody',\n\t\t\t'Table Standard/Header Cells' => '/* Table Standard/Header Cells */' . \"\\n\" . 'td, th',\n\t\t\t'Table Standard Cells' => '/* Table Standard Cells */' . \"\\n\" . 'td',\n\t\t\t'Table Header Cells' => '/* Table Header Cells */' . \"\\n\" . 'th',\n\t\t\t'Table Standard/Header Cells first-child' => '/* Table Standard/Header Cells first-child */' . \"\\n\" . 'td:first-child, th:first-child'\n\t\t),\n\t\t'top_bar_elements' => array(\n\t\t\t'Tob Bar' => '/* Top Bar */' . \"\\n\" . '.fl-page-bar',\n\t\t\t'Top Bar Container' => '/* Top Bar Container */' . \"\\n\" . '.fl-page-bar-container',\n\t\t\t'Top Bar Row' => '/* Top Bar Row */' . \"\\n\" . '.fl-page-bar-row',\n\t\t\t'Top Bar Text' => '/* Top Bar Text */' . \"\\n\" . '.fl-page-bar-text',\n\t\t\t'Top Bar Menu' => '/* Top Bar Menu */' . \"\\n\" . '.fl-page-bar-nav',\n\t\t\t'Top Bar Menu Page Link' => '/* Top Bar Menu Page Link */' . \"\\n\" . '.fl-page-bar .navbar-nav > li > a',\n\t\t\t'Top Bar Menu Page Link Hover' => '/* Top Bar Menu Page Link Hover */' . \"\\n\" . '.fl-page-bar .navbar-nav > li > a:hover, .fl-page-bar .navbar-nav > li > a:focus',\n\t\t\t'Top Bar Menu Current Page Link' => '/* Top Bar Menu Current Page Link */' . \"\\n\" . '.fl-page-bar .navbar-nav > li.current-menu-item > a',\n\t\t\t'Top Bar Menu Page Link Hover/Current Page' => '/* Top Bar Menu Page Link Hover/Current Page */' . \"\\n\" . '.fl-page-bar .navbar-nav > li > a:hover, .fl-page-bar .navbar-nav > li > a:focus,' . \"\\n\" . '.fl-page-bar .navbar-nav > li.current-menu-item > a',\n\t\t\t'Top Bar Menu Sub-Menu' => '/* Top Bar Menu Sub-Menu */' . \"\\n\" . '.fl-page-bar-nav > li > ul.sub-menu',\n\t\t\t'Top Bar Menu Sub-Menu Link' => '/* Top Bar Menu Sub-Menu Link */' . \"\\n\" . '.fl-page-bar-nav > li > ul.sub-menu li a',\n\t\t\t'Top Bar Menu Sub-Menu Link Hover' => '/* Top Bar Menu Sub-Menu Link Hover */' . \"\\n\" . '.fl-page-bar-nav > li > ul.sub-menu li a:hover'\n\t\t),\n\t\t'header_elements' => array(\n\t\t\t'Header' => '/* Header */' . \"\\n\" . '.fl-page-header',\n\t\t\t'Header Wrap' => '/* Header Wrap */' . \"\\n\" . '.fl-page-header-wrap',\n\t\t\t'Title Area' => '/* Title Area */' . \"\\n\" . '.fl-page-header-logo-col',\n\t\t\t'Site Title' => '/* Site Title */' . \"\\n\" . '.fl-page-header-logo',\n\t\t\t'Site Title Link' => '/* Site Title Link */' . \"\\n\" . '.fl-page-header-logo a, .fl-page-header-logo a *',\n\t\t\t'Site Title Link Hover' => '/* Site Title Link Hover */' . \"\\n\" . '.fl-page-header-logo a:hover, .fl-page-header-logo a:focus, .fl-page-header-logo a:hover *, .fl-page-header-logo a:focus *',\n\t\t\t'Site Description' => '/* Site Description */' . \"\\n\" . '.fl-page-header-text',\n\t\t\t'Logo Image Area' => '/* Logo Image Area */' . \"\\n\" . '.fl-page-header-logo',\n\t\t\t'Logo Image' => '/* Logo Image */' . \"\\n\" . '.fl-logo-image',\n\t\t\t'Header Links' => '/* Header Links */' . \"\\n\" . '.fl-page-header a, .fl-page-header a *, .fl-page-header a.fa',\n\t\t\t'Header Links Hover' => '/* Header Links Hover */' . \"\\n\" . '.fl-page-header a:hover, .fl-page-header a:focus, .fl-page-header a:hover *, .fl-page-header a:focus *, .fl-page-header a.fa:hover, .fl-page-header a.fa:focus',\n\t\t\t'Header Social Icons' => '/* Header Social Icons */' . \"\\n\" . '.fl-social-icons'\n\t\t),\n\t\t'header_menu_elements' => array(\n\t\t\t'Header Menu Wrap' => '/* Header Menu Wrap */' . \"\\n\" . '.fl-page-nav-wrap',\n\t\t\t'Header Menu Container' => '/* Header Menu Container */' . \"\\n\" . '.fl-page-nav-container',\n\t\t\t'Header Menu Nav' => '/* Header Menu Nav */' . \"\\n\" . '.fl-page-nav',\n\t\t\t'Header Menu' => '/* Header Menu */' . \"\\n\" . '.fl-page-nav .navbar-nav',\n\t\t\t'Header Menu Page Link' => '/* Header Menu Page Link */' . \"\\n\" . '.fl-page-nav-wrap .navbar-nav > li > a',\n\t\t\t'Header Menu Page Link Hover' => '/* Header Menu Page Link Hover */' . \"\\n\" . '.fl-page-nav-wrap .navbar-nav > li > a:hover',\n\t\t\t'Header Menu Current Page Link' => '/* Header Menu Current Page Link */' . \"\\n\" . '.fl-page-nav-wrap .navbar-nav > li.current-menu-item > a',\n\t\t\t'Header Menu Page Link Hover/Current Page' => '/* Header Menu Page Link Hover/Current Page */' . \"\\n\" . '.fl-page-nav-wrap .navbar-nav > li > a:hover,' . \"\\n\" . '.fl-page-nav-wrap .navbar-nav > li.current-menu-item > a',\n\t\t\t'Header Menu Sub-Menu' => '/* Header Menu Sub-Menu */' . \"\\n\" . '.fl-page-nav ul.sub-menu',\n\t\t\t'Header Menu Sub-Menu Link' => '/* Header Menu Sub-Menu Link */' . \"\\n\" . '.fl-page-nav ul.sub-menu li a',\n\t\t\t'Header Menu Sub-Menu Link Hover' => '/* Header Menu Sub-Menu Link Hover */' . \"\\n\" . '.fl-page-nav ul.sub-menu li a:hover',\n\t\t\t'Header Menu Right Search' => '/* Header Menu Right Search */' . \"\\n\" . '.fl-page-nav-search',\n\t\t\t'Header Menu Right Search Form' => '/* Header Menu Right Search Form */' . \"\\n\" . '.fl-page-nav-search form',\n\t\t\t'Header Menu Right Search Input' => '/* Header Menu Right Search Input */' . \"\\n\" . '.fl-page-nav-search input'\n\t\t),\n\t\t'content_elements' => array(\n\t\t\t'Page Content' => '/* Page Content */' . \"\\n\" . '.fl-page-content',\n\t\t\t'Content Container' => '/* Content Container */' . \"\\n\" . '.fl-page-content .container',\n\t\t\t'Content' => '/* Content */' . \"\\n\" . '.fl-content',\n\t\t\t'Content Article' => '/* Content Article */' . \"\\n\" . '.fl-post',\n\t\t\t'Content Article Post' => '/* Content Article Post */' . \"\\n\" . '.fl-post.post',\n\t\t\t'Content Article Page' => '/* Content Article Page */' . \"\\n\" . '.fl-post.page'\n\t\t),\n\t\t'post_header_elements' => array(\n\t\t\t'Post Header' => '/* Post Header */' . \"\\n\" . '.fl-post-header',\n\t\t\t'Post Title' => '/* Post Title */' . \"\\n\" . '.fl-post-title',\n\t\t\t'Post Title Link' => '/* Post Title Link */' . \"\\n\" . '.fl-post-title a',\n\t\t\t'Post Title Link Hover' => '/* Post Title Link Hover */' . \"\\n\" . '.fl-post-title a:hover, .fl-post-title a:focus',\n\t\t\t'Post Meta Top' => '/* Post Meta Top */' . \"\\n\" . '.fl-post-meta-top',\n\t\t\t'Post Meta Top Link' => '/* Post Meta Top Link */' . \"\\n\" . '.fl-post-meta-top a',\n\t\t\t'Post Meta Top Link Hover' => '/* Post Meta Top Link Hover */' . \"\\n\" . '.fl-post-meta-top a:hover, .fl-post-meta-top a:focus'\n\t\t),\n\t\t'post_content_elements' => array(\n\t\t\t'Post Content' => '/* Post Content */' . \"\\n\" . '.fl-post-content',\n\t\t\t'Content Paragraph' => '/* Content Paragraph */' . \"\\n\" . '.fl-post-content p',\n\t\t\t'Content Lists' => '/* Content Lists */' . \"\\n\" . '.fl-post-content ul li, .fl-post-content ol li',\n\t\t\t'Content Link' => '/* Content Link */' . \"\\n\" . '.fl-post-content a',\n\t\t\t'Content Link Hover' => '/* Content Link Hover */' . \"\\n\" . '.fl-post-content a:hover, .fl-post-content a:focus',\n\t\t\t'Content Blockquote' => '/* Content Blockquote */' . \"\\n\" . '.fl-post-content blockquote',\n\t\t\t'Content Blockquote Paragraph' => '/* Content Blockquote Paragraph */' . \"\\n\" . '.fl-post-content blockquote p',\n\t\t\t'Content Blockquote Link' => '/* Content Blockquote Link */' . \"\\n\" . '.fl-post-content blockquote a',\n\t\t\t'Content Blockquote Link Hover' => '/* Content Blockquote Link Hover */' . \"\\n\" . '.fl-post-content blockquote a:hover, .fl-post-content blockquote a:focus',\n\t\t\t'Content Post H1' => '/* Content Post H1 */' . \"\\n\" . '.fl-post-content h1',\n\t\t\t'Content Post H2' => '/* Content Post H2 */' . \"\\n\" . '.fl-post-content h2',\n\t\t\t'Content Post H3' => '/* Content Post H3 */' . \"\\n\" . '.fl-post-content h3',\n\t\t\t'Content Post H4' => '/* Content Post H4 */' . \"\\n\" . '.fl-post-content h4',\n\t\t\t'Content Post H5' => '/* Content Post H5 */' . \"\\n\" . '.fl-post-content h5',\n\t\t\t'Content Post H6' => '/* Content Post H6 */' . \"\\n\" . '.fl-post-content h6',\n\t\t\t'Post Meta Bottom' => '/* Post Meta Bottom */' . \"\\n\" . '.fl-post-meta-bottom',\n\t\t\t'Post Meta Bottom Link' => '/* Post Meta Bottom Link */' . \"\\n\" . '.fl-post-meta-bottom a',\n\t\t\t'Post Meta Bottom Link Hover' => '/* Post Meta Bottom Link Hover */' . \"\\n\" . '.fl-post-meta-bottom a:hover, .fl-post-meta-bottom a:focus',\n\t\t\t'Post Navigation' => '/* Post Navigation */' . \"\\n\" . '.fl-post-page-nav',\n\t\t\t'Post Navigation Link' => '/* Post Navigation Link */' . \"\\n\" . '.fl-post-page-nav a',\n\t\t\t'Post Navigation Link Hover' => '/* Post Navigation Link Hover */' . \"\\n\" . '.fl-post-page-nav a:hover, .fl-post-page-nav a:focus'\n\t\t),\n\t\t'post_meta_bottom_elements' => array(\n\t\t\t'Post Meta Bottom' => '/* Post Meta Bottom */' . \"\\n\" . '.fl-post-meta-bottom',\n\t\t\t'Post Meta Bottom Link' => '/* Post Meta Bottom Link */' . \"\\n\" . '.fl-post-meta-bottom a',\n\t\t\t'Post Meta Bottom Link Hover' => '/* Post Meta Bottom Link Hover */' . \"\\n\" . '.fl-post-meta-bottom a:hover, .fl-post-meta-bottom a:focus'\n\t\t),\n\t\t'sidebar_elements' => array(\n\t\t\t'Sidebar' => '/* Sidebar */' . \"\\n\" . '.fl-sidebar',\n\t\t\t'Sidebar Right' => '/* Sidebar Right */' . \"\\n\" . '.fl-sidebar-right',\n\t\t\t'Sidebar Left' => '/* Sidebar Left */' . \"\\n\" . '.fl-sidebar-left',\n\t\t\t'Sidebar Heading' => '/* Sidebar Heading */' . \"\\n\" . '.fl-sidebar .fl-widget-title',\n\t\t\t'Sidebar Widget' => '/* Sidebar Widget */' . \"\\n\" . '.fl-sidebar .fl-widget',\n\t\t\t'Sidebar Link' => '/* Sidebar Link */' . \"\\n\" . '.fl-sidebar a',\n\t\t\t'Sidebar Link Hover' => '/* Sidebar Link Hover */' . \"\\n\" . '.fl-sidebar a:hover, .fl-sidebar a:focus',\n\t\t\t'Sidebar UL/OL' => '/* Sidebar UL/OL */' . \"\\n\" . '.fl-sidebar ul, .fl-sidebar ol',\n\t\t\t'Sidebar UL LI' => '/* Sidebar UL LI */' . \"\\n\" . '.fl-sidebar ul li'\n\t\t),\n\t\t'comments_elements' => array(\n\t\t\t'Comments' => '/* Comments */' . \"\\n\" . '.fl-comments',\n\t\t\t'Comment List' => '/* Comment List */' . \"\\n\" . '.fl-comments-list',\n\t\t\t'Comments Title' => '/* Comments Title */' . \"\\n\" . '.fl-comments-list-title',\n\t\t\t'Comment Meta' => '/* Comment Meta */' . \"\\n\" . '.comment-meta',\n\t\t\t'Comment Avatar' => '/* Comment Avatar */' . \"\\n\" . '.comment-avatar',\n\t\t\t'Comment Author Link' => '/* Comment Author Link */' . \"\\n\" . '.comment-author-link',\n\t\t\t'Comment Date' => '/* Comment Date */' . \"\\n\" . '.comment-date',\n\t\t\t'Comment Thread Even' => '/* Comment Thread Even */' . \"\\n\" . '.fl-comments-list .even',\n\t\t\t'Comment Thread Odd' => '/* Comment Thread Odd */' . \"\\n\" . '.fl-comments-list .odd'\n\t\t),\n\t\t'comment_respond_elements' => array(\n\t\t\t'Comment Respond' => '/* Comment Respond */' . \"\\n\" . '.comment-respond',\n\t\t\t'Comment Reply Title' => '/* Comment Reply Title */' . \"\\n\" . '.comment-reply-title',\n\t\t\t'Author/Email/URL Form' => '/* Author/Email/URL Form */' . \"\\n\" . '.comment-respond input[type=text]',\n\t\t\t'Comment Form' => '/* Comment Form */' . \"\\n\" . '.comment-respond textarea',\n\t\t\t'Comment Submit Button' => '/* Comment Submit Button */' . \"\\n\" . '.comment-respond input[type=submit]',\n\t\t\t'Comment Submit Button Hover' => '/* Comment Submit Button Hover */' . \"\\n\" . '.comment-respond input[type=submit]:hover'\n\t\t),\n\t\t'footer_elements' => array(\n\t\t\t'Footer Wrap' => '/* Footer Wrap */' . \"\\n\" . '.fl-page-footer-wrap',\n\t\t\t'Footer' => '/* Footer */' . \"\\n\" . '.fl-page-footer',\n\t\t\t'Footer Container' => '/* Footer Container */' . \"\\n\" . '.fl-page-footer-container',\n\t\t\t'Footer Text' => '/* Footer Text */' . \"\\n\" . '.fl-page-footer *, .fl-page-footer h1, .fl-page-footer h2, .fl-page-footer h3, .fl-page-footer h4, .fl-page-footer h5, .fl-page-footer h6',\n\t\t\t'Footer Link' => '/* Footer Link */' . \"\\n\" . '.fl-page-footer a, .fl-page-footer a *, .fl-page-footer a.fa',\n\t\t\t'Footer Link Hover' => '/* Footer Link Hover */' . \"\\n\" . '.fl-page-footer a:hover, .fl-page-footer a:focus, .fl-page-footer a:hover *, .fl-page-footer a:focus *, .fl-page-footer a.fa:hover, .fl-page-footer a.fa:focus',\n\t\t\t'Footer Menu' => '/* Footer Menu */' . \"\\n\" . '.fl-page-footer-nav',\n\t\t\t'Footer Menu Page Link' => '/* Footer Menu Page Link */' . \"\\n\" . '.fl-page-footer .navbar-nav > li > a',\n\t\t\t'Footer Menu Page Link Hover' => '/* Footer Menu Page Link Hover */' . \"\\n\" . '.fl-page-footer .navbar-nav > li > a:hover, .fl-page-footer .navbar-nav > li > a:focus',\n\t\t\t'Footer Menu Current Page Link' => '/* Footer Menu Current Page Link */' . \"\\n\" . '.fl-page-footer .navbar-nav > li.current-menu-item > a',\n\t\t\t'Footer Menu Page Link Hover/Current Page' => '/* Footer Menu Page Link Hover/Current Page */' . \"\\n\" . '.fl-page-footer .navbar-nav > li > a:hover, .fl-page-footer .navbar-nav > li > a:focus,' . \"\\n\" . '.fl-page-footer .navbar-nav > li.current-menu-item > a'\n\t\t)\n\t);\n\t\n\treturn $elements_array;\n\t\n}",
"function meta_html($post)\n {\n $view = new Xby2BaseView(get_post_meta($post->ID));\n $view->addInput('imageSelect', 'author-image-url', 'Author Image Url: ', 'imageUrl', 'large-text');\n $view->addInput('text', 'author-title', 'Author Title: ', 'title', 'regular-text');\n $view->displayForm();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
php7: public static function query_table_schema_from_database($table):Part | public static function query_table_schema_from_database($table)
{
//odbc doesn't have any way to retrieve table schema (as far as I know)
//update: there should be a way, but you need admin rights (to be continued later...)
return new Part();
} | [
"abstract protected function loadSchemaFromDb($table);",
"public function getCreateTableQuery($table);",
"public function getCustomTableSchema($table) {\n\n $sql = \"SELECT schema FROM {tripal_custom_tables} WHERE table_name = :table_name\";\n $results = $this->connection->query($sql, [':table_name' => $table]);\n $custom = $results->fetchObject();\n if (!$custom) {\n return FALSE;\n }\n else {\n return unserialize($custom->schema);\n }\n }",
"public function table(string $table): Query;",
"public function discoverTableScheme($table){}",
"private function get_schema() {\n\n // sql to show schema of table\n $sql = \"SHOW COLUMNS FROM \".$this->_table;\n $q = $this->_pdo->prepare($sql);\n $q->execute();\n $res = $q->fetchAll();\n\n //print_r($res); die();\n //return schema of table\n return $res;\n\n }",
"abstract public function get_table_definition_query($table_name);",
"public function table_columns($table)\n\t{\n\t\tif ($table instanceof Database_Identifier)\n\t\t{\n\t\t\t$schema = $table->namespace;\n\t\t\t$table = $table->name;\n\t\t}\n\t\telseif (is_array($table))\n\t\t{\n\t\t\t$schema = $table;\n\t\t\t$table = array_pop($schema);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$schema = explode('.', $table);\n\t\t\t$table = array_pop($schema);\n\t\t}\n\n\t\tif (empty($schema))\n\t\t{\n\t\t\t$schema = $this->_config['connection']['database'];\n\t\t}\n\n\t\t$result =\n\t\t\t'SELECT column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, numeric_precision, numeric_scale, collation_name,'\n\t\t\t.' column_type, column_key, extra, privileges, column_comment'\n\t\t\t.' FROM information_schema.columns'\n\t\t\t.' WHERE table_schema = '.$this->quote_literal($schema).' AND table_name = '.$this->quote_literal($this->table_prefix().$table);\n\n\t\t$result = $this->execute_query($result)->as_array('column_name');\n\n\t\tforeach ($result as & $column)\n\t\t{\n\t\t\tif ($column['data_type'] === 'enum' OR $column['data_type'] === 'set')\n\t\t\t{\n\t\t\t\t$open = strpos($column['column_type'], '(');\n\t\t\t\t$close = strpos($column['column_type'], ')', $open);\n\n\t\t\t\t// Text between parentheses without single quotes\n\t\t\t\t$column['options'] = explode(\"','\", substr($column['column_type'], $open + 2, $close - 3 - $open));\n\t\t\t}\n\t\t\telseif (strlen($column['column_type']) > 8)\n\t\t\t{\n\t\t\t\t// Test for UNSIGNED or UNSIGNED ZEROFILL\n\t\t\t\tif (substr_compare($column['column_type'], 'unsigned', -8) === 0\n\t\t\t\t\tOR substr_compare($column['column_type'], 'unsigned', -17, 8) === 0)\n\t\t\t\t{\n\t\t\t\t\t$column['data_type'] .= ' unsigned';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}",
"public static function query(): DBTable\n {\n return DB::table(static::$schema);\n }",
"function sq_get_schema() {\r\n //pobiera liste tabel\r\n /**\r\n [35] => Array\r\n (\r\n [type] => table\r\n [name] => alu_vc12\r\n [tbl_name] => alu_vc12\r\n [rootpage] => 30\r\n [sql] => CREATE TABLE [alu_vc12] ([type] VARCHAR, [name] VARCHAR, [r\r\noute] VARCHAR, [no] INTEGER, [endpoint] VARCHAR, [r] VARCHAR, [s] VARCHAR, [b] V\r\nARCHAR, [p] VARCHAR, [c] VARCHAR, [au4] INT, [vc3] INT, [vc2] INT, [vc1] INT, [k\r\nlm] VARCHAR, [alu_vc] VARCHAR, [alu_loc] VARCHAR, [raw] VARCHAR)\r\n )\r\n */\r\n $q=\"select * from sqlite_master\";\r\n\t$w=sq_query($q);\r\n\t$a=array();\r\n\tforeach ($w as $w1) {\r\n if (!isset ($a[$w1['type']])) $a[$w1['type']]=array();\r\n $a[$w1['type']][$w1['tbl_name']]=$w1;\r\n\t}\r\n\treturn $a;\r\n }",
"abstract public function getFieldsQuery($table);",
"abstract public function checkCreateTable($table);",
"public function queryTableInformation($table) {\n // Generate a key to reference this table's information on.\n $key = $this->connection->prefixTables('{' . $table . '}');\n if (!strpos($key, '.')) {\n $key = 'public.' . $key;\n }\n\n if (!isset($this->tableInformation[$key])) {\n // Split the key into schema and table for querying.\n list($schema, $table_name) = explode('.', $key);\n $table_information = (object) array(\n 'blob_fields' => array(),\n 'sequences' => array(),\n );\n // Don't use {} around information_schema.columns table.\n $result = $this->connection->query(\"SELECT column_name, data_type, column_default FROM information_schema.columns WHERE table_schema = :schema AND table_name = :table AND (data_type = 'bytea' OR (numeric_precision IS NOT NULL AND column_default LIKE :default))\", array(\n ':schema' => $schema,\n ':table' => $table_name,\n ':default' => '%nextval%',\n ));\n foreach ($result as $column) {\n if ($column->data_type == 'bytea') {\n $table_information->blob_fields[$column->column_name] = TRUE;\n }\n elseif (preg_match(\"/nextval\\('([^']+)'/\", $column->column_default, $matches)) {\n // We must know of any sequences in the table structure to help us\n // return the last insert id. If there is more than 1 sequences the\n // first one (index 0 of the sequences array) will be used.\n $table_information->sequences[] = $matches[1];\n $table_information->serial_fields[] = $column->column_name;\n }\n }\n $this->tableInformation[$key] = $table_information;\n }\n return $this->tableInformation[$key];\n }",
"function get_table_structure($table)\n {\n global $wpdb;\n\n $table_structure = false;\n\n if ($this->table_exists($table)) {\n $table_structure = $wpdb->get_results('DESCRIBE ' . $this->table_helper->backquote($table));\n }\n\n if (!$table_structure) {\n $this->error_log->setError(sprintf(__('Failed to retrieve table structure for table \\'%s\\', please ensure your database is online. (#125)', 'wp-migrate-db'), $table));\n\n return false;\n }\n\n return $table_structure;\n }",
"abstract protected function structure(Blueprint $table) ;",
"public function readSQL($tablename)\n\t{\n\t\t$keyData = $this->db->query('SHOW CREATE TABLE '.$tablename)->getResultArray();\n\n\t\t$tempFkArray = $this->_buildForeignKeys($keyData);\n\t\t$tempUkArray = $this->_buildUniqueKeys($keyData);\n\t\t$tempKeyArray = $this->_buildKeys($keyData);\n\t\t$tempPkArray = $this->_buildPrimaryKeys($keyData);\n\t\t\n\t\t$columns = $this->db->query('SHOW COLUMNS FROM '.$tablename)->getResultArray();\n\n if(count($columns) > 0)\n {\t\n \t$schemaContent = '';\n \tforeach($columns as $col)\n \t{\n\t\t \t\t\n \t\tif (isset($tempFkArray[$col['Field']])) \n \t\t{\n \t\t\t$col['_foreign_keys'][] = $tempFkArray[$col['Field']];\n \t\t\tunset($tempFkArray[$col['Field']]);\n \t\t}\n\n \t\tif (isset($tempPkArray[$col['Field']])) \n \t\t{\n \t\t\t$col['_primary_keys'][] = $tempPkArray[$col['Field']];\n \t\t\tunset($tempPkArray[$col['Field']]);\n \t\t}\n\n \t\tif (isset($tempUkArray[$col['Field']])) \n \t\t{\n \t\t\t$col['_unique_keys'][] = $tempUkArray[$col['Field']];\n \t\t\tunset($tempUkArray[$col['Field']]);\n \t\t}\n\n \t\tif (isset($tempKeyArray[$col['Field']])) \n \t\t{\n \t\t\t$col['_keys'][] = $tempKeyArray[$col['Field']];\n \t\t\tunset($tempKeyArray[$col['Field']]);\n\n \t\t}\n \t\t$schemaContent.= $this->_buildRow($col); // Output 'password' = array('rules' => 'required|_string(20)|minLen(6)');\n \t}\n\n \treturn $schemaContent;\n }\n\n return false;\n\t}",
"abstract public function getTableInfo($table,&$temp_schemas);",
"function find_all($table)\n{\n global $db;\n if (tableExists($table)) {\n return find_by_sql(\"SELECT * FROM \" . $db->escape($table));\n }\n}",
"function find_all($table)\n{\n global $db;\n if (tableExists($table)) {\n return find_by_sql(\"SELECT * FROM \" . $db->escape($table));\n }\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns LanguageSearch model name. | protected function getSearchModelName():string
{
return LanguageSearch::class;
} | [
"private static function modelName() : string\n {\n $name = strtolower(static::class);\n if ($pos = strrchr($name, '\\\\')) {\n $name = strtolower(substr($pos, 1));\n }\n return str_replace('search', '', $name);\n }",
"public function modelName() {\n return self::$_name;\n }",
"public function getTranslationModel(): string\n {\n return property_exists($this, 'translationModel')\n ? $this->translationModel\n : get_class($this) . $this->getTranslationModelSuffix();\n }",
"public function getTranslationModelName(): string\n {\n return rtrim(app('locale')->translationNamespace(), '\\\\')\n . '\\\\' . class_basename(get_called_class()) . 'Translation';\n }",
"public function getTranslationModelName()\n\t{\n\t\treturn $this->translationModel?: $this->getDefaultTranslationName();\n\t}",
"public function getTranslationModelName()\n {\n return $this->translationModel ?: $this->getTranslationModelNameDefault();\n }",
"protected function getModelName()\n {\n $fullyQualifiedClassName = substr(static::class, 0, -10); // \\App\\Repositories\\{name}Repository => \\App\\Repositories\\{name}\n $nameArray = explode('\\\\', $fullyQualifiedClassName); // [App, Repositories, {name}]\n return array_pop($nameArray); // {name}\n }",
"public function getModelSingular()\n {\n return lcfirst($this->getModelSimpleName());\n }",
"protected function getModelName()\n {\n if (is_null($this->modelName)) {\n $this->modelName = str_replace('Validator', '', get_class($this));\n }\n return $this->modelName;\n }",
"public static function getModelName()\n {\n return (new ReflectionClass(get_called_class()))->getShortName();\n }",
"public function getTranslationModelName()\n {\n if ($this->isTranslatableModel()) {\n return get_class($this).$this->getTranslationModelSuffix();\n }\n\n return get_class();\n }",
"public function __getNameModel()\n {\n }",
"public function getModelNameCamelized()\n {\n return Inflector::camelize($this->modelName);\n }",
"public function getTranslationModelName()\n {\n return $this->translationModel ? get_class(app($this->translationModel)) : null;\n }",
"public function getModelBaseName()\n {\n return StringHelper::basename($this->modelClass);\n }",
"public function getLanguageName();",
"protected function getShortModel(): string\n {\n return class_basename($this->option('model'));\n }",
"public function getCurrentModelTitle()\n {\n return isset($this->oModel->name) ? $this->oModel->name : '';\n }",
"protected function getSearchModelName(): string\n {\n return RoleSearch::class;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows the fortify enabled features | protected function showFortifyFeatures()
{
$this->config->set('fortify', require config_path('fortify.php'));
$this->comment('The following features are enabled in config/fortify.php:');
$features = collect(config('fortify.features'))->map(function ($feature) {
return ['feature' => $feature];
})->toArray();
$this->table(['Fortify features enabled'], $features);
if (in_array('two-factor-authentication', config('fortify.features'))
|| $this->option('migrations') || $this->option('all')) {
$this->comment('To publish and load new migrations run:');
$this->info(' `php artisan fortify:publish -migrations` and');
$this->info(' `php artisan migrate` and');
$this->info(' add the `TwoFactorAuthenticatable` trait to the User model');
}
} | [
"function DisplayFeatures()\r\n\t{\r\n\t\treturn true;\r\n\t}",
"public function show_feature(){\n\t\t\n\t\t//Connection establishment, processing of data and response from REST API\n\t\t$path=base_url();\n\t\t$url = $path.'api/settings_api/all_feature';\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response=json_decode($response_json, true);\n\t\treturn $response;\t\t\n\t\t\n\t}",
"private static function get_enabled_features()\n {\n }",
"function fortune_options() {\n include_once(SM_PATH . 'plugins/fortune/functions.php');\n fortune_function_options();\n}",
"public function getRequiredFeatures();",
"public function get_supported_features();",
"public function view_features(Request $request) {\r\n\r\n\t\t$view_features = Advantages_features::where('advantage_id',$request->id)->get();\r\n\t\t$advantage_id = $request->id;\r\n\t\t$advantages = Advantages::where('id',$request->id)->first();\r\n\t\t// echo '<pre>',print_r($view_features),'</pre>';die;\r\n\t\treturn view('adminpanel.view_features', compact('view_features','advantage_id','advantages'));\r\n\t}",
"public function allFeatures() {\n\t\treturn view('avo-pages.all-features');\n\t}",
"function gucci_features() {\n\t// Support title tag\n\tadd_theme_support('title-tag');\n\t// Support featured images\n\tadd_theme_support('post-thumbnails');\n}",
"function themify_load_theme_features() {\n\t/* load megamenu feature */\n\tif ( current_theme_supports( 'themify-mega-menu' ) ) {\n\t\tinclude( THEMIFY_DIR . '/megamenu/class-mega-menu.php' );\n\t}\n\n\tif ( current_theme_supports( 'themify-toggle-dropdown' ) ) {\n\t\tinclude( THEMIFY_DIR . '/class-themify-menu-toggle-dropdown.php' );\n\t\tThemify_Menu_Toggle_Dropdown::get_instance();\n\t}\n\n\t/* check if Google fonts are disabled */\n\tif ( ! defined( 'THEMIFY_GOOGLE_FONTS' ) && themify_get( 'setting-webfonts_list',false,true ) === 'disabled' ) {\n\t\tdefine( 'THEMIFY_GOOGLE_FONTS', false );\n\t}\n\n}",
"public function getFeatures () { }",
"public function get_supported_features()\n {\n }",
"function hook_hosting_feature() {\n // From hosting_example_hosting_feature().\n $features['example'] = array(\n // Title to display in form.\n 'title' => t('Example feature'),\n // Description.\n 'description' => t('Example feature documenting how to create your own extensions.'),\n // Initial status ( HOSTING_FEATURE_DISABLED, HOSTING_FEATURE_ENABLED, HOSTING_FEATURE_REQUIRED )\n 'status' => HOSTING_FEATURE_DISABLED,\n // Module to enable/disable alongside feature.\n 'module' => 'hosting_example',\n // Callback functions to execute on enabling or disabling this feature.\n 'enable' => 'hosting_example_feature_enable_callback',\n 'disable' => 'hosting_example_feature_disable_callback',\n // Associate with a specific node type.\n // 'node' => 'nodetype',\n // Which group to display in ( null , experimental , required )\n 'group' => 'experimental',\n );\n return $features;\n}",
"public function X1DisplaySpecialFeatures($edit=true,$event=0);",
"public static function UseAllFeatures() {\n\t\t\t\n\t\t\t$success = OnePanelDebug::Track( 'Activating all features.' );\n\t\t\t\n\t\t\t// This function has a massive scope for breakage, be careful!\n\t\t\tself::$features_enabled = array(\n\t\t\t\t'PostTitleLimitFeature',\n\t\t\t\t'ContentControlFeature', // Theres a bug if you comment this out it stays put TODO\n\t\t\t\t'FeaturedVideoFeature',\n\t\t\t\t'FeedBurnerToggle',\n\t\t\t\t'HotConversationToggle',\n\t\t\t\t'AuthorProfileLinkFeature',\n\t\t\t\t'RSSLinkFeature',\n\t\t\t\t'RelatedArticlesFeature',\n\t\t\t\t'SocialBookmarksFeature',\n\t\t\t\t'TagsFeature',\n\t\t\t\t'PostInfoFeature',\n\t\t\t\t'AuthorGravatarFeature',\n\t\t\t\t'FriendlySearchUrlFeature',\n\t\t\t\t'SkinFeatureSwitcher',\n\t\t\t\t'ThumbnailsToggle',\n\t\t\t\t'MenuLinksFeature',\n\t\t\t\t'StatsFeature',\n\t\t\t\t'HomePageLayoutFeature', // TODO should be enabled by default if more than one HPL is present.\n\t\t\t\t'LocalizationTool'\n\t\t\t);\n\t\t\t\n\t\t\t$success->Affirm();\n\t\t\t\n\t\t}",
"public function get_theme_features() {\n\t\t\t$this->theme_features = array(\n\t\t\t\t'prepend_post',\n\t\t\t\t'admin_test_menu',\n\t\t\t);\n\t\t}",
"function register_feature_support() {\n\t\t// Register the product feature\n\t\t$slug = 'invoices';\n\t\t$description = 'Registers the product features assoiciated with Invoices';\n\t\tit_exchange_register_product_feature( $slug, $description );\n\t}",
"function DisplayFeatures()\r\n\t{\r\n\t\t$this->DisplayStructFeatures ();\r\n\t\t$this->DisplayContFeatures ();\r\n\t\t\r\n\t\treturn $this->m_category->GetID ();\r\n\t}",
"public static function show_feature_posts()\n\t{\n\t\treturn majale_redux_customize::show_feature_posts_on();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case for applicationIdStageNextSentPost POST: move application forward to stage sent. | public function testApplicationIdStageNextSentPost()
{
} | [
"public function testApplicationIdStageNextInterviewPost()\n {\n }",
"public function applicationIdStageNextSentPost($body, $id)\n {\n list($response) = $this->applicationIdStageNextSentPostWithHttpInfo($body, $id);\n return $response;\n }",
"public function submissionPostAction()\n {\n $data = $this->getRequest()->getPost();\n try {\n $isError = false;\n if (!empty($data)) {\n Mage::getSingleton('adminhtml/session')->setFormSubmissionData($this->_filterFormDataForSession($data));\n }\n /** @var $app Mage_XmlConnect_Model_Application */\n $app = $this->_initApp('key');\n $app->loadSubmit();\n $newAppData = $this->_processUploadedFiles($app->getData(), true);\n if (!empty($newAppData)) {\n $app->setData(Mage::helper('xmlconnect')->arrayMergeRecursive($app->getData(), $newAppData));\n }\n\n $params = $app->prepareSubmitParams($data);\n $errors = $app->validateSubmit($params);\n\n if ($errors !== true) {\n foreach ($errors as $err) {\n $this->_getSession()->addError($err);\n }\n $isError = true;\n }\n if (!$isError) {\n $this->_processPostRequest();\n $history = Mage::getModel('xmlconnect/history');\n $history->setData(array(\n 'params' => $params,\n 'application_id' => $app->getId(),\n 'created_at' => Mage::getModel('core/date')->date(),\n 'store_id' => $app->getStoreId(),\n 'title' => isset($params['title']) ? $params['title'] : '',\n 'name' => $app->getName(),\n 'code' => $app->getCode(),\n 'activation_key' => isset($params['resubmission_activation_key'])\n ? $params['resubmission_activation_key'] : $params['key'],\n ));\n $history->save();\n $app->getResource()->updateApplicationStatus(\n $app->getId(), Mage_XmlConnect_Model_Application::APP_STATUS_SUCCESS\n );\n $this->_getSession()->addSuccess($this->__('App has been submitted.'));\n $this->_clearSessionData();\n $this->_redirect('*/*/edit', array('application_id' => $app->getId()));\n } else {\n Mage::getSingleton('adminhtml/session')->setLoadSessionFlag(true);\n $this->_redirect('*/*/submission', array('application_id' => $app->getId()));\n }\n } catch (Mage_Core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n if (isset($app)) {\n Mage::getSingleton('adminhtml/session')->setLoadSessionFlag(true);\n $this->_redirect('*/*/submission', array('application_id' => $app->getId()));\n } else {\n $this->_redirect('*/*/');\n }\n } catch (Exception $e) {\n $this->_getSession()->addException($e, $this->__('Can\\'t submit application.'));\n Mage::logException($e);\n if (isset($app)) {\n Mage::getSingleton('adminhtml/session')->setLoadSessionFlag(true);\n $this->_redirect('*/*/submission', array('application_id' => $app->getId()));\n } else {\n $this->_redirect('*/*/');\n }\n }\n }",
"public function testCreateStageUsingPost()\n {\n }",
"protected function nextStage($stage) \n\t{\n\n\t\t$workflowId = $this->workflowId;\n\n\t\t$sql = \"SELECT object_id FROM docmgr.dm_workflow_object WHERE workflow_id='$workflowId'\";\n\t\t$objarr = $this->DB->fetch($sql,1);\n\n\t\t$this->DB->begin();\n\t\t\n\t //get our list of routes assigned to this object\n\t $sql = \"SELECT * FROM docmgr.dm_workflow_route WHERE workflow_id='$workflowId' AND sort_order='$stage';\";\n\t $list = $this->DB->fetch($sql);\n\n\t\tif ($list[\"count\"]==0) \n\t\t{\n\n\t\t //log that it's finished\n\t foreach ($objarr[\"object_id\"] AS $obj) logEvent('OBJ_WORKFLOW_END',$obj);\n\n\t\t //see if we are supposed to notify the user this is complete\n\t\t $this->notifyComplete();\n\n\t\t $sql = \"UPDATE docmgr.dm_workflow SET status='complete',date_complete='\".date(\"Y-m-d H:i:s\").\"' WHERE id='$workflowId';\";\n\t\t $this->DB->query($sql);\n\n\t\t\t\t//clear all shares\n\t\t\t\t$this->cleanupPermissions();\n\t\n\t } \n\t else \n\t {\n\n\t \t//starting a new one\n\t \tif ($stage==\"0\") foreach ($objarr[\"object_id\"] AS $obj) logEvent('OBJ_WORKFLOW_BEGIN',$obj);\n\n\t \t$sql = \"SELECT name FROM docmgr.dm_workflow WHERE id='$workflowId'\";\n\t \t$info = $this->DB->single($sql);\n\n\t \t //make sure our primary status is still set to pending since we are not done\n\t \t $sql = \"Update docmgr.dm_workflow SET status='pending' WHERE id='$workflowId';\";\n\t\t\t$this->DB->query($sql);\n\t\t\t\n\t\t\t$accounts = array();\t\n\t\t\t\n\t \tfor ($i=0;$i<$list[\"count\"];$i++) \n\t \t{\n\n\t\t\t\t$sql = \"UPDATE docmgr.dm_workflow_route SET status='pending' WHERE id='\".$list[$i][\"id\"].\"';\";\n\t\t\t\t$this->DB->query($sql);\n\n\t\t\t\t//setup collections for sharing\n\t\t\t\t$this->setupPermissions($list[$i][\"task_type\"],$list[$i][\"account_id\"]);\n\n\t\t\t\t//notify the user a task was assigned\n\t\t\t\t$this->notifyTask($list[$i]);\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\t\n\n\t\t$this->DB->end();\n\t\t\n\t\t$err = $this->DB->error();\n\t\tif ($err) $this->throwError($err);\n\t\t\t \n\t}",
"public function testPostingAPIMoveFbsPostingToArbitration()\n {\n\n }",
"public function testResumeFeedsUsingPOST()\n\t\t{\n\n\t\t}",
"public function applicationIdStageNextSentPostWithHttpInfo($body, $id)\n {\n $returnType = '\\Swagger\\Client\\Model\\InlineResponse200';\n $request = $this->applicationIdStageNextSentPostRequest($body, $id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Swagger\\Client\\Model\\InlineResponse200',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function testPostOutboundSequences()\n {\n }",
"function post() {\n //\n //Aler the user if you need to unpost future invoces, relative\n //to the current one????\n //\n //Post all the items in the natural order\n foreach ($this->record->items as $item) {\n //\n //Post this item\n $item->post();\n }\n //\n //Done\n echo \"Ok\";\n }",
"public function next_post()\n {\n }",
"public function postbackTask()\n\t{\n\t\t// some payment providers (Dummy, PayPal will do the postback, need to call the plugins and handle appropriately)\n\n\t\t$test = false;\n\t\t// TESTING ***********************\n\t\tif ($test)\n\t\t{\n\t\t\t$postBackTransactionId = 116;\n\t\t}\n\n\t\t$params = Component::params(Request::getCmd('option'));\n\n\t\tif (empty($_POST) && !$test)\n\t\t{\n\t\t\tApp::abort(404, Lang::txt('Page not found'));\n\t\t}\n\n\t\t// Initialize logger\n\t\t$logger = new \\CartMessenger('Payment Postback');\n\n\t\t// Get the plugins working\n\t\t$pay = Event::trigger('cart.onPostback', array($_POST, User::getRoot()));\n\n\t\tforeach ($pay as $response)\n\t\t{\n\t\t\tif ($response)\n\t\t\t{\n\t\t\t\tif ($response['status'] == 'ok')\n\t\t\t\t{\n\t\t\t\t\t$logger->setMessage($response['msg']);\n\t\t\t\t\t$logger->setPostback($_POST);\n\t\t\t\t\t$logger->log(\\LoggingLevel::INFO);\n\n\t\t\t\t\tif (empty($response['payment']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$response['payment'] = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->completeOrder($response['tInfo'], $response['payment']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$logger->setMessage($response['error']);\n\t\t\t\t\t$logger->setPostback($_POST);\n\t\t\t\t\t$logger->log(\\LoggingLevel::ERROR);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public function preNextStep() {}",
"private function processPostData(array $postData) {\n\t\t$action = 'next';\n\t\t\n\t\tif(isset($postData['step'])) {\n\t\t\t$this->currentStepIndex = $postData['step'];\n\t\t\t$currentStepIndex = $this->currentStepIndex;\n\t\t\t\n\t\t\t// Read the input-data into the step specifications\n\t\t\tforeach($postData as $key => $value) {\n\t\t\t\tif(strstr($key, 'input_') !== false) {\n\t\t\t\t\t$key = substr($key, 6);\n\t\t\t\t\t$this->setWizardDataForKey($key, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Determine if the user clicked next or back:\n\t\t\tif(isset($postData['back'])) $action = 'back';\n\n\t\t\t// Check input only if next was clicked:\n\t\t\t$inputOk = true;\n\t\t\tif($action === 'next') $inputOk = $this->isInputOk();\n\n\t\t\t// Execute \"after\" method if needed and update the\n\t\t\t// currentstep_index regarding the button which was clicked.\n\t\t\tif($inputOk === true) {\n\t\t\t\t$ok = true;\n\t\t\t\tif($action === 'next') {\n\t\t\t\t\t$ok = $this->steps[$currentStepIndex]->after($action);\n\t\t\t\t\tif($ok === true) $this->currentStepIndex++;\n\t\t\t\t} else if($action === 'back') {\n\t\t\t\t\t$this->currentStepIndex--;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$currentStepIndex = $this->currentStepIndex;\n\t\t\t}\n\t\t}\n\n\t\t// Execute \"before\" method if present:\n\t\t$this->getCurrentStep()->before($action);\n\t\t\n\t}",
"public function runRemoveAndRedirectStageMigrationBatch()\n {\n $migrationRecords = $this->getMigrationRecordsByType('remove_and_redirect_stage');\n foreach ($migrationRecords as $migrationRecord) {\n $tagFrom = get_tag($migrationRecord->term_taxonomy_id);\n $stageTo = get_term_by('slug', $migrationRecord->target_name, 'stages');\n $ageFrom = (int)get_field('age_range_from', 'stages_' . $stageTo->term_id);\n $ageTo = (int)get_field('age_range_to', 'stages_' . $stageTo->term_id);\n $postsToMerge = $this->getPostsFromTagAndStageForMerge($tagFrom->term_id, $migrationRecord->target_name);\n foreach ($postsToMerge as $postToMerge) {\n $this->addStageToPostAndUpdate($postToMerge, $stageTo, $ageFrom, $ageTo);\n }\n $this->removeAndRedirectTag($tagFrom, $stageTo);\n $update = $this->setRecordToProcessed($migrationRecord->id);\n if ($update === false) {\n $success = false;\n break;\n }\n }\n\n $this->batchResults = array(\n 'type_dom' => 'remove_and_redirect_stage',\n 'type_id' => 'startRemoveRedirectStageMigration',\n 'success' => $success ?: true,\n 'size' => count($migrationRecords),\n );\n }",
"public function checkNextStepFlowItem(){\n if($this->flowItem->getType() != FlowItems::TYPE_SMART_DELAY && !empty($this->flowItem->getNextStep())){\n $nextFlowItem = $this->em->getRepository(\"AppBundle:FlowItems\")->findOneBy(['flow'=>$this->flowItem->getFlow(), 'uuid'=>$this->flowItem->getNextStep()]);\n if($nextFlowItem instanceof FlowItems){\n $flowsItem = new FlowsItem($this->em, $nextFlowItem, $this->subscriber, $this->typePush, $this->user_ref, $this->tag, $this->messageType);\n $this->setResult($flowsItem->send());\n }\n }\n }",
"public function testOutboundPauseCampaignPost()\n {\n }",
"public function testWorkflowsPost()\n {\n }",
"public function apifunction_deal_MOVE_TO_SENT_STAGE($id = ''){\n\t\t$this->set_API_routine(__METHOD__);\n\t\t\n\t\tif(empty($id) || !is_numeric($id)){\n\t\t\t$this->errors[] = __METHOD__ . ' requires a deal id';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->deal_id = $id;\n\t\t\n\t\t//SET TOKEN\n\t\t$this->setPipeDriveAPIauth($this->api_master_token);\n\t\t\n\t\t//CURL API\n\t\t$this->curl_API();\n\t\t\n\t\tif(!empty($this->response_decoded->data)){\n\t\t\treturn $this->response_decoded->data;\n\t\t}\n\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DBGetAsKeyValueList("select xxx as k, xxx as v from xxx where id = '?' and xxx = '?' and xxx like '%?%' ",arg1,arg2,arg3); or DBGetAsKeyValueList("select xxx as k, xxx as v from xxx where id = '?' and xxx = '?' and xxx like '%?%' ",array(arg1,arg2,arg3); | public function DBGetAsKeyValueList($sql){
$count = substr_count($sql,"?");
$count2 = func_num_args() - 1;
$paramArray = null;
if($count2 == 1 && is_array(func_get_arg(1))){
// param passed as array
$paramArray = func_get_arg(1);
$count2 = count($paramArray);
if($count > $count2)
throw new Exception("sql:$sql need $count values but get $count2 !");
}else if($count > $count2){
throw new Exception("sql:$sql need $count values but get $count2 !");
}
$i = 0;
$index = 0;
for(;$i<$count;$i++){
$value = $paramArray === null ? func_get_arg($i+1) : $paramArray[$i];
$type = gettype($value);
switch($type){
case "boolean":
$value = ($value ? "true" : "false");
break;
case "integer":
case "NULL":
case "double":
break;
case "string":
$value = myStrEscape($value);
break;
default:
throw new Exception("unknown type:".$type." of value:".$value);
break;
}
$sql = str_replace_once($sql,"?",$value);
}
$this->dbSQL = $sql;
$this->DBExecute($this->dbSQL);
$res = array();
if (mysqli_num_rows($this->dbResult) > 0){
while($partRows = mysqli_fetch_array($this->dbResult,MYSQLI_ASSOC)){
$res[$partRows['k']] = $partRows['v'];
}
return $res;
}
return $res;
} | [
"function db_keyselect($sql_text)\n{\n\t$rec_tmp = db_query($sql_text);\t\n\t$ar = array();\n\twhile($tmp_array = db_query_next($rec_tmp))\n\t{\n\t\t$ar[$tmp_array[0]]=$tmp_array;\n\t}\n\tdb_free($rec_tmp);\n\t$ar = dnkeys2D($ar);\n\treturn $ar;\n}",
"public function DBGetAsMap($sql){\n\t\t\t$count = substr_count($sql,\"?\");\n\t\t\t$count2 = func_num_args() - 1;\n\t\t\t$paramArray = null;\n\t\t\tif($count2 == 1 && is_array(func_get_arg(1))){\n\t\t\t\t// param passed as array\n\t\t\t\t$paramArray = func_get_arg(1);\n\t\t\t\t$count2 = count($paramArray);\n\t\t\t\tif($count > $count2)\n\t\t\t\t\tthrow new Exception(\"sql:$sql need $count values but get $count2 !\");\n\t\t\t}else if($count > $count2){\n\t\t\t\tthrow new Exception(\"sql:$sql need $count values but get $count2 !\");\n\t\t\t}\n\t\t\t$i = 0;\n\t\t\t$index = 0;\n\t\t\tfor(;$i<$count;$i++){\n\t\t\t\t$value = $paramArray === null ? func_get_arg($i+1) : $paramArray[$i];\n\t\t\t\t$type = gettype($value);\n\t\t\t\tswitch($type){\n\t\t\t\t\tcase \"boolean\":\n\t\t\t\t\t\t$value = ($value ? \"true\" : \"false\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"integer\":\n\t\t\t\t\tcase \"NULL\":\n\t\t\t\t\tcase \"double\":\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t$value = myStrEscape($value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Exception(\"unknown type:\".$type.\" of value:\".$value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$sql = str_replace_once($sql,\"?\",$value);\n\t\t\t}\n\t\t\t$this->dbSQL = $sql;\n\t\t\t$this->DBExecute($this->dbSQL);\n\t\t\tif (mysqli_num_rows($this->dbResult) > 0){\n\t\t\t\twhile($partRows = mysqli_fetch_array($this->dbResult,MYSQLI_ASSOC)){\n\t\t\t\t\t$partSomeRows[] = $partRows;\n\t\t\t\t}\n\t\t\t\treturn $partSomeRows;\n\t\t\t}\n\t\t\treturn array();\n\t\t}",
"function get_by_multiple($where) {\n \n }",
"function dbPlaceHolders($values) {\r\n\t$data = array();\r\n\tforeach($values as $key => $value) {\r\n\t\tif(is_numeric($key))\r\n\t\t\t$data[] = '?';\r\n\t\telse\r\n\t\t\t$data[] = ':' . $key;\r\n\t}\r\n\treturn $data;\r\n}",
"function fnGetSQLTBLEMP_SEARCH($con,$empcode){\n\t$data=array();\n\t$param=array();\n\t$rs=true;\n\t$sql=\" SELECT * FROM SQLTBLEMP WHERE TEEMCD LIKE ? OR TEEMNM LIKE ?\";\n\t$param[]='%'.$empcode.'%';\n\t$param[]='%'.$empcode.'%';\n\n\t$r = cmFetchAll($con, $sql, 'ss', $param);\n\tif ($r === false) {\n\t\t$rs = MSG2;\n\t}else{\n\t\t$data=$r;\n\t}\n\treturn array(\"result\"=>$rs,\"data\"=>$data);\n}",
"public function findSQL($searchSql='', array $searchValues=array());",
"public static function findByIds()\n {\n $args=func_get_args();\n if( count(static::$primaryKey)==1 )\n {\n $key=static::$primaryKey[0];\n $placeholder=implode(',', array_fill(0, count($args), '?'));\n return self::getBuilder()->where(\"$key in ($placeholder)\", $args)->fetchAll();\n }\n else\n {\n $builder=self::getBuilder();\n\n foreach($args as $id)\n {\n $key=array_combine(static::$primaryKey, $id);\n $builder->orWhere(self::getIdQuery($key));\n }\n return $builder->fetchAll();\n }\n }",
"function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') {\n return $col . \" IN (\" . implode(', ', $search_ids) . \")\";\n}",
"function fetchSqlPairsArray($sqlQueryString, $keyColumnName, $valueColumnName)\n{\n //get sql result\n $sqlResult = mysql_query($sqlQueryString) or die(tdw_mysql_error($sqlQueryString));\n //Proccessing result\n $result = array();\n while ($row = mysql_fetch_assoc($sqlResult)) {\n if(isset($row[$keyColumnName])){\n $result[$row[$keyColumnName]] = (isset($row[$valueColumnName])) ? $row[$valueColumnName] : null;\n }\n }\n return $result;\n}",
"function searchUsers($query)\n{\n global $conn;\n\n $statement = $conn->prepare(\n 'SELECT id, username, name, picture, email FROM authenticated_user WHERE to_tsvector(\\'english\\', username || \\' \\' || name) @@ to_tsquery(\\'english\\', ?) \n OR name ILIKE \\'%\\' || ? || \\'%\\' \n OR username ILIKE \\'%\\' || ? || \\'%\\'');\n $statement->execute([$query, $query, $query]);\n return $statement->fetchAll();\n}",
"public static function sqlKeyValues($data) {\n\t\tfunction quote($v) {\n\t\t\treturn '\"'.$v.'\"';\n\t\t}\n\t\t$keys = join(',',array_keys($data));\n\t\t$values = join(',',array_map('quote',array_values($data)));\n\t\treturn array('keys'=>$keys,'values'=>$values);\n\t}",
"function query_keyed_list_array($key, $query) {\n // Query and return\n $args = array_slice(func_get_args(), 2);\n $sh = $this->query($query, $args);\n if ($sh) {\n $return = array();\n while ($row = $sh->fetch_array()) {\n $return[$row[$key]] = $row;\n }\n $sh->finish();\n return $return;\n }\n return null;\n }",
"function MY_dbSimpleArray($query)\n{\n $result = MY_dbQuery($query);\n $result_array = array();\n while ($row = mysql_fetch_row($result))\n {\n $result_array[$row[0]] = $row[1];\n }\n return $result_array;\n}",
"function fetch_record ($table, $key=\"\", $value=\"\")\n{\n\t$query = \"select * from $table \";\n\tif (!empty($key) && !empty($value))\n\t{\n\t\tif (is_array($key) && is_array($value))\n\t\t{\n\t\t\t$query .= \" where \";\n\t\t\t$and = \"\";\n\t\t\twhile (list($i,$v) = each($key))\n\t\t\t{\n\t\t\t\t$query .= \"$and $v = \".$value[$i];\n\t\t\t\t$and = \" and\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query .= \" where $key = $value \";\n\t\t}\n\t}\n\t$result = safe_query($query);\n\tif (!empty($key) && !empty($value))\n\t{\n\t\tset_result_variables($result);\n\t}\n\treturn $result;\n}",
"function findISSN($pissn, $eissn, $db)\n{\n\n\n $db->query('select * from JournalsDOAJ where pISSN=:pissn or pISSN=:issn or eISSN=:eissn or eISSN=:issn1 and InSeesame =2');\n $db->bind(':pissn', $pissn);\n $db->bind(':eissn', $eissn);\n $db->bind(':issn', $eissn);\n $db->bind(':issn1', $pissn);\n\n $result= $db->resultset();\n\n return $result;\n}",
"function load_array_with_two_identifiers(string $table_name,string $identifier1,string $value1,string $identifier2,string $value2): array {\n\tglobal $pdo;\n\t$array = array();\n\t$result = $pdo->prepare('SELECT * FROM \"'.$table_name.'\" WHERE '.$identifier1.'=:value1 AND '.$identifier2.'=:value2');\n\t$result->execute(array(':value1' => $value1, ':value2' => $value2));\n\tif ($result) {\n\t\twhile($row = $result->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$array[] = $row;\n\t\t}\n\t}\n\treturn $array;\n}",
"function db_getRow_list($query) {\n/* XXX could probably use db_getRow anyway, as the associative array will also\n * have the columns in order anyway. */\n $a = func_get_args();\n $r = call_user_func_array('db_query', $a);\n return db_fetch_row($r);\n}",
"function findByQuery($sql,$type='all')\r\n{\r\n $rarray = array();\r\n try {\r\n $db = getConnection();\r\n $stmt = $db->prepare($sql);\r\n $stmt->execute(); \r\n if($type=='one')\r\n $rarray = $stmt->fetch(PDO::FETCH_ASSOC);\r\n else\r\n $rarray = $stmt->fetchAll();\r\n $db = null;\r\n return $rarray; \r\n } catch(PDOException $e) {\r\n return $rarray; \r\n }\r\n}",
"function com_db_fetch_array($qid,$param = MYSQL_ASSOC) {\n return $qid->fetch_array();\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Wiki HTML output can, at any given time, be in only one mode. It will be something like Unordered List, Preformatted Text, plain text etc. When we change modes we have to issue close tags for one mode and start tags for another. $tag ... HTML tag to insert $tagtype ... WIKI_ZERO_LEVEL close all open tags before inserting $tag WIKI_NESTED_LEVEL close tags until depths match $level ... nesting level (depth) of $tag nesting is arbitrary limited to 10 levels | function XARSetHTMLOutputMode($tag, $tagtype, $level)
{
global $XARstack;
$retvar = '';
if ($tagtype == WIKI_ZERO_LEVEL) {
// empty the stack until $level == 0;
if ($tag == $XARstack->top()) {
return; // same tag? -> nothing to do
} while ($XARstack->cnt() > 0) {
$closetag = $XARstack->pop();
$retvar .= "</$closetag>\n";
}
if ($tag) {
$retvar .= "<$tag>\n";
$XARstack->push($tag);
}
} elseif ($tagtype == WIKI_NESTED_LEVEL) {
if ($level < $XARstack->cnt()) {
// $tag has fewer nestings (old: tabs) than stack,
// reduce stack to that tab count
while ($XARstack->cnt() > $level) {
$closetag = $XARstack->pop();
if ($closetag == false) {
break;
}
$retvar .= "</$closetag>\n";
}
// if list type isn't the same,
// back up one more and push new tag
if ($tag != $XARstack->top()) {
$closetag = $XARstack->pop();
$retvar .= "</$closetag><$tag>\n";
$XARstack->push($tag);
}
} elseif ($level > $XARstack->cnt()) {
// we add the diff to the stack
// stack might be zero
while ($XARstack->cnt() < $level) {
$retvar .= "<$tag>\n";
$XARstack->push($tag);
if ($XARstack->cnt() > 10) {
// arbitrarily limit tag nesting
xarSessionSetVar('errormsg', 'Stack bounds exceeded in SetHTMLOutputMode');
}
}
} else { // $level == $XARstack->cnt()
if ($tag == $XARstack->top()) {
return; // same tag? -> nothing to do
} else {
// different tag - close old one, add new one
$closetag = $XARstack->pop();
$retvar .= "</$closetag>\n";
$retvar .= "<$tag>\n";
$XARstack->push($tag);
}
}
} else { // unknown $tagtype
xarSessionSetVar('errormsg', 'Passed bad tag type value in SetHTMLOutputMode');
}
return $retvar;
} | [
"function start_lvl( &$output, $depth = 0, $args = array() ) {\t\t\n\t\t$GLOBALS['comment_depth'] = $depth + 1; ?>\n\n\t\t\t\t<ul class=\"children list-unstyled pl-5\">\n\t<?php }",
"function start_lvl( &$output, $depth ) {\n\t\t$GLOBALS['comment_depth'] = $depth + 1;\n \n $output .= '[';\n \n\t}",
"function start_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t$GLOBALS['comment_depth'] = $depth + 2; ?>\n\t\t\n\t\t<section class=\"child-comments comments-list\">\n\n\t<?php }",
"function maketree ($parent, $open, $level, $mode=1, $aid=0, $add_string=\"\") {\n\n \tif ($mode == 9) $link = \"searchform.php\";\n\tif ($mode == 8) $link = \"admcat.php\";\t\n\tif ($mode == 7) $link = \"admcat.php\";\t\n\tif ($mode == 6) $link = \"admcat.php\";\n\tif ($mode == 5) $link = \"edit_modified.php\";\n\tif ($mode == 4) $link = \"update_online.php\";\n\tif ($mode == 3) $link = \"edit_new.php\";\n\tif ($mode == 2) $link = \"insform.php\";\n\tif ($mode == 1) $link = \"docbycat.php\";\n\n\n\tglobal $PHP_SELF, $t;\n\t//$open = array_unique ($open);\n\t$db = new DB_DocsWell;\n\t$db_leave = new DB_DocsWell;\n\t$Sql = \"SELECT * FROM KATEGORIE WHERE PARENT_ID='$parent' ORDER BY name ASC\";\n\t$db->query($Sql);\n\twhile($db->next_record()) {\n\t\tfor ($i=0;$i<$level;$i++)\n\t\tif ($level > $i) {\n\t\t\techo \" <img src=\\\"images/dirnext.png\\\" alt=\\\":\\\">\";\n\t\t\tif ($level == $i+1) \n\t\t\t\techo \" <img src=\\\"images/dirleave.png\\\" alt=\\\"...\\\">\";\t\n\t\t\telse \n\t\t\t\techo \" \";\n\t\t}\n\n\t\t//##########\n\t\t$Sql = \"SELECT COUNT(*) AS cnt FROM KATEGORIE WHERE PARENT_ID='\".$db->f(\"ID\").\"'\";\n\t\t$db_leave->query($Sql);\n\t\t$db_leave->next_record();\n\t\t$cnt = $db_leave->f(\"cnt\");\n\t\t//##########\n\n\t\tif (($cnt > 0) && ($open[$db->f(\"ID\")] != 1)) {\n\t\t\techo \" <a href=\\\"categories.php?\";\n\t\t\tforeach (array_keys($open) as $onekey) \n\t\t\t\techo \"pn[\".$onekey.\"]=\".$open[$onekey].\"&\";\n\t\t\techo \"pn[\".$db->f(\"ID\").\"]=1&mode=$mode&aid=$aid&add_string=\".urlencode($add_string);\n\t\t\techo \"\\\">\";\n\t\t} elseif (($cnt > 0) && ($open[$db->f(\"ID\")] == 1)) {\n\t\t\techo \" <a href=\\\"categories.php?\";\n\t\t\tforeach (array_keys($open) as $onekey) {\n\t\t\t\tif ($onekey != $db->f(\"ID\"))\n\t\t\t\techo \"pn[\".$onekey.\"]=\".$open[$onekey].\"&\";\n\t\t\t}\n\t\t\techo \"mode=$mode&aid=$aid&add_string=\".urlencode($add_string);\n\t\t\techo \"\\\">\";\n\t\t} \n\n\t\tif (($cnt > 0) && ($open[$db->f(\"ID\")] != 1)) {\n\t\t\techo \"<img src=\\\"images/diropen.png\\\" border=\\\"0\\\" alt=\\\"[+]\\\"></a>\";\n\t\t}\n\t\telseif (($cnt > 0) && ($open[$db->f(\"ID\")] == 1)) {\n\t\t\techo \"<img src=\\\"images/dirclose.png\\\" border=\\\"0\\\" alt=\\\"[-]\\\"></a>\";\n\t\t}\n\n\t\tif (($cnt == 0) || (($mode >5) && ($mode<9))) {\n\t\t\t$Sql = \"SELECT COUNT(*) AS cnt2 FROM DOKUMENT WHERE KATEGORIE='\".$db->f(\"ID\").\"' AND STATUS<>'D'\";\n\t\t\t$db_leave->query($Sql);\n\t\t\t$db_leave->next_record();\n\t\t\t$cnt2 = $db_leave->f(\"cnt2\");\n\t\t\tif (($cnt2 > 0) || ($mode > 1)) {\n\t\t\t\techo \" <a href=\\\"$link?category=\".$db->f(\"ID\").\"&\".urldecode($add_string);\n\t\t\t\tif ($mode==3) echo \"&ID=$aid&status=edit_new\";\n\t\t\t\tif ($mode==4) echo \"&ID=$aid\";\n\t\t\t\tif ($mode==5) echo \"&ID=$aid&status=edit_new\";\n\t\t\t\tif ($mode==6) echo \"&mode=1&cnt=$cnt2\";\n\t\t\t\tif ($mode==7) echo \"&mode=2\";\n\t\t\t\tif ($mode==8) echo \"&mode=3&cnt=$cnt2\";\n\t\t\t\tif ($mode==8) echo \"&mode=3&cnt=$cnt2\";\n\t\t\t\t//if ($mode==9) echo \"&\".$add_string;\n\t\t\t\techo \"\\\">\".$t->translate($db->f(\"NAME\")).\"</a>\";\n\t\t\t} else \n\t\t\t\techo \" \".$t->translate($db->f(\"NAME\"));\n\t\t\techo \" [\".$cnt2.\"]\";\n\t\t} else\n\t\t\techo \" \".$t->translate($db->f(\"NAME\"));\n\t\techo \"<br>\\n\";\n\n\n\t\tif ($open[$db->f(\"ID\")]==1) \n\t\t\tmaketree ($db->f(\"ID\"),$open,$level+1,$mode,$aid,$add_string);\n\t}\n}",
"function plugin_autotags_dokuwiki ($op, $content = '', $autotag = '')\n{\n global $_CONF, $_DW_CONF, $LANG_DW00, $conf;\n\n if ($op == 'tagname' ) {\n return array('wiki');\n } else if ($op == 'tagusage') {\n $tagUsage = array(\n array('namespace' => 'dokuwiki','usage' => 'page')\n );\n return $tagUsage;\n } else if ($op == 'desc' ) {\n return $LANG_DW00['desc_wiki'];\n } else if ($op == 'parse') {\n if ( ($autotag['tag'] == 'wiki') ) {\n $dwId = (isset($autotag['parm1']) ? $autotag['parm1'] : '');\n $caption = (isset($autotag['parm2']) ? $autotag['parm2'] : '');\n if ( empty($dwId) ) {\n $content = str_replace ($autotag['tagstr'], '', $content);\n return $content;\n }\n if ( isset($conf['userewrite']) ) {\n switch ($conf['userewrite']) {\n case 2 :\n $link = '<a href=\"'.$_CONF['site_url'].$_DW_CONF['public_dir'].'doku.php/'.$dwId.'\">';\n break;\n case 1 :\n $link = '<a href=\"'.$_CONF['site_url'].$_DW_CONF['public_dir'].''.$dwId.'\">';\n break;\n default :\n $link = '<a href=\"'.$_CONF['site_url'].$_DW_CONF['public_dir'].'doku.php?id='.$dwId.'\">';\n break;\n }\n } else {\n $link = '<a href=\"'.$_CONF['site_url'].$_DW_CONF['public_dir'].'doku.php?id='.$dwId.'\">';\n }\n\n if ( empty($caption) || $caption == '' ) {\n $caption = $dwId;\n }\n $dwTag = $link.$caption.'</a>';\n $content = str_replace ($autotag['tagstr'], $dwTag, $content);\n return $content;\n } else {\n return $content;\n }\n }\n}",
"private function parseTags()\n {\n $tagObj = new LingerTag();\n $tags = $tagObj->getTags();\n foreach ($tags as $tag => $opt) {\n if (!isset($opt['block']) || !isset($opt['level'])) {\n continue;\n }\n for ($i = 0; $i <= $opt['level']; $i++) {\n if (!$tagObj->parseTag($tag, $this->content)) {\n break;\n }\n }\n }\n }",
"function end_lvl( &$output, $depth = 0, $args = array() ) {\r\n\t\t\t$indent = str_repeat(\"\\t\", $depth);\r\n\t\t\tif( 0 === $depth AND \"enabled\" == $this->megamenu_status ) {\r\n\t\t\t\t$output .= \"\\t</ul>\\n</div>\\n\";\r\n\r\n\t\t\t\t$background\t\t= '';\r\n\t\t\t\tif( $this->menu_img ){\r\n\t\t\t\t\t$background = \"style=\\\"background:url('\" . $this->menu_img . \"');\\\" \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$output = str_replace( \"{MegaMenuContainer}\", \"<div \" . $background . \"class=\\\"wtrMegaMenuContainer wtrMegaMenuContainerColor apperAnimation clearfix\\\">\", $output );\r\n\t\t\t\t$output = str_replace( \"{MegaMenuCol}\", \"wtrMegaMenuCol wtrMegaMenuColOne\" . $this->megamenu_class_columns , $output );\r\n\t\t\t} else if( 1 === $depth AND \"enabled\" == $this->megamenu_status ) {\r\n\r\n\t\t\t} else if( 0 === $depth ) {\r\n\t\t\t\t$output .= \"$indent</ul>\\n</div>\\n\";\r\n\r\n\t\t\t\t$background\t\t= '';\r\n\t\t\t\tif( $this->menu_img ){\r\n\t\t\t\t\t$background = \"style=\\\"background:url('\" . $this->menu_img . \"');\\\"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$output = str_replace( \"{MegaMenuContainer}\", \"<div $background class=\\\"wtrSecondMenuContainer wtrStandardMenu wtrMegaMenuContainerColor apperAnimation clearfix\\\">\", $output );\r\n\t\t\t} else {\r\n\t\t\t\t$output .= \"$indent</ul>\\n\";\r\n\t\t\t}\r\n\t\t}",
"function end_lvl( &$output, $depth = 0, $args = array() ) {\n $GLOBALS['comment_depth'] = $depth + 1; ?>\n\n </ul><!-- /.children -->\n\n <?php }",
"function end_lvl( &$output, $depth = 0, $args = array() ) {\n $GLOBALS['comment_depth'] = $depth + 1; ?>\n\n\t\t</ul><!-- /.children -->\n\n <?php }",
"function _syntaxmodes_xhtml(){\n $modes = p_get_parsermodes();\n\n $compactmodes = array();\n foreach($modes as $mode){\n $compactmodes[$mode['sort']][] = $mode['mode'];\n }\n $doc = '';\n $doc .= '<div class=\"table\"><table class=\"inline\"><tbody>';\n\n foreach($compactmodes as $sort => $modes){\n $rowspan = '';\n if(count($modes) > 1) {\n $rowspan = ' rowspan=\"'.count($modes).'\"';\n }\n\n foreach($modes as $index => $mode) {\n $doc .= '<tr>';\n $doc .= '<td class=\"leftalign\">';\n $doc .= $mode;\n $doc .= '</td>';\n\n if($index === 0) {\n $doc .= '<td class=\"rightalign\" '.$rowspan.'>';\n $doc .= $sort;\n $doc .= '</td>';\n }\n $doc .= '</tr>';\n }\n }\n\n $doc .= '</tbody></table></div>';\n return $doc;\n }",
"function end_lvl( &$output, $depth = 0, $args = array() ) {\n\t\t$GLOBALS['comment_depth'] = $depth + 1; ?>\n\n\t\t</ul><!-- /.children -->\n\t\t\n\t<?php }",
"function handleTagToText() {\n if (!$this->keepHTML) {\n if (!$this->parser->isStartTag && $this->parser->isBlockElement) {\n $this->setLineBreaks(2);\n }\n } else {\n # dont convert to markdown inside this tag\n /** TODO: markdown extra **/\n if (!$this->parser->isEmptyTag) {\n if ($this->parser->isStartTag) {\n if (!$this->skipConversion) {\n $this->skipConversion = $this->parser->tagName.'::'.implode('/', $this->parser->openTags);\n }\n } else {\n if ($this->skipConversion == $this->parser->tagName.'::'.implode('/', $this->parser->openTags)) {\n $this->skipConversion = false;\n }\n }\n }\n\n if ($this->parser->isBlockElement) {\n if ($this->parser->isStartTag) {\n if (in_array($this->parent(), array('ins', 'del'))) {\n # looks like ins or del are block elements now\n $this->out(\"\\n\", true);\n $this->indent(' ');\n }\n if ($this->parser->tagName != 'pre') {\n $this->out($this->parser->node.\"\\n\".$this->indent);\n if (!$this->parser->isEmptyTag) {\n $this->indent(' ');\n } else {\n $this->setLineBreaks(1);\n }\n $this->parser->html = ltrim($this->parser->html);\n } else {\n # don't indent inside <pre> tags\n $this->out($this->parser->node);\n static $indent;\n $indent = $this->indent;\n $this->indent = '';\n }\n } else {\n if (!$this->parser->keepWhitespace) {\n $this->output = rtrim($this->output);\n }\n if ($this->parser->tagName != 'pre') {\n $this->indent(' ');\n $this->out(\"\\n\".$this->indent.$this->parser->node);\n } else {\n # reset indentation\n $this->out($this->parser->node);\n static $indent;\n $this->indent = $indent;\n }\n\n if (in_array($this->parent(), array('ins', 'del'))) {\n # ins or del was block element\n $this->out(\"\\n\");\n $this->indent(' ');\n }\n if ($this->parser->tagName == 'li') {\n $this->setLineBreaks(1);\n } else {\n $this->setLineBreaks(2);\n }\n }\n } else {\n $this->out($this->parser->node);\n }\n if (in_array($this->parser->tagName, array('code', 'pre'))) {\n if ($this->parser->isStartTag) {\n $this->buffer();\n } else {\n # add stuff so cleanup just reverses this\n $this->out(str_replace('<', '&lt;', str_replace('>', '&gt;', $this->unbuffer())));\n }\n }\n }\n }",
"function _parseTag ($args) {\r\n\t\t\t$wholetag = $args[0];\r\n\t\t\t$openclose = $args[1];\r\n\t\t\t$tag = strtolower($args[2]);\r\n\r\n\t\t\tif ($tag == 'else') return '<?php } else { ?>';\r\n\r\n\t\t\tif (preg_match(\"/^<\\/|{\\/|<!--\\/$/s\", $openclose) || preg_match(\"/^end[if|loop|unless|comment]$/\", $tag)) {\r\n\t\t\t\tif ($tag == 'loop' || $tag == 'endloop') array_pop($this->_namespace);\r\n\t\t\t\tif ($tag == 'comment' || $tag == 'endcomment') {\r\n\t\t\t\t\treturn '<?php */ ?>';\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn '<?php } ?>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// arrange attributes\r\n\t\t\tfor ($i=3; $i < 8; $i=($i+2)) {\r\n\t\t\t\tif (empty($args[$i]) && empty($args[($i+1)])) break;\r\n\t\t\t\t$key = (empty($args[$i])) ? 'name' : strtolower($args[$i]);\r\n\t\t\t\tif ($key == 'name' && preg_match('/^(php)?include$/', $tag)) $key = 'file';\r\n\t\t\t\t$$key = $args[($i+1)];\r\n\t\t\t}\r\n\r\n\r\n\t\t\tif (isset($name)) {\r\n\t\t\t\t$var = ($this->OPTIONS['CASELESS']) ? strtolower($name) : $name;\r\n\r\n\t\t\t\tif ($this->_debug && !empty($var)) {\r\n\t\t\t\t\tif (preg_match(\"/^global\\.([A-Za-z_]+[_A-Za-z0-9]*)$/\", $var, $matches)) $var2 = $matches[1];\r\n\t\t\t\t\tif (empty($this->_debugTemplatevars[$tag])) $this->_debugTemplatevars[$tag] = array();\r\n\t\t\t\t\tif (!isset($var2)) $var2 = $var;\r\n\t\t\t\t\tif (!in_array($var2, $this->_debugTemplatevars[$tag])) array_push($this->_debugTemplatevars[$tag], $var2);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (preg_match(\"/^([A-Za-z_]+[_A-Za-z0-9]*(\\.)+)?([A-Za-z_]+[_A-Za-z0-9]*)$/\", $var, $matches)) {\r\n\t\t\t\t\t$var = $matches[3];\r\n\t\t\t\t\t$namespace = $matches[1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\t// return correct string (tag dependent)\r\n\t\t\tswitch ($tag) {\r\n\t\t\t\tcase 'var':\r\n\t\t\t\t\tif (empty($escape) && (!empty($this->OPTIONS['DEFAULT_ESCAPE']) && strtolower($this->OPTIONS['DEFAULT_ESCAPE']) != 'none')) {\r\n\t\t\t\t\t\t$escape = strtolower($this->OPTIONS['DEFAULT_ESCAPE']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn '<?php '.$this->_parseVar ($wholetag, $tag, $var, @$escape, @$format, @$namespace).' ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'if':\r\n\t\t\t\t\treturn '<?php if ('. $this->_parseIf($var, @$value, @$op, @$namespace) .') { ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'unless':\r\n\t\t\t\t\t return '<?php if (!'. $this->_parseIf($var, @$value, @$op, @$namespace) .') { ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'elseif':\r\n\t\t\t\t\t return '<?php } elseif ('. $this->_parseIf($var, @$value, @$op, @$namespace) .') { ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'loop':\r\n\t\t\t\t\t return '<?php '. $this->_parseLoop($var) .'?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'comment':\r\n\t\t\t\t\tif (empty($var)) { // full open/close style comment\r\n\t\t\t\t\t\treturn '<?php /* ?>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse { // just ignore tag if it was a one line comment\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'phpinclude':\r\n\t\t\t\t\tif ($this->OPTIONS['ENABLE_PHPINCLUDE']) {\r\n\t\t\t\t\t\treturn '<?php include(\\''.$file.'\\'); ?>';\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'include':\r\n\t\t\t\t\treturn '<?php $this->_getData($this->_fileSearch(\\''.$this->_parseIncludeFile($file).'\\'), 1); ?>';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif ($this->OPTIONS['STRICT']) vlibTemplateError::raiseError('VT_ERROR_INVALID_TAG', KILL, htmlspecialchars($wholetag, ENT_QUOTES));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}",
"function outputPlist($i_tag = -1, $i_level = 0, $s_spacer = \"\\t\") {\n\t\tstatic $b_leadIn = true;\n\t\t$s_return = '';\n\n\t\t// filter invalid ids\n\t\tif (!$this->isValidTagID($i_tag)) return $s_return;\n\t\t$a_thisTag\t= $this->a_tags[$i_tag];\n\n\t\tswitch($a_thisTag['tag']) {\n\t\t\tcase $this->s_textNodeName : // filter text nodes\n\t\t\t\t$s_return = $a_thisTag['contents']; //html_entity_decode(, ENT_QUOTES, $this->s_charset);\n\t\t\tbreak;\n\t\t\tcase 'key' :\n\t\t\t\t$s_return = str_repeat($s_spacer, $a_thisTag['level'] + $i_level)\n\t\t\t\t\t. '<key>' . $this->outputPlist($a_thisTag['children'][0], $i_level, $s_spacer) . '</key>';\n\t\t\t\t$b_leadIn = $this->b_outPlistKeyOnOwnLine; // false; if you want <key><nexttag> or true if you want <nexttag> on next line\n\t\t\t\tif ($b_leadIn) $s_return .= chr(10);\n\t\t\tbreak;\n\t\t\t// basic types\n\t\t\tcase 'string' :\n\t\t\tcase 'integer' :\n\t\t\tcase 'real' :\n\t\t\tcase 'date' :\n\t\t\tcase 'data' :\n\t\t\t\t$s_inner = (isset($a_thisTag['children'][0])) ? $this->outputPlist($a_thisTag['children'][0], $i_level, $s_spacer) : '';\n\t\t\t\t$s_leadin = (($b_leadIn) ? str_repeat($s_spacer, $a_thisTag['level'] + $i_level) : '');\n\t\t\t\t$s_return = sprintf('%3$s<%1$s>%2$s</%1$s>' . chr(10), $a_thisTag['tag'], $s_inner, $s_leadin);\n\t\t\t\t$b_leadIn = true;\n\t\t\tbreak;\n\t\t\t// boolean\n\t\t\tcase 'true' : $s_return = '<true/>' . chr(10);\n\t\t\tbreak;\n\t\t\tcase 'false' : $s_return = '<false/>' . chr(10);\n\t\t\tbreak;\n\t\t\t// null not official Apple standard\n\t\t\t//case 'null' : $s_return = '<null/>' . chr(10);\n\t\t\tbreak;\n\t\t\t// collections\n\t\t\tcase 'array' :\n\t\t\tcase 'dict' :\n\t\t\tcase 'plist' :\n\t\t\t\t$s_return = sprintf('%2$s<%1$s>' . chr(10), $a_thisTag['tag'], (($b_leadIn) ? str_repeat($s_spacer, $a_thisTag['level'] + $i_level) : ''));\n\t\t\t\t$b_leadIn = true;\n\t\t\t\tforeach ($a_thisTag['children'] as $i_child) {\n\t\t\t\t\t$s_return .= $this->outputPlist($i_child, $i_level, $s_spacer); }\n\t\t\t\t$s_return .= sprintf('%2$s</%1$s>' . chr(10), $a_thisTag['tag'], str_repeat($s_spacer, $a_thisTag['level'] + $i_level));\n\t\t\tbreak;\n\t\t}\n\t\treturn $s_return;\n\t}",
"function end_lvl( &$output, $depth = 0, $args = array() ) {\r\n\t\t\t$indent = str_repeat(\"\\t\", $depth);\r\n\t\t\t$output .= \"$indent</ul></div>\\n\";\r\n\t\t}",
"function writeTag($tag,$value,$level=1)\n{\n if (!$value) return '';\n return str_repeat(TAB_CHAR,$level).\"<{$tag}>{$value}</{$tag}>\\n\";\n}",
"protected function buildDefaultTreeContent() {\n\t\tob_start();\n\t\t?>\n\t\t<pre class=\"script\">\n\t\twiki.tree();\n\t\t</pre>\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}",
"function otag($tag=false, $class='', $style='', $id='', $extra='')\n\t{\n\t\tif($tag == false)\n\t\t{\n\t\t\t$tag = $this->default_tag['tag'];\n\t\t\t$class = $this->default_tag['class'];\n\t\t\t$style = $this->default_tag['style'];\n\t\t\t$extra = $this->default_tag['extra'];\n\t\t}\n\t\t$class = ($class != '' ? ' class=\"' . $class . '\"' : '');\n\t\t$style = ($style != '' ? ' style=\"' . $style . '\"' : '');\n\t\t$id = ($id != '' ? ' id=\"' . $id . '\"' : '');\n\t\t$extra = ($extra != '' ? ' ' . $extra : '');\n\t\tarray_push($this->closetags, $tag);\n\t\treturn $this->xecho('<' . $tag . $class . $style . $id . $extra . '>');\n\t}",
"function _tagOpen($parser, $tag, $attribs) {\n\t\t$this->currentData = '';\n\t\tarray_push($this->stack, $tag);\n\t\t$this->onTagOpen($tag);\n\n\t\t//xml-structure of errors and warnings are the same\n\t\t//we can use $this->errosPos and $this->errorsCountTemp for creating $this->errors AND $this->warnings - @see _tagClose();\n\t\tif($this->_getParentTag() == 'errors' || $this->_getParentTag() == 'warnings'){\n\t\t\tswitch ($tag) {\n\t\t\t\tcase 'sr':\n\t\t\t\tcase 'su':\n\t\t\t\tcase 'sv':\n\t\t\t\tcase 'sa':\n\t\t\t\tcase 'ls':\n\t\t\t\tcase 'sl':\n\t\t\t\tcase 'sf':\n\t\t\t\t\t$this->errorPos = $tag;\n\t\t\t\t\t$this->errorCountTemp = 0;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show the form for creating a new OrderCancel. | public function create()
{
return view('admin.order_cancels.create');
} | [
"function CancelForm() {\r\n\t\tif(self::$allow_cancelling && $order = $this->orderfromid()) {\r\n\t\t\tif($order->canCancel()) {\r\n\t\t\t\t$form = new CancelOrderForm($this->owner, 'CancelForm', $order->ID);\r\n\t\t\t\t$form->extend('updateCancelForm',$order);\r\n\t\t\t\treturn $form;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private function createCancelForm( Order $order ) {\n $action = $this->generateUrl( 'client_order_cancel', array('idRelation' => $order->getRelation()->getId(), 'idOrder' => $order->getId()) );\n \n $builder = $this->createFormBuilder( null , array(\n 'action' => $action,\n 'method' => 'PUT',\n ) );\n \n if( $order->getReady() ){\n $builder->add( 'why', 'choice', array(\n \"choices\" => array(\n \"It doesn't apply anymore.\",\n \"It is too late now.\",\n \"There was a misunderstanding in the requierement or clause.\"\n ),\n 'expanded' => true,\n ) )\n\n ->add( 'other', 'textarea', array( \"required\" => false ) );\n }\n \n $builder->add( 'submit', 'submit' );\n\n return $builder->getForm();\n }",
"function CancelForm() {\r\n\t\tif($this->Order()) {\r\n\t\t\tif($this->currentOrder->canCancel()) {\r\n\t\t\t\treturn new OrderForm_Cancel($this, 'CancelForm', $this->currentOrder);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//once cancelled, you will be redirected to main page - hence we need this...\r\n\t\tif($this->orderID) {\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}",
"public function newAction()\n {\n $entity = new OrderForm();\n $form = $this->createCreateForm(new OrderForm());\n\n return $this->render('AntWebBundle:OrderForm:new.html.twig', array(\n 'form' => $form->createView(),\n ));\n }",
"protected function addCancelButton()\n {\n $order = $this->getOrder();\n $view = $this->getView();\n if (!$order || !$view) {\n return;\n }\n\n if (!$this->canCancel($order)) {\n return;\n }\n\n $message = __('Do you really want to cancel this order?');\n $query = [\n 'method' => 'cancel',\n 'id' => $order->getEntityId()\n ];\n $url = $this->urlBuilder->getUrl('novapay', $query);\n\n $view->addButton(\n 'cancelpaid',\n [\n // @todo visible only orders possible to cancel\n 'label' => __('Cancel payment'),\n 'onclick' => \"confirmSetLocation('$message', '$url')\",\n ]\n );\n }",
"public function actionCreate()\n {\n $model = new OrderOptRbSec();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function cancelorderAction() {\n $this->loadLayout ();\n $this->renderLayout ();\n /**\n * Get param of order id\n */\n $orderId = ( int ) $this->getRequest ()->getParam ( 'orderid' );\n Mage::getModel ( 'airhotels/property' )->cancelOrder ( $orderId );\n Mage::getSingleton ( 'core/session' )->addSuccess ( $this->__ ( \"Your Request for Cancellation has been submitted successfully!\" ) );\n /**\n * Redirect\n */\n $this->_redirect ( 'property/general/yourtrip/' );\n return true;\n }",
"public function create()\n {\n return view('custom_order_forms.create');\n }",
"public function cancelAction() {\n\t\t\t\n\t\t\tif (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n\t\t\t\t\n\t\t\t\t$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n\t\t\t\t\n\t\t\t\tif($order->getId()) {\n\t\t\t\t\t\n\t\t\t\t\t// Flag the order as 'cancelled' and save it\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}",
"public function cancelAction() {\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($session->getPay4laterStandardQuoteId(true));\n\n\n $order_history_comment = '';\n // cancel order\n if ($session->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());\n if ($order->getId()) {\n\n $order_history_comments = $this->getCheckout()->getPay4laterErrorMessage();\n foreach ($order_history_comments as $order_history_comment) {\n if ($order_history_comment != '')\n $order->addStatusHistoryComment($order_history_comment, true);\n }\n $order->cancel()->save();\n }\n }\n\n /* we are calling getPay4laterStandardQuoteId with true parameter, the session object will reset the session if parameter is true.\n so we don't need to manually unset the session */\n Mage::getSingleton('checkout/session')->addError(\"Pay4later Payment has been cancelled and the transaction has been declined.\");\n if ($order_history_comment != '')\n Mage::getSingleton('checkout/session')->addError($order_history_comment);\n $this->_redirect('checkout/cart');\n }",
"public function newAction()\n {\n $entity = new Contador();\n $form = $this->createForm(new ContadorType(), $entity);\n\n return $this->render('ContadoresBundle:Contador:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'contador_new'\n ));\n }",
"public function actionCancel()\n {\n $cancelFlights = Flight::find()\n ->select(\n [\n 'route.number',\n 'bus.number AS auto',\n 'passport_data.`name`',\n 'passport_data.patronymic',\n 'passport_data.surname',\n 'flight.start_date',\n 'flight.end_date',\n 'reason.`name` AS reason',\n ]\n )\n ->join('JOIN', 'reason', 'flight.id_reason = reason.id')\n ->join('JOIN', 'driver', 'flight.id_driver = driver.id')\n ->join('JOIN', 'passport_data', 'driver.id = passport_data.id')\n ->join('JOIN', 'bus', 'driver.id_bus = bus.id')\n ->join('JOIN', 'route', 'driver.id_route = route.id')\n ->where('flight.wrong = 1')\n ->orderBy('flight.start_date ASC')\n ->asArray()\n ->all();\n\n return $this->render('cancel', [\n 'cancelFlights' => $cancelFlights\n ]);\n }",
"public function actionCreate()\n {\n $model = new CUSTOMER_ORDERS();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ORDER_ID]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function createCancellationAction()\n {\n return $this->process(\n TransferCmd\\Bus\\CreateCancellation::create(['id' => $this->busRegId])\n );\n }",
"public function actionCancelled()\n {\n $order = $this->module->orderModelName;\n $query = $order::getOrderQuery()->andWhere(['status'=>$order::STATUS_CANCELLED]);\n $dataProvider = new ActiveDataProvider([\n 'query'=>$query,\n ]);\n return $this->render('cancelled',[\n 'dataProvider'=>$dataProvider,\n ]);\n }",
"public function actionCreate()\n {\n $model = new IndicadorCurso();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID_EVENTO]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->IDOrder]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function cancelAction() {\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n if ($order->getId()) {\n // Flag the order as 'cancelled' and save it\n $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'El usuario cancelo el proceso de pago.')->save();\n }\n }\n }",
"public function actionCreate()\n {\n $model = new Order();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for check tpv attempts alerts | public function checkAlertTeleD2d($telesale)
{
\Log::info('Current Lead Attempt is: '.$telesale->tpv_attempts);
$salesAgent = (new Salesagentdetail())->getUserDetail($telesale->user_id);
$alertName = '';
$alertMaxCountName = '';
if($salesAgent->agent_type == 'tele'){
$alertName = 'is_enable_alert10_tele';
$alertMaxCountName = 'max_times_alert10_tele';
}else if($salesAgent->agent_type == 'd2d'){
$alertName = 'is_enable_alert11_d2d';
$alertMaxCountName = 'max_times_alert11_d2d';
}
//Stores tpv now attempts for given lead id for alert
if(isOnSettings($telesale->client_id, $alertName,false)){
(new Telesales)->storeTpvNowAttempts($telesale->id,($telesale->tpv_attempts+1));
$updatedLeadObj = Telesales::find($telesale->id);
//Dispatch queue for checking tpv now alert and sending a mail
CheckTPVAlerts::dispatch($updatedLeadObj->id,$updatedLeadObj->tpv_attempts,$alertMaxCountName);
}
else{
\Log::info("alert is switched off for type ".$salesAgent->agent_type);
}
} | [
"function checkHoursVerification(){\n\t\tstatic $ci = null;\n \n\t if(is_null($ci)) {\n\t $ci =& get_instance();\n\t }\n\n\t redirectQuestion();\n\n\t $getSubscription = $ci->query->getDataSubcription(getSessionCodeId());\n\n\t if($getSubscription){\n\t \treturn true;\n\t }else{\n\t $checkTotalReject = $ci->query->get('pmj_verification',array(\"count\"=>1,\"where\"=>array(\"id_member\"=>getSessionUser(),\"status\"=>\"reject\",\"status !=\"=>\"accept\")));\n\n\t if($checkTotalReject[0]->total >= 3){\n\t \tredirect(base_url(\"verification\").\"/suspendAccount\");\n\t }else{\n\t \t\t$checkVerification = $ci->query->get('pmj_verification',array(\"where\"=>array(\"id_member\"=>getSessionUser(),\"status\"=>\"accept\")));\n\n\t\t if($checkVerification){\n\t\t \treturn true;\n\t\t }else{\n\t\t\t\t$checkSubmitDate = $ci->query->get('pmj_member',array(\"where\"=>array(\"id\"=>getSessionUser())));\n\n\t\t\t\tif($checkSubmitDate[0]->first_login){\n\t\t\t\t\t$hourdiff = round((strtotime(date(\"Y-m-d H:i:s\")) - strtotime(''.$checkSubmitDate[0]->first_login.''))/3600, 1);\n\n\t\t\t\t\tif(getSetting('8')==\"true\"){\n\t\t\t\t\t\tif($hourdiff >= 48){\n\t\t\t\t\t\t\t// redirect(base_url(\"verification\").\"/suspendAccount\");\n\t\t\t\t\t\t\tredirect(base_url(\"verification\").\"/waitingVerification\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t } \t\n\t }\t \n\t }\n\t}",
"function urkund_check_attempt_timeout($plagiarismfile) {\n global $DB;\n\n // Maximum number of times to try and obtain the status of a submission.\n // Make sure the max attempt value in $statusdelay is higher than this.\n $maxstatusattempts = PLAGIARISM_URKUND_MAXATTEMPTS;\n\n // Time to wait between checks array(number of attempts-1, time delay in minutes)..\n $statusdelay = array(2 => 5, // Up to attempt 3 check every 5 minutes.\n 3 => 15, // Up to attempt 4 check every 15 minutes.\n 6 => 30,\n 11 => 120,\n 20 => 240,\n 100 => 480);\n\n // The first time a file is submitted we don't need to wait at all.\n if (empty($plagiarismfile->attempt) && $plagiarismfile->statuscode == 'pending') {\n return true;\n }\n\n // Check if we have exceeded the max attempts.\n if ($plagiarismfile->attempt > $maxstatusattempts) {\n $plagiarismfile->statuscode = 'timeout';\n $DB->update_record('plagiarism_urkund_files', $plagiarismfile);\n return true; // Return true to cancel the event.\n }\n\n $now = time();\n\n // Now calculate wait time.\n $i = 0;\n $wait = 0;\n while ($i < $plagiarismfile->attempt) {\n // Find what multiple we need to use for this attempt.\n foreach ($statusdelay as $att => $delay) {\n if ($att >= $i) {\n $wait = $wait + $delay;\n break;\n }\n }\n $i++;\n }\n $wait = (int)$wait * 60;\n $timetocheck = (int)($plagiarismfile->timesubmitted + $wait);\n // Calculate when this should be checked next.\n\n if ($timetocheck < $now) {\n return true;\n } else {\n return false;\n }\n}",
"public function getAppEvnAttempts ()\n {\n return $this->app_evn_attempts;\n }",
"function check_alert_msg(){\n\t\t$arr_alert = array();\n\n\t\tif(func_num_args()>0):\n\t\t\t$arr = func_get_args();\n\t\t\t$alert_id = $arr[0];\n\t\t\t$base_date = $arr[1];\n\t\t\t$pxid = $arr[2];\n\t\tendif;\n\n\t\t$q_alert_prog_id = mysql_query(\"SELECT alert_id,date_pre,date_until,alert_message,alert_action,alert_actual_message FROM m_lib_alert_type WHERE alert_indicator_id='$alert_id' AND alert_flag_activate='Y'\") or die(\"Cannot query 1590: \".mysql_error());\t\n\n\n\t\tif(mysql_num_rows($q_alert_prog_id)!=0):\n\t\t\t$arr_alert = mysql_fetch_array($q_alert_prog_id);\n\t\tendif;\n\n\t\t\treturn $arr_alert;\n\t}",
"public function check_block() {\n if ($this->session->userdata('block_user')) {\n $get_count = $this->session->userdata('block_user');\n if (($get_count['time'] > time() - 3600) AND ( $get_count['tried'] == 5)) {\n display_mess(48);\n die();\n } else {\n if (($get_count['time'] < time() - 3600)) {\n $this->session->unset_userdata('block_user');\n }\n }\n }\n }",
"public function checkTimeout();",
"public function check_block() {\n \n if ( $this->session->userdata('block_user') ) {\n \n $get_count = $this->session->userdata('block_user');\n \n if ( ($get_count['time'] > time() - 3600) AND ( $get_count['tried'] == 5) ) {\n \n display_mess(48);\n die();\n \n } else {\n \n if ( ($get_count['time'] < time() - 3600) ) {\n \n $this->session->unset_userdata('block_user');\n \n }\n \n }\n \n }\n \n }",
"function get_assessment_question_attempts();",
"public function get_failed_count();",
"public function ignoredTimeouts()\n {\n $points = 0;\n foreach ($this->cardsByGame() as $key => $g) {\n foreach ($g as $key => $gn) {\n for ($i = 0; $i < count($gn); $i++) {\n $n = $gn[$i];\n if ($n->action == 'timeout' && $n->uid == $this->id) {\n $time1 = $n->created_at;\n $j = $i;\n while (true) {\n $j--;\n if ($gn[$j]->action == 'play') {\n $time2 = $gn[$j]->created_at;\n break;\n }\n }\n $count = count(DB::select(\"SELECT * FROM chat WHERE message like '%alerted%'\n AND uid = 0 AND ( created_at < ? AND created_at > ? );\", [$time1, $time2]));\n $points = $points + (($count > 5)?5:$count);\n }\n }\n }\n }\n return $points;\n }",
"public function testTotpAuthSuccess() {\n $client = $this->getClient(self::PRESET_KEY, \\GoogleAuthenticator\\Client::MODE_TOTP);\n $result = $client->verifyCode('066050', self::PRESET_TIMESTAMP, 2);\n\n $this->assertInternalType('integer', $result);\n }",
"public function verifyFailedAction() {\n\t}",
"function checkTesterRatioAndEmailAlert()\n{\n\t$queueStatusFilename = './QueueStatus.ini';\n\t$queueStatus = parse_ini_file($queueStatusFilename, true);\n\t$configTable = Doctrine_Core::getTable('WPTMonitorConfig');\n\t$config = $configTable->find(1);\n\t$siteContactEmailAddress = $config['SiteContactEmailAddress'];\n\t// Check runrate to test ration and alert if necessary\n\t// Currently hard coded to alert if ration exceeds 40:1\n\t// TODO: Make configurable, or improve method of determining optimum run rate\n\t$locations = getLocationInformation();\n\t$message = \"\";\n\tforeach ($locations as $key => $location) {\n\t\tif (stripos($key, \"_wptdriver\")) {\n\t\t\t// TODO: For now ignore the _wptdriver locations as they are the same as IE9\n\t\t\t// This may require calcs to be done differently. 2012/02/19\n\t\t\tcontinue;\n\t\t}\n\t\t$id = $location['id'];\n\t\t$queueStat = $queueStatus[\"'\" . $id . \"'\"];\n\t\tif (empty($location) || !array_key_exists('id', $location) || empty($location['id'])) {\n\t\t\tcontinue;\n\t\t}\n\t\t$runRate = $location['runRate'];\n\t\t$agentCount = $location['AgentCount'];\n\t\tif (empty($agentCount))\n\t\t\t$agentCount = '0';\n\t\t$requiredAdditionalTesters = ($runRate / TARGET_RUN_RATE_RATIO) - $agentCount;\n\t\tif ($location['runRate']) {\n\t\t\tif ($location['AgentCount'] < 1 || ($location['runRate'] / $location['AgentCount'] > TARGET_RUN_RATE_RATIO)) {\n\t\t\t\t// Only alert once per hour\n\t\t\t\tif (!array_key_exists('LastTesterRatioAlertTime', $queueStat) || (current_seconds() > $queueStat['LastTesterRatioAlertTime'] + 3600)) {\n\t\t\t\t\tlogOutput('[INFO] [checkTesterRatioAndEmailAlert] LastTesterRatioAlertTime for: ' . $id . ' has not alerted since: ' . $queueStat['LastTesterRatioAlertTime']);\n\t\t\t\t\t$message = \"--------------------------------------------\\n\";\n\t\t\t\t\t$message .= \"Runrate ratio insufficient for location: \" . $id . \"\\n\";\n\t\t\t\t\t$message .= \"Runrate: \" . $runRate . \"\\n\";\n\t\t\t\t\t$message .= \"Testers: \" . $agentCount . \"\\n\";\n\t\t\t\t\t$message .= \"Timestamp: \" . timestamp() . \"\\n\";\n\t\t\t\t\tif ($agentCount) {\n\t\t\t\t\t\t$message .= \"Ratio: \" . $runRate / $agentCount . \"\\n\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$message .= \"Ratio: NO TESTERS SERVING THIS REGION\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t$message .= \"--------------------------------------------\\n\";\n\t\t\t\t\t$message .= \"Target Ratio: \" . TARGET_RUN_RATE_RATIO . \"\\n\";\n\t\t\t\t\t$message .= \"Please add \" . ceil($requiredAdditionalTesters) . \" additional agents for this location.\";\n\t\t\t\t\t// Update time stamp\n\t\t\t\t\tif (!empty($id))\n\t\t\t\t\t\t$queueStatus[\"'\" . $id . \"'\"]['LastTesterRatioAlertTime'] = current_seconds();\n\t\t\t\t\twriteIniFile($queueStatus, $queueStatusFilename, true);\n\t\t\t\t} else {\n\t\t\t\t\tlogOutput('[INFO] [checkTesterRatioAndEmailAlert] LastTesterRatioAlertTime for: ' . $id . ' alert interval has not passed. Last Alert: ' . $queueStat['LastTesterRatioAlertTime']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif ($message) {\n\t\tsendEmailAlert($siteContactEmailAddress, $message);\n\t\tlogOutput('[INFO] [checkTesterRatioAndEmailAlert] Alert message sent:\\n' . $message);\n\t\techo $message;\n\t}\n}",
"function checkTimeout($type) {\r\n if($type==\"data\") {\r\n $file = 'nextcheck.dat';\r\n } else {\r\n $file = 'nextcheck-'.$type.'.dat'; // 'full' for full hash timeout\r\n }\r\n if (file_exists($this->pingfilepath.$file)) {\r\n $curstatus = explode('||',@file_get_contents($this->pingfilepath.$file));\r\n $time = $curstatus[0];\r\n } else {\r\n $time = 0; //allowed to requests\r\n }\r\n if( time() < $time) {\r\n $this->fatalerror(\"Must wait another \".($curstatus[0]-time()). \" seconds before another request (\".$type.\") \");\r\n } else {\r\n $this->outputmsg(\"Allowed to request\");\r\n }\r\n }",
"function schedule_onetime_check_active() {\r\n \t$response = WPPostsRateKeys_Central::get_specific_data_from_server('if_active');\r\n\r\n \tif ($response) {\r\n\t \t// We get some reply, so Update status and don't ask anymore\r\n \t\tWPPostsRateKeys_Settings::update_active_by_server_response($response);\r\n \t}\r\n \telse {\r\n\r\n\t\t\t\t// Doesn't deactivate because was error in communication with Central Server\r\n\t\t\t\t// Schedule the check again\r\n\t\t\t\t$in_1_day = time() + 86400;\r\n\t\t\t\twp_schedule_single_event($in_1_day, 'seopressor_onetime_check_active');\r\n\r\n\t\t\t\t/*\r\n \t\t// Show user a button to reactivate the plugin manually\r\n \t\t$data = WPPostsRateKeys_Settings::get_options();\r\n \t\t$data['allow_manual_reactivation'] = '1';\r\n \t\t$data['active'] = '0';\r\n \t\t$data['last_activation_message'] = __('Automatic reactivation fails.','seo-pressor');\r\n \t\tWPPostsRateKeys_Settings::update_options($data);\r\n \t\t*/\r\n \t}\r\n }",
"public static function check_plugin_review() {\n \n \tglobal $current_user;\n \t$user_id = $current_user->ID;\n\n\t\tif (!current_user_can('publish_posts')) {\n\t\t\treturn;\n\t\t}\n\n $show_review_notice = false;\n $activation_timestamp = get_site_option(self::ACTIVATE_TIMESTAMP_OPTION);\n $review_dismissal_array = get_user_meta($user_id, self::REVIEW_DISMISS_OPTION, true);\n $dismiss_defer_period = isset($review_dismissal_array['dismiss_defer_period']) ? $review_dismissal_array['dismiss_defer_period'] : 0;\n $dismiss_timestamp = isset($review_dismissal_array['dismiss_timestamp']) ? $review_dismissal_array['dismiss_timestamp'] : time();\n \n if ($dismiss_timestamp + $dismiss_defer_period <= time()) {\n $show_review_notice = true;\n }\n\n if (!$activation_timestamp) {\n $activation_timestamp = time();\n add_site_option(self::ACTIVATE_TIMESTAMP_OPTION, $activation_timestamp);\n }\n\n // display review message after a certain period of time after activation\n if ((time() - $activation_timestamp > self::REVIEW_FIRST_PERIOD) && $show_review_notice == true) {\n add_action('admin_notices', array('YARPP_Admin', 'display_review_notice'));\n }\n }",
"function Trigger_CheckPasswords(&$tNG) {\r\n $myThrowError = new tNG_ThrowError($tNG);\r\n $myThrowError->setErrorMsg(\"Could not create account.\");\r\n $myThrowError->setField(\"Pass\");\r\n $myThrowError->setFieldErrorMsg(\"The two passwords do not match.\");\r\n return $myThrowError->Execute();\r\n}",
"public function getSuccessfulAttempts(): int;",
"function trial_expiration_checker() {\n \n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the value of modalidadCarreraId | public function getModalidadCarreraId()
{
return $this->modalidadCarreraId;
} | [
"public function getModalidadCarrera()\n\t{\n\t\treturn $this->modalidadCarrera;\n\t}",
"public function getId_comentario(){\n\t\treturn $this->id_comentario;\n\t}",
"public function getCarreraId()\r\n {\r\n return $this->Carrera_id;\r\n }",
"public function getCarreraId()\n {\n return $this->carrera_id;\n }",
"public function getColumnaCabeceraId()\n {\n return $this->columna_cabeceraId;\n }",
"private function getCuestionarioId(){\n\t\treturn $this->cuestionario_id;\n\t}",
"public function getModalidad()\n {\n if ($this->modalidad=='C') {\n return $this->getTextoModalidad();\n }\n \n if ($this->modalidad=='P') {\n return $this->getTextoModalidad();\n }\n }",
"public function getIdContador()\n {\n return $this->id_contador;\n }",
"public function getIdCompetencia()\n {\n return $this->idCompetencia;\n }",
"public function getIdCompetencia()\n {\n return $this->id_competencia;\n }",
"public function getConferenciaId()\r\n {\r\n return $this->Conferencia_id;\r\n }",
"public function getIdCarga()\n {\n return $this->id_carga;\n }",
"public function getIdComunidad()\n {\n return $this->idComunidad;\n }",
"public function getIdContaPoupanca(){\r\n \treturn $this->id_conta;\r\n }",
"public function getIdCobro()\n {\n return $this->id_cobro;\n }",
"public function getIdContato()\n {\n return $this->id_contato;\n }",
"public function getContratoId()\n\t{\n\t\treturn $this->contrato_id;\n\t}",
"public function getIdMovimentoConectividadeCircuito()\n {\n $movimento = Lov::findFirst(\"tipo=16 AND valor=12\");\n return $movimento->getId();\n }",
"public function getIdContrato()\n {\n return $this->id_contrato;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set convert images to indexed flag | public function setConvertImagesToIndexed($convertImagesToIndexed)
{
$this->setArgument(sprintf('-dConvertImagesToIndexed=%s', $convertImagesToIndexed ? 'true' : 'false'));
return $this;
} | [
"public function toIndexed() : IndexedRasterImage;",
"public function markAsIndexed(): void\n {\n // TODO: Implement markAsIndexed() method.\n }",
"public function getImageIndex () {}",
"public function markAsIndexed(): void\n {\n return; // Perform some kind of action to indicate this object has been indexed\n }",
"public function uses_file_indexing() {\n return true;\n }",
"public function prepareForIndexing();",
"public function update_indexables()\n {\n }",
"public function enableIndex()\n {\n $this->index = true;\n }",
"public function setIteratorIndex ($index) {}",
"function imagecolorsforindex ($image, $index) {}",
"function imagecolorset ($image, $index, $red, $green, $blue) {}",
"private function initIndexes(): void\n {\n if (empty($this->uniques)) {\n return;\n }\n\n $this->indexes = [];\n foreach ($this->uniques as $key) {\n $values = \\array_column($this->rows, $key);\n $values = \\array_map('json_encode', $values);\n $this->indexes[$key] = \\array_flip($values);\n }\n }",
"public function setCompressionIndex($index, $comp_method, $comp_flags){}",
"public function setimageinterlacescheme($interlace)\n {\n }",
"public function generateIndex(): void\n {\n /** @var SplFileInfo $file */\n foreach (new DirectoryIterator($this->storage_path) as $file) {\n if ($file->getExtension() === $this->file_extension) {\n $this->indexFile($file);\n }\n }\n\n if ($this->cache) {\n $this->generateIndexCache();\n }\n\n }",
"public function RebuildIndex()\n {\n $databaseQuery = \"SELECT a.*, b.SponserName FROM cl_magazines_pages_list as a LEFT JOIN cl_magazines_list as b ON a.MagazineID=b.ID ORDER BY a.ID\";\n\n $this->m_Database->Query($databaseQuery);\n $this->m_Database->Execute();\n\n $results = $this->m_Database->GetResultset();\n $submit = array();\n\n foreach ($results as $row) {\n\n // If there is no image dont index this element. and log the error\n if (!empty($row[\"Image\"]))\n {\n $submit[] = array(\"index\" =>\n array(\n \"_index\" => \"99design\",\n \"_type\" => \"page\",\n \"_id\" => $row[\"ID\"]\n ));\n $submit[] = array(\n \"catalog_id\" => $row[\"MagazineID\"],\n \"page_number\" => $row[\"PageNumber\"],\n \"description\" => $row[\"HtmlDescription\"],\n \"img\" => $row[\"Image\"],\n \"keywords\" => explode(\",\", $row[\"HtmlKeywords\"]),\n \"owner\" => strtolower($row[\"SponserName\"])\n );\n }\n else\n {\n $this->m_Logger->warning(\"No image found while rebuilding the index\");\n }\n }\n\n echo $this->m_HttpInterface->Post(\"_bulk\", $submit);\n }",
"public function buildIndices()\n {\n // Search for files\n $this->findFiles();\n\n // Scrap the existing indices, if any\n\n if ($this->indices) {\n // Condition: indices already built\n $this->indices->clear();\n } else {\n // Condition: indices not yet initialized\n $this->indices = new Map();\n }\n\n for ($i = 0; $i < count($this->files); $i++) {\n // Condition: Not having processed the entire collection of files\n $this->buildIndex($this->files[$i]);\n }\n }",
"public function enhanceImage () {}",
"function SetFilterIndex($index){}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enable the query log on the connection. | public static function enableQueryLog()
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
$instance->enableQueryLog();
} | [
"public function enableQueryLog() {\n\t\t$this->loggingQueries = true;\n\t}",
"public function enableQueryLog()\n {\n $this->loggingQueries = true;\n }",
"public function EnableQueryLog(): void\n {\n $this->loggingQueries = true;\n }",
"public static function enableQueryLog()\n {\n static::$instance = static::$instance ?: new static();\n\n static::$connection->enableQueryLog();\n }",
"public function enableQueryLog()\n {\n // enable debug log\n if ($this->debug) {\n DB::connection()->enableQueryLog();\n }\n }",
"public function enableQueryLog();",
"static public function enableQueryLogging() {\n\t\t$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = TRUE;\n\t}",
"function queryLog($enable = true)\n{\n if ($enable) {\n DB::connection()->enableQueryLog();\n } else {\n DB::connection()->disableQueryLog();\n }\n}",
"public function enableSlowQueryLogging(): void\n {\n $this->slowQueryLogging = true;\n }",
"public function enableQueryLog() {\n\t\t$this->loggingQueries = true;\n\n\t\tif ( ! $this->logger ) {\n\t\t\t$this->setLogger( new QueryLogger );\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function enableLog() {\n $this->enableLog = true;\n }",
"public function disableQueryLogging(): void\n {\n $this->conn->disableQueryLogging();\n }",
"public function enableLog(): void\n\t{\n\t\t$this->enableLog = true;\n\t}",
"public function enableLogging() {\n $this->debug = true;\n }",
"public function disableQueryLog()\n {\n $this->loggingQueries = false;\n }",
"public function disableQueryLog() : void\n {\n $this->logQueries = false;\n }",
"protected function enableDatabaseLogging()\n {\n // TODO: Implement enableDatabaseLogging() method.\n }",
"public function enableLogging() {\n $this->getClient()->addSubscriber(\\CultuurNet\\Auth\\Guzzle\\Log\\RequestLog::getInstance());\n }",
"public function disableQueryLogging(): void\n {\n $this->queryLogging = false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation listSpotAccountsAsync List spot accounts | public function listSpotAccountsAsync($currency = null)
{
return $this->listSpotAccountsAsyncWithHttpInfo($currency)
->then(
function ($response) {
return $response[0];
}
);
} | [
"public function listAccounts($optParams = array())\n {\n $params = array();\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"Google_Service_AdSense_Accounts\");\n }",
"public function list_radius_accounts()\n {\n return $this->fetch_results('/api/s/' . $this->site . '/rest/account');\n }",
"public function listAccounts($optParams = array())\n {\n $params = array();\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"Google_Service_MyBusiness_ListAccountsResponse\");\n }",
"public function getAccounts();",
"public function getAccounts()\n {\n return $this->client->request('GET', '/accounts');\n }",
"public function getUserLibraryAccounts();",
"public function getAccountsAsync()\n {\n return $this->getAccountsAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function listAccounts($optParams = array())\n {\n $params = array();\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), 'Google\\Service\\AdExchangeBuyer\\AccountsList');\n }",
"public function getAllAccounts()\n {\n $this->params['tableName'] = 'account';\n $excludeDeleted = $this->getOrDefault('GET.excludeDeleted', '');\n $query = \"\";\n if (!empty($excludeDeleted)) {\n $query = \"deleteAt eq ''\";\n }\n\n return $this->execQuery($query, 1000, null, null, '_config');\n }",
"public function get_accounts() {\n $post_arr = array();\n return $this->doWebRequest('accounts', $post_arr);\n }",
"public function getAccountsList() {\r\n return $this->_em->getRepository(\"CommercialBankAccount\")->findAll();\r\n }",
"public function get_accounts() {\n\n\t\t/**\n\t\t * TODO: pull out object instantiation into independent functioni wherever this is being used.\n\t\t */\n\t\t$accounts_obj = phpQuery::newDocumentFileXML( $this->api_base_url.'accounts/list/?key='.$this->api_key() );\n\t\t$this->node_loop_assign( $accounts_obj, 'account', 'account_id', 'email_address' );\n\t\treturn $this->data['accounts'];\n\n\t}",
"public function getAccountList() {\n return parent::_requestData('get','accounts');\n }",
"public function listSpotAccountsWithHttpInfo($associative_array)\n {\n $request = $this->listSpotAccountsRequest($associative_array);\n\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n $responseBody = $e->getResponse() ? (string) $e->getResponse()->getBody() : null;\n if ($responseBody !== null) {\n $gateError = json_decode($responseBody, true);\n if ($gateError !== null && isset($gateError['label'])) {\n throw new GateApiException(\n $gateError,\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $responseBody\n );\n }\n }\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $responseBody\n );\n }\n\n $returnType = '\\GateApi\\Model\\SpotAccount[]';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }",
"private function get_accounts() {\n $accounts_data = session('voluum_tokens', []);\n try {\n $accounts = Account::all();\n if ($accounts->count()) {\n\n $now = (new \\DateTime(date('c')));\n $tokens_updated = false;\n foreach ($accounts as $acc) {\n if (isset($accounts_data[$acc->id]) && $accounts_data[$acc->id]['expirationTimestamp']) {\n $expire = (new \\DateTime($accounts_data[$acc->id]['expirationTimestamp']));\n if ($now > $expire) {\n $accounts_data[$acc->id] = $this->make_account_data($acc);\n $tokens_updated = true;\n }\n } else {\n $accounts_data[$acc->id] = $this->make_account_data($acc);\n $tokens_updated = true;\n }\n }\n\n if ($tokens_updated)\n session(['voluum_tokens' => $accounts_data]);\n }\n } catch (ClientException $e) {\n Log::debug('get_accounts .' . $e->getResponse()->getReasonPhrase());\n }\n return $accounts_data;\n }",
"public function List(\\Accounts\\V1\\ListRequest $req, array $options = []): \\Accounts\\V1\\ListResponse\n {\n return $this->doRequest(\n \"/accounts.v1.AccountsService/List\",\n $req,\n \"\\Accounts\\V1\\ListResponse\",\n $options\n );\n }",
"public function getAccounts()\n {\n return $this->accounts;\n }",
"public function getAccounts()\n {\n return $this->_accounts;\n }",
"public function findAllAccounts()\n {\n $results = [];\n $data = $this->soapApiService\n ->getConnection()\n ->Account_GetAll()\n ->Account_GetAllResult;\n\n if (!empty((array) $data)) {\n // It's a collection of objects\n foreach ($data->AccountHandle as $d) {\n $results[] = new AccountHandleEntity($d);\n }\n }\n\n return $results;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate order item before shipment | private function validateItem(\Magento\Sales\Model\Order\Item $orderItem, array $items)
{
if (!$this->canShipItem($orderItem, $items)) {
return false;
}
// Remove from shipment items without qty or with qty=0
if (!$orderItem->isDummy(true)
&& (!isset($items[$orderItem->getId()]) || $items[$orderItem->getId()] <= 0)
) {
return false;
}
return true;
} | [
"private function validateOrder()\n {\n $cart_id = (int) \\Tools::getValue('id_cart');\n $order = \\Order::getOrderByCartId((int)($cart_id));\n\n if (isset($cart_id) && empty($order)) { // order has not been created yet (by webhook)\n $cart = $this->context->cart;\n $customer = new \\Customer($cart->id_customer);\n $total = (float) $cart->getOrderTotal(true, \\Cart::BOTH);\n $currency = $this->context->currency;\n $this->module->validateOrder(\n $cart_id,\n \\Configuration::get('PS_OS_PAYMENT'),\n $total,\n $this->module->displayName,\n null,\n [],\n (int) $currency->id,\n false,\n $customer->secure_key\n );\n $order = \\Order::getOrderByCartId((int)($cart_id));\n if (isset($order) && is_numeric($order)) {\n $this->module->updateOrderId($cart_id, $order);\n }\n }\n }",
"public function validate($quantity, Item $item, Order $order);",
"public function validateOrder(Request $req){\n $outOfStock = false;\n $id = $req->All()['id'];\n if ($id>=0) {\n $order = Orders::find($id);\n //calcule\n $Items = $order->orderItems;\n foreach ($Items as $item) {\n $product = Product::find($item->product_id);\n if ($product->quantitySale >= $item->quantity) {\n $product->quantitySale = $product->quantitySale - $item->quantity;\n $product->quantity = $product->quantity - $item->quantity;\n $product->save();\n $order->state = 1;\n } else {\n $item->state = \"missing\";\n $item->save();\n $outOfStock = true;\n break;\n }\n }\n $order->save();\n\n }\n if ($outOfStock) {\n return response()->json('refuse'); \n } else {\n return response()->json('validate');\n }\n \n }",
"function bibdk_reservation_form_step_3_validate($form, &$form_state) {\n if (isset($form_state['triggering_element']['#step']) || $form_state['triggering_element']['#name'] == 'prev') {\n return;\n }\n\n $orderId = BibdkReservationOrderObject::GetObject()->getOrderId();\n if (!isset($orderId)) {\n $result = bibdk_reservation_form_step_4_do_order();\n if (isset($result['error'])) {\n form_set_error('form', t($result['error'], array(), array('context' => 'bibdk_reservation:error')));\n }\n else {\n $orderId = $result['orderId'];\n BibdkReservationOrderObject::GetObject()->setOrderId($orderId);\n }\n }\n\n // either way set sb_kopi selfpickup setting if needed\n $sb_value = BibdkReservationOrderObject::GetObject()->getArticleDirect();\n if (module_exists('bibdk_usersettings')) {\n bibdk_usersettings_user_settings_set('bibdk_actions_sb_selfpickup', $sb_value);\n }\n}",
"public function testValidOrder()\n\t{\n\t\t$cart = new Cart();\n\t\t$customer = new Customer();\n\t\t$payments = new Mollie_Testing_Impostor($this->controller);\n\t\t$this->assertTrue($payments->_validate($cart, $customer));\n\t}",
"public function validateSalesOrderCreation()\n {\n if (!$this->_role->getWebsiteIds()) {\n $this->_forward();\n }\n\n // check whether there is disallowed website in request?\n }",
"public function testOrderWithValidationErrors()\n {\n $quoteId = 1;\n list($quote) = $this->mockQuote($quoteId);\n $validatorResult = $this->mockQuoteValidation($quote, 'checkout');\n $validatorResult->expects($this->once())->method('hasMessages')->willReturn(true);\n $this->assertFalse($this->management->order($quoteId));\n }",
"abstract public function validate( $item );",
"public static function checkValidOrder()\n {\n $pendingOrder = static::byUserId(auth()->user()->getKey())->useDefault()\n ->whereStatus(static::STATUS_PENDING)->get();\n foreach ($pendingOrder as $order) {\n if (!$order->isValid()) {\n $order->cancelOrder();\n }\n }\n }",
"protected function _validate()\n {\n $this->_areItemsValid = false;\n $this->_areTotalsValid = false;\n\n $referenceAmount = $this->_salesEntity->getGrandTotal();\n\n $itemsSubtotal = 0;\n foreach ($this->_items as $i) {\n $itemsSubtotal = $itemsSubtotal + $i['qty'] * $i['amount'];\n }\n $sum = $itemsSubtotal + $this->_totals[self::TOTAL_TAX];\n if (!$this->_isShippingAsItem) {\n $sum += $this->_totals[self::TOTAL_SHIPPING];\n }\n if (!$this->_isDiscountAsItem) {\n $sum -= $this->_totals[self::TOTAL_DISCOUNT];\n }\n /**\n * numbers are intentionally converted to strings because of possible comparison error\n * see http://php.net/float\n */\n // match sum of all the items and totals to the reference amount\n if (sprintf('%.4F', $sum) == sprintf('%.4F', $referenceAmount)) {\n $this->_areItemsValid = true;\n }\n\n // PayPal requires to have discount less than items subtotal\n if (!$this->_isDiscountAsItem) {\n $this->_areTotalsValid = round($this->_totals[self::TOTAL_DISCOUNT], 4) < round($itemsSubtotal, 4);\n } else {\n $this->_areTotalsValid = $itemsSubtotal > 0.00001;\n }\n\n $this->_areItemsValid = $this->_areItemsValid && $this->_areTotalsValid;\n }",
"abstract protected function validate($item);",
"function wcfmmp_new_order_check($order, $updated_props) {\n if (!$order || !is_a($order, 'WC_Order'))\n return;\n if (defined('WCFM_MANUAL_ORDER'))\n return;\n if (defined('WC_BOOKINGS_VERSION'))\n return;\n if (defined('WC_APPOINTMENTS_VERSION'))\n return;\n $order_id = $order->get_id();\n if ($order_id) {\n if (get_post_meta($order_id, '_wcfmmp_order_processed', true))\n return;\n $order_posted = get_post($order_id);\n $this->wcfmmp_checkout_order_processed($order_id, $order_posted, $order);\n }\n }",
"public function validate() {\n return $this->post('/order/' . $this->orderId . '/validate', (object) null);\n }",
"private function _check_items() {\n $is_valid = true;\n if(count($this->_data['items']) <= 0) {\n $is_valid = false;\n $this->add_error('the order must contain at least one item');\n }\n return $is_valid;\n }",
"public function onPreSync(OrderItemEvent $event)\n {\n if ($this->isOrderLocked($event)) {\n return;\n }\n\n if (!$event->hasItem()) {\n throw new LogicException('Item must be set.');\n }\n }",
"public function testProcessInValidOrder()\n {\n\n $this->assertTrue(true);\n }",
"public function testReturnsTrueFromOrderValidation()\n {\n $data = [\n 'order_id' => 777,\n 'total' => '123.45',\n 'status' => 1\n ];\n\n $hash = 'qwert';\n\n $grandTotal = 123.45;\n\n $modelOrderMock = $this->getModelMock('sales/order', [\n 'getId',\n 'getGrandTotal'\n ]);\n\n $modelOrderMock->expects($this->once())\n ->method('getId')\n ->willReturn($data['order_id']);\n\n $modelOrderMock->expects($this->once())\n ->method('getGrandTotal')\n ->willReturn($grandTotal);\n\n $this->replaceByMock('model', 'sales/order', $modelOrderMock);\n\n\n $helperDataMock = $this->getHelperMock('oggetto_payment', [\n 'convertPriceFromFloatToCommaFormat','getHashedSignature'\n ]);\n\n $helperDataMock->expects($this->once())\n ->method('convertPriceFromFloatToCommaFormat')\n ->with($grandTotal)\n ->willReturn($data['total']);\n\n $helperDataMock->expects($this->once())\n ->method('getHashedSignature')\n ->with($data)\n ->willReturn($hash);\n\n $data['hash'] = $hash;\n\n $this->replaceByMock('helper', 'oggetto_payment', $helperDataMock);\n\n $this->assertEquals(true, $this->_modelOrder->validate($modelOrderMock, $data));\n }",
"function validateOrderlines($order_id, $sku, $validated = true) {\n\n $end_point = 'orders/'.$order_id;\n // judge whether this order is validated or cancelled\n // if ($validated) $new_state = 2;\n // else $new_state = 4;\n $new_state = 2;\n\n // construct the request body\n $request = array('order_id' => $order_id, 'new_state' => $new_state, 'sku' => $sku);\n $request_JSON = json_encode($request);\n\n $result = $this->apiPost($end_point, $request_JSON);\n\n return $result;\n }",
"function allowOrderItemDeletion($orderitem_id){\r\n\t\t$criteria = 'OrderItem.id =\"' .$orderitem_id.'\"';\t\t \r\n\t\t$order_item = $this->OrderItem->find($criteria);\r\n\t\t\r\n\t\tif((strcmp($order_item['OrderItem']['status'], \"shipped\") == 0)\r\n\t\t|| (!empty($order_item['OrderItem']['shipment_id']))) {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// Etc...\r\n\t\t\r\n\t\treturn TRUE;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Grabs the recent featured podcasts for the home page. | function getFeaturedPodcasts()
{
return wp_get_recent_posts(
[
'numberposts' => 3,
'category_name' => 'Podcasts'
]
);
} | [
"function accouk_homepage_latest_posts() {\n\n $args = array('post_type' => 'post', 'category_name' => 'blog', 'posts_per_page' => 4, 'orderby' => 'date', 'order' => 'DESC');\n $query = new WP_Query( $args );\n\n if ( $query->have_posts() ) {\n\n echo '<ul class=\"post-list homepage-post-list\">';\n\n \twhile ( $query->have_posts() ) {\n \t\t$query->the_post(); ?>\n\n <li>\n <a href=\"<?php the_permalink(); ?>\" title=\"<?php the_title(); ?>\">\n <div class=\"main-tile-part\">\n <?php echo accouk_post_tile_image(); ?>\n <span><h3><?php the_title(); ?></h3></span>\n </div>\n <div class=\"sub-tile-part\">\n <span class=\"excerpt\"><?php the_excerpt(); ?></span>\n <span class=\"date\"><?php echo get_the_date(); ?></span>\n <span class=\"cta\">Read Now</span>\n </div>\n </a>\n </li>\n <?php\n \t}\n\n \techo '</ul>';\n\n } else {\n \techo \"<p>Sorry, an error has occurred</p>\";\n }\n\n}",
"function cdc_get_top_stories( $number_of_days = 1, $posts_per_page = 5 ){\n\t$output = array();\n\t$cache_key = 'cdc_top_posts_' . $number_of_days . '_' . $posts_per_page;\n\t\n\tif ( function_exists( 'wpcom_vip_top_posts_array' ) ) {\n\t\t$top_posts = wp_cache_get( $cache_key );\n\n\t\tif( false === $top_posts ) {\n\t\t\t$top_posts = wpcom_vip_top_posts_array( $number_of_days, $posts_per_page );\n\n\t\t\tif( is_array( $top_posts ) ) {\n\t\t\t\t$filtered_top_posts = array();\n\n\t\t\t\tforeach( $top_posts as $top_post ) {\n\t\t\t\t\t$post = get_post( $top_post['post_id'] );\n\n\t\t\t\t\tif( $post && $post->post_type == 'post' )\n\t\t\t\t\t\t$filtered_top_posts[] = $top_post;\n\t\t\t\t}\n\n\t\t\t\t$top_posts = $filtered_top_posts;\n\t\t\t}\n\n\t\t\twp_cache_add( $cache_key, $top_posts );\n\t\t}\n\n\t\tif ( is_array( $top_posts ) )\n\t\t\t$output = $top_posts;\n\t} else {\n\t\t$args = array(\n\t\t\t'numberposts' => (int) $posts_per_page,\n\t\t\t'orderby' => 'modified'\n\t\t);\n\n\t\t$rand_posts = get_posts( $args );\n\t\t$views = 10;\n\n\t\tforeach( $rand_posts as $post ) :\n\t\t\t$output[] = array(\n\t\t\t\t'post_id' => $post->ID,\n\t\t\t\t'post_title' => get_the_title( $post->ID ),\n\t\t\t\t'post_permalink' => get_permalink( $post->ID ),\n\t\t\t\t'views' => $views\n\t\t\t);\n\n\t\t\t$views--;\n\t\tendforeach;\n\t}\n\t\n\treturn $output;\n}",
"public function getRecentPosts()\n\t{\n\t\t$sql = \"SELECT * FROM posts WHERE published = 1 ORDER BY created_at DESC LIMIT 4\";\n\t\treturn $this->findAll($sql, 'obj');\n\t}",
"function display_home_featured_posts() {\n\t\t\t//$catquery = new WP_Query( 'cat=32&posts_per_page=3' );\n\t\t\t$catquery = new WP_Query( \n\t\t\t\tarray( \n\t\t\t\t\t'category_name' => 'featured-home',\n\t\t\t\t\t'post_type' => 'post',\n\t\t\t\t\t'ignore_sticky_posts' => true,\n\t\t\t\t\t'posts_per_page' => 2,\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ( $catquery->have_posts() ) {\n\t\t\t\t// The loop\n\t\t\t\techo '<div class=\"row\">';\n\t\t\t\twhile ( $catquery->have_posts() ) :\n\t\t\t\t\t$catquery->the_post();\n\t\t\t\t\t?>\n\t\t\t\t\t<?php get_template_part( 'template-parts/content-home-featured' ); ?>\n\t\t\t\t<?php\n\t\t\t\tendwhile;\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Nothing found..\n\t\t\t}\n\t\t\t// Reset Post Data\n\t\t\twp_reset_postdata();\n\t\t}",
"function front_page_posts() {\n\n // Get events marked as Show on home sort by\n // start_date, start_date should not be empty\n $events_args = array(\n 'post_type' => array('event'),\n 'posts_per_page' => '-1',\n 'meta_key' => '_igv_event_start_date',\n 'orderby' => 'meta_value',\n 'order' => 'ASC',\n 'meta_query' => array(\n array(\n 'key' => '_igv_event_show_home',\n 'value' => 'on',\n 'compare' => '='\n )\n )\n );\n\n $events = get_posts( $events_args );\n\n\n $works_args = array(\n 'post_type' => array('work'),\n 'posts_per_page' => '-1',\n 'meta_query' => array(\n array(\n 'key' => '_igv_work_show_home',\n 'value' => 'on',\n 'compare' => '='\n )\n )\n );\n\n $works = get_posts( $works_args );\n\n $posts = array();\n\n if (!empty($events) || !empty($works)) {\n $total = count($events) + count($works);\n\n $total_counter = 0;\n $events_counter = 0;\n $works_counter = 0;\n\n // iterate over total num of posts\n while ($total_counter < $total) {\n\n // if event, add to posts array\n if (isset($events[$events_counter])) {\n $posts[] = $events[$events_counter];\n }\n\n // if work, add to posts array\n if (isset($works[$works_counter])) {\n $posts[] = $works[$works_counter];\n }\n\n // increment counters\n if (isset($events[$events_counter]) && isset($works[$works_counter])) {\n // increment both\n $events_counter++;\n $works_counter++;\n } else {\n // increment individual\n if (isset($events[$events_counter])) {\n $events_counter++;\n }\n if (isset($works[$works_counter])) {\n $works_counter++;\n }\n }\n\n // total counters\n $total_counter = $events_counter + $works_counter;\n }\n }\n\n return $posts;\n}",
"function ijdh_PopularbyWeek()\n{\n\n ijdhNoPosts();\n\n /// Start the Loop\n\n add_filter('posts_where', 'filter_week');\n query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC&post_type=any');\n\n while ( have_posts() ) : the_post(); ?>\n\n\t\t<!-- Displays most recent posts with thumbnail and excerpt. -->\n\n <li id=\"post-<?php the_ID(); ?>\" <?php post_class(); ?>>\n\n\t <?php\n ijdh_getCategory ();\n ijdh_show_thumb();\n?>\n <div class=\"entry-content\">\n\n <h2 class=\"entry-title\">\n <a href=\"<?php the_permalink(); ?>\" title=\"<?php printf( esc_attr__( 'Permalink to %s', 'boilerplate' ), the_title_attribute( 'echo=0' ) ); ?>\" rel=\"bookmark\"><?php the_title(); ?></a>\n </h2>\n\n <?php ijdh_show_excerpt($postID); ?>\n\n </div><!-- .entry-content -->\n\n <div class=\"entry-utility\">\n <?php edit_post_link( __( 'Edit', 'boilerplate' ), '' ); ?>\n </div><!-- .entry-utility -->\n\n </li><!-- #post-## -->\n\n <?php endwhile; wp_reset_query(); ?>\n\n <?php remove_filter( 'posts_where', 'filter_week' ); ?>\n\n <?php ijdh_pagination();\n\n}",
"public static function get_upcoming_talks_posts() {\n\t\t$args = array(\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post_status' => 'future',\n\t\t\t'post_type' => static::$post_type,\n\t\t\t'order' => 'ASC',\n\n\t\t\t'no_found_rows' => true,\n\t\t\t'update_post_term_cache' => false,\n\t\t);\n\t\t$query = new WP_Query( $args );\n\t\treturn $query->posts;\n\t}",
"public function findFrontpagePosts()\n {\n $qb = $this->createQueryBuilder('a');\n\n $qb->orderBy('a.createdAt', 'desc');\n\n return $qb->getQuery()->getResult();\n }",
"function ijdh_PopularAlltime()\n{\n\n ijdhNoPosts();\n\n /// Start the Loop\n query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC&post_type=any');\n\n while ( have_posts() ) : the_post(); ?>\n\n\t\t<!-- Displays most recent posts with thumbnail and excerpt. -->\n\n <li id=\"post-<?php the_ID(); ?>\" <?php post_class(); ?>>\n\n\t <?php\n ijdh_getCategory ();\n ijdh_show_thumb();\n?>\n <div class=\"entry-content\">\n\n <h2 class=\"entry-title\">\n <a href=\"<?php the_permalink(); ?>\" title=\"<?php printf( esc_attr__( 'Permalink to %s', 'boilerplate' ), the_title_attribute( 'echo=0' ) ); ?>\" rel=\"bookmark\"><?php the_title(); ?></a>\n </h2>\n\n <?php ijdh_show_excerpt($postID); ?>\n\n </div><!-- .entry-content -->\n\n <div class=\"entry-utility\">\n <?php edit_post_link( __( 'Edit', 'boilerplate' ), '' ); ?>\n </div><!-- .entry-utility -->\n\n </li><!-- #post-## -->\n\n <?php endwhile; wp_reset_query(); ?>\n\n\t\t <?php ijdh_pagination();\n\n}",
"function get_latest_news() {\n $latestnews = new WP_Query(array(\n 'post_type' => 'post',\n 'posts_per_page' => 5, \n 'order' => 'DESC',\n 'orderby' => 'date',\n ));\n \n if($latestnews->have_posts()) :\n ?>\n <h3>latest news</h3>\n <div class=\"foot-news-holder\">\n <?php\n while($latestnews->have_posts()) :\n $latestnews->the_post();\n ?>\n <a class=\"foot-news-link\" href=\"<?php echo get_permalink(get_the_ID()); ?>\"><?php the_title(); ?></a>\n <?php\n endwhile;\n ?>\n </div> \n <?php\n endif;\n}",
"public function getLatest()\n {\n\n $recent_posts = wp_get_recent_posts([\n 'post_type' => Uitzending::POST_TYPE_TV,\n 'numberposts' => 1,\n 'orderby' => 'post_date',\n 'order' => 'DESC'\n ], ARRAY_A);\n\n if (count($recent_posts) > 0) {\n $sc = new Shortcodes();\n $sc->addYoutubePlayer([\n 'uitzending' => $this->getYoutubePlayer($recent_posts[0]['ID'])\n ]);\n\n }\n\n }",
"function getLatestPosts($count = -1) {\n $query = new WP_Query([\n 'post_type' => 'post',\n 'posts_per_page' => $count\n ]);\n\n return $query->get_posts();\n}",
"function artwork_page_list_recent() {\n $content = array();\n\n $query = new EntityFieldQuery();\n $query\n ->entityCondition('entity_type', 'artwork')\n ->propertyOrderBy('created', 'DESC')\n ->fieldCondition('field_artist', 'value', 'Da Vinci', 'CONTAINS', 0)\n ->range(0, 5);\n $result = $query->execute();\n\n $artworks = artwork_load_multiple(array_keys($result['artwork']));\n foreach ($artworks as $artwork) {\n $content[$artwork->aid] = artwork_page_view($artwork, 'teaser');\n }\n\n return $content;\n}",
"public function latestAction()\n {\n $category = null;\n\n if (isset($this->settings['latestPosts']['categoryUid'])) {\n $category = $this->objectManager\n ->get(CategoryRepository::class)\n ->findByUid((int) $this->settings['latestPosts']['categoryUid']);\n }\n\n $this->view->assign('posts', $this->findPosts($category));\n }",
"public static function get_post_featured()\n {\n return PostModel::where('publish', 1)->orderBy('created_at', 'desc')->take(3)->get();\n }",
"private function get_featured_films() {\r\n $home_page_id = get_option('page_on_front');\r\n $featured = get_field('film_carousel', $home_page_id);\r\n\r\n return $featured;\r\n }",
"public function getPublishedPosts()\n\t{\n\t\t$sql = \"SELECT * FROM posts WHERE published = 1 ORDER BY created_at DESC LIMIT 6\";\n\t\treturn $this->findAll($sql, 'obj');\n\t}",
"function getBlogStories()\n{\n return wp_get_recent_posts(\n [\n 'numberposts' => 3,\n 'category_name' => 'Blog'\n ]\n );\n}",
"function display_first_3_latest_blog_post() {\n\t$the_query = new WP_Query( array(\n\t \t'post_type' => 'post',\n\t \t'posts_per_page' => 3,\n\t));\n\t if ( $the_query->have_posts() ) : ?>\n\t\t\n\t\t<?php $return_html = '<div class=\"row featured-post\">' ?>\n\n\t \t<?php foreach( $the_query->posts as $post ): ?>\n\n\t\t<!-- calculation of reading time -->\n\t\t<?php\n\t\t$content = get_post_field('post_content', $post->ID);\n\t\t$word_count = str_word_count( strip_tags( $content ) );\n\t\t// echo $word_count;\n\t\t$readingtime = ceil($word_count / 200);\n\t\tif ($readingtime == 1) {\n\t\t\t// $timer = \" minute\";\n\t\t\t $timer = \" min read\";\n\t\t} else {\n\t\t\t// $timer = \" minutes\";\n\t\t\t $timer = \" min read\";\n\t\t}\n\t\t$totalreadingtime = $readingtime . $timer;\n\t\t// echo $totalreadingtime;\n\t\t$categories = get_the_terms( $post->ID, 'category' );\n\t\t$category_id = get_cat_ID( $categories[0]->name);\n\t\t$category_link = get_category_link( $category_id );\n\t\n\t\t$return_html .= '\n\t\t\n\t\t<div class=\"featured-card\">\n\t\t\t\t<div class=\"featured-post-picture\"> <a href=\" '.get_the_permalink($post->ID).'\">'.get_the_post_thumbnail($post->ID).'</a></div>\n\t\t\t<div class=\"featured-post-detail\">\n\t\t\t\t<div class=\"featured-post-category\"><a href=\"'.$category_link.'\">'.$categories[0]->name.'</a></div>\n\t\t\t\t<div class=\"featured-post-readtime\"> <span class =\"post_date\">'.get_the_date().'</span>\t'. \"- \" .'<span class =\"post_read_time\">'.$totalreadingtime.'</span></div>\n\t\t\t\t<h3 class=\"featured-post-title\"> <a href=\" '.get_the_permalink($post->ID).'\">'. get_the_title($post->ID).'</a></h3>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t'; \n\n\tendforeach;\n\n\t$return_html .= '</div>';\n\tendif;\n\t// wp_reset_postdata(); \n\treturn $return_html;\n\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the server is apache, we will output a form for append htaccess | private function apache_output() {
ob_start();
?>
<div class="wd-well">
<?php if ( $this->check() ): ?>
<p>
<?php _e( "PHP execution is locked down.", wp_defender()->domain ) ?>
</p>
<?php else: ?>
<p>
<?php _e( "We will place .htaccess files into each of these directories to to prevent PHP execution.", wp_defender()->domain ) ?>
</p>
<?php endif; ?>
<form id="protect_upload_dir_frm" method="post">
<?php $this->generate_nonce_field( 'apply_htaccess_upload' ) ?>
<input type="hidden" name="action"
value="<?php echo $this->generate_ajax_action( 'apply_htaccess_upload' ) ?>">
<?php if ( $this->check() ): ?>
<input type="hidden" name="type" value="revert">
<input type="submit" class="button button-grey"
value="<?php esc_attr_e( "Revert", wp_defender()->domain ) ?>">
<?php else: ?>
<input type="hidden" name="type" value="protect">
<input type="submit" class="button wd-button"
value="<?php esc_attr_e( "Add .htaccess file", wp_defender()->domain ) ?>">
<?php endif; ?>
</form>
</div>
<?php
return ob_get_clean();
} | [
"function htaccess_form() {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<form id='mainform' method='post' action='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=acphtaccess_do'>\n<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />\n<div class='information-box'>\n\t<table cellpadding='0' cellspacing='0'>\n\t<tr>\n\t\t<td width='1%' valign='top'>\n \t\t\t<img src='{$this->ipsclass->skin_acp_url}/images/folder_components/security/id_card_ok.png' alt='information' />\n\t\t</td>\n\t\t<td width='100%' valig='top' style='padding-left:10px'>\n \t\t\t<h2 style='margin:0px'>后台 .htaccess 权限保护</h2>\n\t\t\t <p style='margin:0px'>\n\t\t\t \t<br />\n\t\t\t \t论坛可以生成 .htaccess 保护文件到您的后台文件夹.\n\t\t\t\t<br />\n\t\t\t\t<br />\n\t\t\t\t<strong>请注意</strong>\n\t\t\t\t<br />\n\t\t\t\t使用这一工具将覆盖后台当前的保护文件. 在您保存设置后您将被立即要求输入会员名称和会员密码. 额外的, 如果您选择更改后台文件夹的名称, 请记得通过 FTP 删除这个文件否则您将无法登入后台.\n\t\t\t\t<br />\n\t\t\t\t<br />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend><strong>会员名称</strong></legend>\n\t\t\t\t\t<input type='text' name='name' size='40' value='{$_POST['name']}' />\n\t\t\t\t</fieldset>\n\t\t\t\t<br />\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend><strong>会员密码</strong></legend>\n\t\t\t\t\t<strong>请注意您的会员密码将被截取为前 8 个字符</strong><br />\n\t\t\t\t\t<input type='password' name='pass' size='40' value='{$_POST['pass']}' />\n\t\t\t\t</fieldset>\n\t\t\t\t<br />\n\t\t\t\t<input type='submit' value=' 执行 ' />\n\t\t\t </p>\n\t\t</td>\n\t</tr>\n\t</table>\n</div>\n</form>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}",
"function do_htaccess()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$name = '.htaccess';\n\t\t$msg = array();\n\t\t$dirs = array( ROOT_PATH . 'cache',\n\t\t\t\t\t ROOT_PATH . 'skin_acp',\n\t\t\t\t\t ROOT_PATH . 'style_avatars',\n\t\t\t\t\t ROOT_PATH . 'style_emoticons',\n\t\t\t\t\t ROOT_PATH . 'style_images',\n\t\t\t\t\t ROOT_PATH . 'style_captcha',\n\t\t\t\t\t ROOT_PATH . 'uploads' );\n\n\t\t$towrite = <<<EOF\n#<ipb-protection>\n<Files ~ \"^.*\\.(php|cgi|pl|php3|php4|php5|php6|phtml|shtml)\">\n Order allow,deny\n Deny from all\n</Files>\n#</ipb-protection>\nEOF;\n\n\t\t//-----------------------------------------\n\t\t// Do it!\n\t\t//-----------------------------------------\n\n\t\tforeach( $dirs as $directory )\n\t\t{\n\t\t\tif ( $FH = @fopen( $directory . '/'. $name, 'w' ) )\n\t\t\t{\n\t\t\t\tfwrite( $FH, $towrite );\n\t\t\t\tfclose( $FH );\n\n\t\t\t\t$msg[] = \"Запись «.htaccess» в директорию $directory...\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$msg[] = \"Невозможно произвести запись в $directory...\";\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Done...\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->main_msg = implode( \"<br />\", $msg );\n\t\t$this->security_overview();\n\t}",
"protected function writehtaccess()\n {\n $content = '# Deny access to supersake\n<Files supersake>\n\tOrder allow,deny\n\tDeny from all\n</Files>';\n }",
"function instant_ide_manager_htaccess_open() {\r\n\t\r\n\tcheck_ajax_referer( 'iide-ajax-nonce', 'security' );\r\n\t\r\n\tif ( file_exists( IIDEM_IIDE_DIR . '/.htaccess' ) )\r\n\t\techo file_get_contents( IIDEM_IIDE_DIR . '/.htaccess' );\r\n\t\t\r\n\texit();\r\n\t\r\n}",
"function add_cp_htaccess() {\n \n\t\t$htpass_path = $this->prpath;// . '/'; \n\t\t$htaccess_path = $this->app_location . '/cp/'; \n\t\t$this->log .= '<br>HTACCESS PATH:'. $htpass_path.'>'.\t$htaccess_path;\t\n\t\t\n\t\tif (is_dir($htaccess_path)) {\n\t\t\n\t\t\t$htpass_file = $htpass_path . 'htpasswd-'.$this->posted_appname;//per app\n\t\t\t$htaccess_file = $htaccess_path . '.htaccess';\n\t\t $this->log .= '<br>HTACCESS FILE:'. $htpass_file.'>'.\t$htaccess_file;\t\n\t }\n\t\telse\n\t\t return false;\n\t\t\t\n\t\t// Initializing class htaccess as $ht\n\t\t$ht = new htaccess($htaccess_file, $htpass_file);//\"/var/www/.htaccess\",\"/var/www/htpasswd\");\n\t\t// Adding user\n\t\t$ht->addUser($this->posted_appname, $this->posted_password);\n\t\t\n\t\t// Changing password for User\n\t\t//$ht->setPasswd(\"username\",\"newPassword\");\n\t\t// Getting all usernames from set password file\n\t\t$users = $ht->getUsers();\n\t\tfor($i=0;$i<count($users);$i++){\n\t\t\t$this->log .= $users[$i];\n\t\t}\n\t\t// Deleting user\n\t\t//$ht->delUser(\"username\");\n\t\t// Setting authenification type\n\t\t// If you don't set, the default type will be \"Basic\"\n\t\t$ht->setAuthType(\"Basic\");\n\t\t// Setting authenification area name\n\t\t// If you don't set, the default name will be \"Internal Area\"\n\t\t$ht->setAuthName(\"Control Panel\");\n\t\t//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t// finally you have to process addLogin()\n\t\t// to write out the .htaccess file\n\t\t$ht->addLogin();\n\t\t// To delete a Login use the delLogin function\n\t\t//$ht->delLogin();\t\n\t\t\n\t\treturn true;\n\t}",
"public function writeHtaccessSection()\n {\n $adminDir = $this->getAdminDir();\n $source = \"\\n# start ~ module watermark section\n<IfModule mod_rewrite.c>\nRewriteEngine On\nRewriteCond expr \\\"! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}*/$adminDir/*'\\\"\nRewriteRule [0-9/]+/[0-9]+\\\\.jpg$ - [F]\n</IfModule>\n# end ~ module watermark section\\n\";\n\n $path = _PS_ROOT_DIR_ . '/.htaccess';\n\n if (false === file_put_contents($path, $source . file_get_contents($path))) {\n $this->context->controller->errors[] = $this->trans('Unable to add watermark section to the .htaccess file', [], 'Modules.Watermark.Admin');\n\n return false;\n }\n\n return true;\n }",
"public function htaccess_admin_settings_generate_submit($form, &$form_state) {\n \\Drupal::moduleHandler()->invokeAll(\"htaccess_generate_before\");\n\n $htaccess_template = file_get_contents(HTACCESS_TEMPLATE_PATH);\n\n $rules_before_config = \\Drupal::config('htaccess.settings')->get('htaccess_settings_custom_settings');\n\n $redirection_config = \\Drupal::config('htaccess.settings')->get('htaccess_settings_url_prefix_redirection');\n\n $ssl_config = (\\Drupal::config('htaccess.settings')->get('htaccess_settings_ssl') == 'HTTPS_mixed_mode' ? \"%{ENV:protossl}\" : \"s\");\n\n $boot_rules = \\Drupal::config('htaccess.settings')->get('htaccess_settings_boost_module_rules');\n\n switch ($redirection_config) {\n case 'without_www':\n $without_www_config = \"RewriteCond %{HTTP_HOST} ^www\\.(.+)$ [NC]\" . PHP_EOL;\n $without_www_config.= \"RewriteRule ^ http\". $ssl_config .\"://%1%{REQUEST_URI} [L,R=301]\" . PHP_EOL;\n $with_www_config = \"#RewriteCond %{HTTP_HOST} .\" . PHP_EOL;\n $with_www_config .= \"#RewriteCond %{HTTP_HOST} !^www\\. [NC]\" . PHP_EOL;\n $with_www_config .= \"#RewriteRule ^ http\". $ssl_config .\"://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\" . PHP_EOL;\n break;\n case 'with_www':\n $without_www_config = \"#RewriteCond %{HTTP_HOST} ^www\\.(.+)$ [NC]\" . PHP_EOL;\n $without_www_config.= \"#RewriteRule ^ http\". $ssl_config .\"://%1%{REQUEST_URI} [L,R=301]\" . PHP_EOL;\n $with_www_config = \"RewriteCond %{HTTP_HOST} .\" . PHP_EOL;\n $with_www_config .= \"RewriteCond %{HTTP_HOST} !^www\\. [NC]\" . PHP_EOL;\n $with_www_config .= \"RewriteRule ^ http\". $ssl_config .\"://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\" . PHP_EOL;\n break;\n default:\n $without_www_config = \"#RewriteCond %{HTTP_HOST} ^www\\.(.+)$ [NC] \" . PHP_EOL;\n $without_www_config.= \"#RewriteRule ^ http\". $ssl_config .\"://%1%{REQUEST_URI} [L,R=301]\" . PHP_EOL;\n $with_www_config = \"#RewriteCond %{HTTP_HOST} .\" . PHP_EOL;\n $with_www_config .= \"#RewriteCond %{HTTP_HOST} !^www\\. [NC]\" . PHP_EOL;\n $with_www_config .= \"#RewriteRule ^ http\". $ssl_config .\"://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\" . PHP_EOL;\n break;\n }\n\n $symbolic_links_config = \\Drupal::config('htaccess.settings')->get('htaccess_settings_symlinks');\n\n switch ($symbolic_links_config) {\n case 'FollowSymLinks':\n $symbolic_links_config = \"+FollowSymLinks\";\n break;\n case 'SymLinksifOwnerMatch':\n $symbolic_links_config = \"+SymLinksifOwnerMatch\";\n break;\n default:\n $symbolic_links_config = \"+FollowSymLinks\";\n break;\n }\n\n $ssl_force_redirect_rules = \"# Force redirect HTTPS.\" . PHP_EOL;\n $ssl_force_redirect_rules .= \"RewriteCond %{HTTPS} off\" . PHP_EOL;\n $ssl_force_redirect_rules .= \"RewriteCond %{HTTP:X-Forwarded-Proto} !https\" . PHP_EOL;\n $ssl_force_redirect_rules .= \"RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\" . PHP_EOL;\n\n $ssl_force_redirect = (\\Drupal::config('htaccess.settings')->get('htaccess_settings_ssl') == 'HTTPS_mixed_mode' ? NULL : $ssl_force_redirect_rules);\n\n $search = array(\"%%%rules_before%%%\", \"%%%symbolic_links%%%\", \"%%%ssl_force_redirect%%%\", \"%%%with_www%%%\", \"%%%without_www%%%\", \"%%%boost_rules%%%\");\n $replace = array($rules_before_config, $symbolic_links_config, $ssl_force_redirect, $with_www_config, $without_www_config, $boot_rules);\n\n $htaccess = str_replace($search, $replace, $htaccess_template);\n\n $htaccess_profile_name = $form_state['values']['htaccess_settings_generate_name'];\n $htaccess_description = $form_state['values']['htaccess_settings_generate_description'];\n\n db_insert('htaccess')->fields(array(\n 'name' => $htaccess_profile_name,\n 'description' => $htaccess_description,\n 'htaccess' => $htaccess,\n 'created' => REQUEST_TIME,\n ))->execute();\n\n \\Drupal::moduleHandler()->invokeAll(\"htaccess_generate_after\", [$htaccess]);\n\n drupal_set_message(t('A new htaccess profile has been generated.'));\n\n drupal_goto(\"admin/config/system/htaccess/deployment\");\n }",
"function htaccess_rewrite(){\n\tglobal $SETTINGS;\n\n\t$Plugins = Plugins::getInstance( );\n\n\tif(function_exists('apache_get_modules')){\n\t\t$modules=apache_get_modules();\n\n\t\tif(!in_array('mod_rewrite',$modules))\n \t\terror('The apache module mod_rewrite must be installed. Please visit <a href=\"http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html\">Apache Module mod_rewrite</a> for more details.','Apache Error');\n\t}\n\n\t$htaccess=\n\t\t\"# .htaccess - Furasta.Org\\n\".\n\t\t\"<IfModule mod_deflate.c>\\n\".\n \t\"\tSetOutputFilter DEFLATE\\n\".\n\t\t\"\tHeader append Vary User-Agent env=!dont-vary\\n\".\n \t\"</IfModule>\\n\\n\".\n\n \t\"php_flag magic_quotes_gpc off\\n\\n\".\n\n\t\t\"RewriteEngine on\\n\".\n\t\t\"RewriteCond %{SCRIPT_NAME} !\\.php\\n\".\n\t\t\"RewriteRule ^admin[/]*$ /admin/index.php [L]\\n\".\n\t \"RewriteRule ^sitemap.xml /_inc/sitemap.php [L]\\n\".\n\t\t\"RewriteRule ^([^./]{3}[^.]*)$ /index.php?page=$1 [QSA,L]\\n\\n\".\n\n\t\t\"AddCharset utf-8 .js\\n\".\n\t\t\"AddCharset utf-8 .xml\\n\".\n\t\t\"AddCharset utf-8 .css\\n\".\n \"AddCharset utf-8 .php\";\n\n\t$htaccess = $Plugins->filter( 'general', 'filter_htaccess', $htaccess );\n\n\tfile_put_contents(HOME.'.htaccess',$htaccess);\n\t$_url='http://'.$_SERVER[\"SERVER_NAME\"].'/';\n\t\n\tif($SETTINGS['index']==0){\n\t\t$robots=\n\t\t\"# robots.txt - Furasta.Org\\n\".\n\t\t\"User-agent: *\\n\".\n\t\t\"Disallow: /admin\\n\".\n\t\t\"Disallow: /install\\n\".\n\t\t\"Disallow: /_user\\n\".\n\t\t\"Sitemap: \".$_url.\"sitemap.xml\";\n\n\t\t$robots = $Plugins->filter( 'general', 'filter_robots', $robots );\n\t}\n else{\n $robots=\n \"# robots.txt - Furasta.Org\\n\".\n \"User-agent: *\\n\".\n \"Disallow: /\\n\";\n $file=HOME.'sitemap.xml';\n if(file_exists($file))\n unlink($file);\n\n }\n\treturn file_put_contents(HOME.'robots.txt',$robots);\n}",
"public function actionWrite_htaccess()\n {\n if (!Yii::app()->request->isAjaxRequest) {\n $this->redirect(array('settings/index'));\n }\n\n if (!AppInitHelper::isModRewriteEnabled()) {\n return $this->renderJson(array('result' => 'error', 'message' => Yii::t('settings', 'Mod rewrite is not enabled on this host. Please enable it in order to use clean urls!')));\n }\n\n if (!is_file($file = Yii::getPathOfAlias('root') . '/.htaccess')) {\n if (!@touch($file)) {\n return $this->renderJson(array('result' => 'error', 'message' => Yii::t('settings', 'Unable to create the file: {file}. Please create the file manually and paste the htaccess contents into it.', array('{file}' => $file))));\n }\n }\n\n if (!@file_put_contents($file, $this->getHtaccessContent())) {\n return $this->renderJson(array('result' => 'error', 'message' => Yii::t('settings', 'Unable to write htaccess contents into the file: {file}. Please create the file manually and paste the htaccess contents into it.', array('{file}' => $file))));\n }\n\n return $this->renderJson(array('result' => 'success', 'message' => Yii::t('settings', 'The htaccess file has been successfully created. Do not forget to save the changes!')));\n }",
"function shibboleth_insert_htaccess() {\n\t$disabled = defined( 'SHIBBOLETH_DISALLOW_FILE_MODS' ) && SHIBBOLETH_DISALLOW_FILE_MODS;\n\n\tif ( got_mod_rewrite() && ! $disabled ) {\n\t\t$htaccess = get_home_path() . '.htaccess';\n\t\t$rules = array( '<IfModule mod_shib>', 'AuthType shibboleth', 'Require shibboleth', '</IfModule>', '<IfModule mod_shib.c>', 'AuthType shibboleth', 'Require shibboleth', '</IfModule>', '<IfModule mod_shib.cpp>', 'AuthType shibboleth', 'Require shibboleth', '</IfModule>' );\n\t\tinsert_with_markers( $htaccess, 'Shibboleth', $rules );\n\t}\n}",
"private function createHtaccess():void\n {\n //Add apache security configurations.\n $fp = fopen($this->projectDir.'/.htaccess', 'a+');\n if ($fp) {\n fwrite($fp, $this->htaccessConfig());\n }\n fclose($fp);\n }",
"abstract public function installApache();",
"public function htaccess_notice() {\n\t\t$value = $this->get_setting( 'enable_basic_authentication', 'no' );\n\t\t$htaccess_file = $this->base_path . '.htaccess';\n\n\t\tif ( 'yes' === $value && ! file_exists( $htaccess_file ) ) {\n\t\t\t?>\n\t\t\t<div class=\"error\">\n\t\t\t\t<p>\n\t\t\t\t\t<?php _e( \"Warning: .htaccess doesn't exist. Your SatisPress packages are public.\", 'satispress' ); ?>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}",
"function htaccess( $_, $assoc ) {\n\n\t\t//Check Network\n\t\t$network = Core::is_multisite();\n\n\t\t//Check Custom directory\n\t\t$dirs = array();\n\t\tforeach ( array( 'wp_content', 'plugins', 'uploads', 'themes' ) as $dir ) {\n\t\t\tif ( isset( $assoc[ $dir ] ) ) {\n\t\t\t\t$dirs[ $dir ] = $assoc[ $dir ];\n\t\t\t}\n\t\t}\n\n\t\t//Create file\n\t\tPermalink::create_permalink_file( $network['network'], $network['subdomain'], $dirs );\n\n\t\t//Success\n\t\tCLI::success( CLI::_e( 'package', 'created_file', array( \"[file]\" => $network['mod_rewrite_file'] ) ) );\n\t}",
"public function addWpHtaccess()\n {\n if (!$this->isApache()) {\n return false; // Not Apache.\n }\n if (!$this->options['enable']) {\n return true; // Nothing to do.\n }\n if (!$this->needHtaccessRules()) {\n if ($this->findHtaccessMarker()) { // Do we need to clean up previously added rules?\n $this->removeWpHtaccess(); // Fail silently since we don't need rules in place.\n }\n return true; // Nothing to do; no options enabled that require htaccess rules.\n }\n if (!$this->removeWpHtaccess()) {\n return false; // Unable to remove.\n }\n if (!($htaccess = $this->readHtaccessFile())) {\n return false; // Failure; could not read file.\n }\n $template_blocks = ''; // Initialize.\n\n foreach ([\n 'gzip-enable.txt',\n 'access-control-allow-origin-enable.txt',\n 'browser-caching-enable.txt',\n 'enforce-exact-host-name.txt',\n 'canonical-urls-ts-enable.txt',\n 'canonical-urls-no-ts-enable.txt',\n ] as $_template) {\n //\n if (!is_file($_template_file = dirname(dirname(dirname(__FILE__))).'/templates/htaccess/'.$_template)) {\n continue; // Template file missing; bypass.\n // ↑ Some files might be missing in the lite version.\n } elseif (!($_template_file_contents = trim(file_get_contents($_template_file)))) {\n continue; // Template file empty; bypass.\n } // ↑ Some files might be empty in the lite version.\n\n switch ($_template) {\n case 'gzip-enable.txt':\n if ($this->options['htaccess_gzip_enable']) {\n $template_blocks .= $_template_file_contents.\"\\n\\n\";\n } // ↑ Only if GZIP is enabled at this time.\n break;\n\n \n }\n } // unset($_template_file); // Housekeeping.\n\n if (empty($template_blocks)) { // Do we need to add anything to htaccess?\n $this->closeHtaccessFile($htaccess); // No need to write to htaccess file in this case.\n return true; // Nothing to do, but no failures either.\n }\n $template_blocks = $this->fillReplacementCodes($template_blocks);\n $template_header = '# BEGIN '.NAME.' '.$this->htaccess_marker.' (the '.$this->htaccess_marker.' marker is required for '.NAME.'; do not remove)';\n $template_footer = '# END '.NAME.' '.$this->htaccess_marker;\n $htaccess['file_contents'] = $template_header.\"\\n\\n\".trim($template_blocks).\"\\n\\n\".$template_footer.\"\\n\\n\".$htaccess['file_contents'];\n\n if (!$this->writeHtaccessFile($htaccess, true)) {\n return false; // Failure; could not write changes.\n }\n return true; // Added successfully.\n }",
"function yourls_create_htaccess() {\n\t$host = parse_url( yourls_get_yourls_site() );\n\t$path = ( isset( $host['path'] ) ? $host['path'] : '' );\n\n\tif ( yourls_is_iis() ) {\n\t\t// Prepare content for a web.config file\n\t\t$content = array(\n\t\t\t'<?'.'xml version=\"1.0\" encoding=\"UTF-8\"?>',\n\t\t\t'<configuration>',\n\t\t\t' <system.webServer>',\n\t\t\t' <security>',\n\t\t\t' <requestFiltering allowDoubleEscaping=\"true\" />',\n\t\t\t' </security>',\n\t\t\t' <rewrite>',\n\t\t\t' <rules>',\n\t\t\t' <rule name=\"YOURLS\" stopProcessing=\"true\">',\n\t\t\t' <match url=\"^(.*)$\" ignoreCase=\"false\" />',\n\t\t\t' <conditions>',\n\t\t\t' <add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" negate=\"true\" />',\n\t\t\t' <add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" ignoreCase=\"false\" negate=\"true\" />',\n\t\t\t' </conditions>',\n\t\t\t' <action type=\"Rewrite\" url=\"'.$path.'/yourls-loader.php\" appendQueryString=\"true\" />',\n\t\t\t' </rule>',\n\t\t\t' </rules>',\n\t\t\t' </rewrite>',\n\t\t\t' </system.webServer>',\n\t\t\t'</configuration>',\n\t\t);\n\n\t\t$filename = YOURLS_ABSPATH.'/web.config';\n\t\t$marker = 'none';\n\n\t} else {\n\t\t// Prepare content for a .htaccess file\n\t\t$content = array(\n\t\t\t'<IfModule mod_rewrite.c>',\n\t\t\t'RewriteEngine On',\n\t\t\t'RewriteBase '.$path.'/',\n\t\t\t'RewriteCond %{REQUEST_FILENAME} !-f',\n\t\t\t'RewriteCond %{REQUEST_FILENAME} !-d',\n\t\t\t'RewriteRule ^.*$ '.$path.'/yourls-loader.php [L]',\n\t\t\t'</IfModule>',\n\t\t);\n\n\t\t$filename = YOURLS_ABSPATH.'/.htaccess';\n\t\t$marker = 'YOURLS';\n\n\t}\n\n\treturn ( yourls_insert_with_markers( $filename, $marker, $content ) );\n}",
"function cyz_create_htaccess(){\n // Get htaccess dynamic content\n $htaccess_content = cyz_get_htaccess_content();\n\n /** Directory where apache htaccess resides */\n $apache_dir = '/';\n\n /** Directory where apache htaccess Filename */\n $apache_filename = '.htaccess';\n\n /** File Operator Object */\n $file_worker = new cyz_file_op();\n\n /** Check write permission */\n $is_dir_writeable = $file_worker->writeable($apache_dir);\n\n /** Check if directory is writeable */\n if(!$is_dir_writeable['status']) return [\n 'status' => false,\n 'description' => 'Application directory not writable.'\n ];\n \n /** Create new/update htaccess file */\n $htaccess_updated = $file_worker->update_file(\n $apache_dir.$apache_filename,\n $htaccess_content\n );\n\n /** Htaccess file has been updated */\n if($htaccess_updated['status']) return [\n 'status' => true,\n 'description' => ''\n ];\n\n /** Error updating Htaccess file */\n else return [\n 'status' => false,\n 'description' => 'Please delete old .htaccess file.'\n ];\n}",
"public function createDefaultHtaccessFile()\n {\n $htaccessFile = GeneralUtility::getFileAbsFileName('.htaccess');\n if (file_exists($htaccessFile)) {\n /**\n * Add Flashmessage that there is already an .htaccess file and we are not going to override this.\n */\n $flashMessage = GeneralUtility::makeInstance(\n 'TYPO3\\\\CMS\\\\Core\\\\Messaging\\\\FlashMessage',\n 'There is already an Apache .htaccess file in the root directory, please make sure that the url rewritings are set properly.'\n . 'An example configuration is located at: \"typo3conf/ext/bootstrap_package/Configuration/Apache/.htaccess\"',\n 'Apache .htaccess file already exists',\n FlashMessage::NOTICE,\n true\n );\n $this->addFlashMessage($flashMessage);\n return;\n }\n $htaccessContent = GeneralUtility::getUrl(ExtensionManagementUtility::extPath($this->extKey) . '/Configuration/Apache/.htaccess');\n GeneralUtility::writeFile($htaccessFile, $htaccessContent, true);\n\n /**\n * Add Flashmessage that the example htaccess file was placed in the root directory\n */\n $flashMessage = GeneralUtility::makeInstance(\n 'TYPO3\\\\CMS\\\\Core\\\\Messaging\\\\FlashMessage',\n 'For RealURL and optimization purposes an example .htaccess file was placed in your root directory.'\n . ' Please check if the RewriteBase correctly set for your environment. ',\n 'Apache example .htaccess was placed in the root directory.',\n FlashMessage::OK,\n true\n );\n $this->addFlashMessage($flashMessage);\n }",
"function update_htaccess(): void {\n $config = Config::current();\n\n if (file_exists(MAIN_DIR.DIR.\".htaccess\")) {\n $set = htaccess_conf();\n\n if ($set === false)\n alert(__(\"Failed to write file to disk.\"));\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load JavaScript needed on slider editing screen. Used by function $this>post_edit_assets. | private function load_slider_assets(){
fa_load_admin_style('slider-edit');
wp_enqueue_style('media-views');
$modal = fa_load_admin_script('modal');
$handle = fa_load_admin_script('slider-edit', array( $modal, 'jquery-ui-tabs' ,'jquery-ui-sortable', 'jquery' ));
wp_localize_script( $handle, 'faEditSlider', array(
'assign_slide_wp_nonce' => $this->wp_ajax->get_nonce('assign_slide'),
'assign_slide_ajax_action' => $this->wp_ajax->get_action('assign_slide'),
'assign_image_nonce' => $this->wp_ajax->get_nonce('assign_images'),
'assign_image_ajax_action' => $this->wp_ajax->get_action('assign_images'),
'rem_slider_default_img' => array(
'nonce' => $this->wp_ajax->get_nonce('rem_default_slides_image'),
'action' => $this->wp_ajax->get_action('rem_default_slides_image')
),
'messages' => array(
'close_modal' => __('Close', 'fapro'),
'title_slides' => __('Choose slides', 'fapro'),
'title_edit_post' => __('Edit slide options', 'fapro'),
'title_categories' => __('Choose categories', 'fapro')
)
));
// Add the action to the footer to output the modal window.
add_action( 'admin_footer', array( $this, 'tax_selection_modal' ) );
} | [
"public function load_slider_javascript () {\n\t\techo $this->generate_slider_javascript();\n\n\t\t// Conditionally load the theme stylesheets in the footer as well.\n\t\t$this->maybe_load_theme_stylesheets();\n\t}",
"function slider_register_scripts() {\n \n // wp_enqueue_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js', array(), '1.6.4', true); Most likely, this is already registered at your WordPress Installation\n wp_enqueue_script('SlidesJS', get_template_directory_uri() . '/assets/js/slides.min.jquery.js', array('jquery'), false, true);\n wp_enqueue_script('Custom-JS', get_template_directory_uri() . '/assets/js/custom.js', array('jquery'), false, true);\n}",
"public function dt_carousel_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n wp_enqueue_style( 'slick' );\n wp_enqueue_style( 'slick-theme' );\n\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'droit-wbpakery-addons_js', plugins_url('assets/droit-wbpakery-addons.js', __FILE__), array('jquery') );\n }",
"function jls_js_add_script() {\n\twp_enqueue_script( 'jls_inline_edit', plugins_url( '/js/jls-inline-edit.js', __FILE__ ) );\n}",
"private function loadBackendJS(){\n wp_register_script('indigoSlider-backend-js', plugins_url( ($this->jsFolderName .'/indigo-slider-backend.js'), __FILE__ ), array( 'jquery') );\n wp_enqueue_script('indigoSlider-backend-js');\n }",
"function cp_v2_slider_admin_scripts( $hook ) {\r\n\t$dev_mode = get_option( 'cp_dev_mode' );\r\n\t$is_cp_page = strpos( $hook, 'convetplug-v2' );\r\n\twp_enqueue_script( 'jquery' );\r\n\twp_enqueue_script( 'jquery-ui-core' );\r\n\twp_enqueue_script( 'jquery-ui-slider' );\r\n\tif ( '1' === $dev_mode ) {\r\n\t\twp_enqueue_script( 'cp-slider', plugins_url( 'slider.js', __FILE__ ), array(), '1.0.0', true );\r\n\t\twp_enqueue_style( 'cp-jquery-ui', plugins_url( 'jquery-ui.css', __FILE__ ), array(), '1.0.0' );\r\n\t\twp_enqueue_style( 'cp-slider', plugins_url( 'slider.css', __FILE__ ), array(), '1.0.0' );\r\n\t}\r\n}",
"function wpvideocoach_admin_scripts_slider($hook)\r\n{\r\n\t// We need the slider JS on dashboard, so let's load it on dashboard only\r\n\tif( 'index.php' != $hook )\r\n return;\r\n wp_enqueue_script('wpvideocoach-video-slider', plugins_url('/js/slider.js', __FILE__ ));\r\n\twp_enqueue_script('wpvideocoach-video-slider-control', plugins_url('/js/slider-control.js', __FILE__ ));\r\n}",
"public function load_inline_scripts() {\n do_action( 'cv_theme_settings_inline_scripts' );\n }",
"public function editor_scripts() {\n\t\tadd_filter( 'script_loader_tag', [ $this, 'editor_scripts_as_a_module' ], 10, 2 );\n\n\t\twp_enqueue_script(\n\t\t\t'elementor-addons-editor',\n\t\t\tplugins_url( '/assets/js/editor/editor.js', __FILE__ ),\n\t\t\t[\n\t\t\t\t'elementor-editor',\n\t\t\t],\n\t\t\t'1.2.1',\n\t\t\ttrue\n\t\t);\n\t}",
"public function dt_gallery_loadCssAndJs() {\n // wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n // wp_enqueue_style( 'dt_extend_style' );\n\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'droit-wbpakery-addons_js', plugins_url('assets/droit-wbpakery-addons.js', __FILE__), array('jquery') );\n }",
"public function loadCssAndJs()\n {\n wp_enqueue_script('custom', plugins_url('assets/custom.js', __FILE__), array('jquery'));\n }",
"public function loadCssAndJs() {\n wp_register_style( 'viser-style', plugins_url('assets/css/viser-addons.css', __FILE__) );\n wp_enqueue_style( 'viser-style' );\n\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'viser-script', plugins_url('assets/js/viser-addons.js', __FILE__), array('jquery') );\n }",
"private function load_slide_assets(){\n\t\tfa_load_admin_style('slide-edit');\n\t\t$video_handle = fa_load_script( 'video-player2', array( 'jquery' ) );\n\t\t/**\n\t\t * Video player script action. Allows third party plugins to load\n\t\t * other assets.\n\t\t */\n\t\tdo_action( 'fa_embed_video_script_enqueue' );\n\t\t\n\t\t$handle = fa_load_admin_script( 'slide-edit', array( 'jquery', $video_handle ) );\n\t\t\n\t\twp_localize_script( $handle, 'faEditSlide', array(\n\t\t\t'id_prefix' \t=> $this->meta_box_prefix, // meta boxes prefix\n\t\t\t'wp_nonce' \t\t=> $this->wp_ajax->get_nonce('video_query'),\n\t\t\t'ajax_action' \t=> $this->wp_ajax->get_action('video_query'),\t\n\t\t\t\n\t\t\t'remove_video_nonce' \t\t=> $this->wp_ajax->get_nonce('remove_video'),\n\t\t\t'remove_video_ajax_action' \t=> $this->wp_ajax->get_action('remove_video'),\n\t\t\t\n\t\t\t/*\n\t\t\t'image_nonce' \t=> $this->wp_ajax->get_nonce('import_image'),\n\t\t\t'image_action' \t=> $this->wp_ajax->get_action('import_image'),\t\n\t\t\t*/\t\n\t\t\n\t\t\t'remove_image_nonce' \t=> $this->wp_ajax->get_nonce('remove_slide_image'),\n\t\t\t'remove_image_action' \t=> $this->wp_ajax->get_action('remove_slide_image'),\n\t\t\n\t\t\t'messages' => array(\n\t\t\t\t'empty_video_query' => __('Please select source and enter video ID.', 'fapro'),\n\t\t\t\t'loading_video' \t=> __('Querying for video ...', 'fapro'),\n\t\t\t\t'querying_video'\t=> __('Not done yet, please wait...', 'fapro'),\n\t\t\t\t'query_error' \t\t=> __('There was an error, please try again', 'fapro'),\n\t\t\t\t'removing_video'\t=> __('Removing video ...', 'fapro')\n\t\t\t)\t\n\t\t));\n\n\t\twp_localize_script( $handle, 'faEditSlider', array(\n\t\t\t'assign_image_nonce' \t\t=> $this->wp_ajax->get_nonce('assign_slide_image'),\t\n\t\t\t'assign_image_ajax_action' \t=> $this->wp_ajax->get_action('assign_slide_image'),\t\t\t\n\t\t));\n\t\t\n\t}",
"public function enqueue_scripts () {\n\t\tglobal $wooslider;\n\n\t\twp_register_script( $this->token . '-flexslider', esc_url( $wooslider->plugin_url . 'assets/js/jquery.flexslider-min.js' ), array( 'jquery' ), '1.0.0', true );\n\t\twp_enqueue_script( $this->token . '-flexslider' );\n\t}",
"public function activate_SUVBC_slider_jquery() {\n\t\twp_enqueue_script( 'jquery' );\n\t}",
"public static function addRangeSliderAssets()\n {\n if (TL_MODE !== 'BE')\n {\n $GLOBALS['TL_CSS'][] = 'bundles/rangeslider/css/ion.rangeSlider.css';\n $GLOBALS['TL_CSS'][] = 'bundles/rangeslider/css/ion.rangeSlider.skinHTML5.css';\n //$GLOBALS['TL_JAVASCRIPT'][] = 'bundles/rangeslider/js/ion.rangeSlider' . ($GLOBALS['TL_CONFIG']['debugMode'] ? '' : '.min') . '.js';\n $GLOBALS['TL_JAVASCRIPT'][] = 'bundles/rangeslider/js/ion.rangeSlider.js';\n $GLOBALS['TL_JAVASCRIPT'][] = 'bundles/rangeslider/js/init.js';\n }\n }",
"public function pi_widgets_scripts()\n {\n global $pagenow;\n\n if ( ( $pagenow && $pagenow == 'widgets.php' ) || has_action('customize_controls_init') )\n {\n wp_enqueue_media();\n wp_enqueue_script('jquery-ui-sortable');\n\n wp_register_script('pi_widgets', PI_WS_URI . 'js/widgets.js', array('jquery'), '1.0', true);\n wp_enqueue_script('pi_widgets');\n }\n }",
"protected function loadJavascript() {}",
"function load_editor() {\r\n do_action( 'courseware_editor' );\r\n wp_enqueue_script( 'assignments' );\r\n wp_enqueue_style( 'datetimepicker' );\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add the 'notes' field. | static function add_notes(): void {
self::add_acf_inner_field(self::divisions, self::notes, [
'label' => 'Notes',
'type' => 'text',
'instructions' => 'Any notes pertinent to the division.',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => [
'width' => '40',
'class' => '',
'id' => '',
]
]);
} | [
"static function add_notes(): void {\r\n self::add_acf_field(self::notes, [\r\n 'label' => 'Notes',\r\n 'type' => 'text',\r\n 'instructions' => 'A totally optional field for adding general notes on a volume.',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => [\r\n 'width' => '',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n 'default_value' => '',\r\n 'placeholder' => '',\r\n 'prepend' => '',\r\n 'append' => '',\r\n 'maxlength' => '',\r\n ]);\r\n }",
"public function setNotes($var)\n {\n GPBUtil::checkString($var, True);\n $this->notes = $var;\n }",
"public function setNotes($var)\n {\n GPBUtil::checkString($var, True);\n $this->notes = $var;\n\n return $this;\n }",
"public function setNotes($notes);",
"static function add_iss_notes(): void {\r\n self::add_acf_inner_field(self::issues, self::iss_notes, [\r\n 'label' => 'Notes (optional)',\r\n 'type' => 'text',\r\n 'instructions' => 'A totally optional place to add general notes on the issue.',\r\n 'required' => 0,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => [\r\n 'width' => '100',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n 'default_value' => '',\r\n 'placeholder' => '',\r\n 'prepend' => '',\r\n 'append' => '',\r\n 'maxlength' => '',\r\n ]);\r\n }",
"function setNotes($notes)\r\n {\r\n $this->_notes = $notes;\r\n }",
"private function addNotesField(&$fields, &$validator) {\n\t $fields['Notes'][] = new TextareaField('Notes', _t('CheckoutPage.NOTES_ABOUT_ORDER',\"Notes about this order\"), 5, 20, '');\n\t}",
"public function setItemNotes($notes);",
"public function append_Notes($str_New_Notes) {\n $this->notes .= $str_New_Notes;\n }",
"public function appendNotes(string $notes)\n {\n $date = date('n/j/y G:i:s');\n $callsign = Auth::check() ? Auth::user()->callsign : '(unknown)';\n $this->notes = \"$date $callsign: $notes\\n{$this->notes}\";\n }",
"function domica_charitable_add_note_field( $fields, Charitable_Donation_Form $form ) {\n /**\n * Add the field to the array of fields.\n */\n $fields['note_field'] = array(\n 'label' =>esc_html__( '', 'domica' ), \n 'type' => 'textarea',\n 'priority' => 50,\n 'placeholder' =>esc_html__( 'Additional Note', 'domica' ),\n 'checked' => array_key_exists( 'donor_note_field', $_POST ) ? $_POST['donor_note_field'] : $form->get_user_value( 'note_field' ),\n 'data_type' => 'user',\n );\n return $fields;\n}",
"private function _save_notes(){\n\t\t\n\t\t\n\t\t\n\t}",
"public function afficheNotes()\n {\n }",
"public function addNote(Note $note);",
"public function setRevisionNotes(string $notes = null);",
"public static function productNotesCustomField() {\n echo '<div class=\"options_group show_if_simple show_if_variable show_if_external\">';\n woocommerce_wp_textarea_input([\n 'id' => '_' . Plugin::PREFIX . '_product_notes',\n 'label' => __('Internal product notes', Plugin::L10N),\n 'style' => 'min-height: 120px;',\n ]);\n echo '</div>';\n }",
"public function add()\r\n {\r\n $note = $this->real_escape_string(trim($_POST['note']));\r\n $this->query('INSERT INTO notes (notes) VALUES (\"'.$note.'\")');\r\n unset($_POST['note']);\r\n }",
"public static function add_order_note() {\n check_ajax_referer('iwj-security');\n\n if (!current_user_can('manage_options')) {\n wp_die(- 1);\n }\n\n $post_id = absint($_POST['post_id']);\n $note = wp_kses_post(trim(stripslashes($_POST['note'])));\n $note_type = $_POST['note_type'];\n\n $is_customer_note = ( 'customer' === $note_type ) ? 1 : 0;\n\n if ($post_id > 0) {\n $order = IWJ_Order::get_order($post_id);\n $comment_id = $order->add_order_note($note, $is_customer_note, true);\n\n echo '<li rel=\"' . esc_attr($comment_id) . '\" class=\"iwj-note ';\n if ($is_customer_note) {\n echo 'customer-note';\n }\n echo '\"><div class=\"iwj-note-content\">';\n echo wpautop(wptexturize($note));\n echo '</div><p class=\"meta\"><a href=\"#\" class=\"iwj-delete-note\">' . __('Delete note', 'iwjob') . '</a></p>';\n echo '</li>';\n }\n wp_die();\n }",
"function notes() {\n //\n // constructor\n // do not forget to update version\n //\n $this->author = 'Herman Tolentino MD';\n $this->version = \"0.5-\".date(\"Y-m-d\");\n $this->module = \"notes\";\n $this->description = \"CHITS Module - Consult Notes\";\n // 0.2 Fixed template system\n // 0.3 debugged system\n // 0.4 overhaul interface and templates\n // 0.5 added get_complaint_list, get_plan, get_diagnosis_list\n // for consult_report\n // 0.6 added ICD codes to the m_lib_dxclass table\n // displayed ICD 10 codes table after the diagnosis name\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function loadLibs: It gets all the libraries under $libPath and includes them for their use on the application. | function loadLibs($libPath)
{
$files = scandir($libPath);
$files = array_diff($files, array('.', '..'));
foreach ($files as $file) {
include $libPath . $file;
}
} | [
"private function loadLibs()\r\n {\r\n $libFiles = array_slice(scandir(libs_path), 2);\r\n\r\n foreach($libFiles as $lib) {\r\n require libs_path . $lib;\r\n }\r\n }",
"protected function loadLibs() {\n\t\t\tif (AppConfig::get('DatabaseEnabled')) {\n\t\t\t\tAppLoader::includeClass('php/database/', 'DatabaseFactory');\n\t\t\t\t$objDatabaseFactory = new DatabaseFactory('database');\n\t\t\t\tAppRegistry::register('Database', $objDatabaseFactory->init());\n\t\t\t}\n\t\n\t\t\tif (AppConfig::get('CacheEnabled')) {\n\t\t\t\tAppLoader::includeClass('php/cache/', 'CacheFactory');\n\t\t\t\t$objCacheFactory = new CacheFactory('cache');\n\t\t\t\tAppRegistry::register('Cache', $objCacheFactory->init());\n\t\t\t}\n\t\t}",
"protected function loadLibraries(){ \n //Recorro de a una las librerias, las importo\n foreach ($this->context->getLibrariesDefinition() as $libreria) {\n //$libreria['class'] tiene la direccion completa desde LIBRARIE, no solo el nombre\n $dir= $libreria['path'];\n Support\\import_librarie($dir);\n }\n }",
"private function loadLibraries() {\n\n foreach( glob(__DIR__ . '/../libraries/*.php') as $file ) {\n require $file;\n }\n\n }",
"public static function libs()\n {\n $config = require_once \"config/app.php\";\n foreach ($config[\"libs\"] as $lib) {\n require_once \"libs/\" . $lib . \".php\";\n }\n }",
"protected function _initLibs()\n {\n set_include_path(implode(PATH_SEPARATOR, array(\n realpath('custom/library/'),\n get_include_path()\n )));\n }",
"private function load_libs()\n\t{\n\t\t//Includes\n\t\trequire_once(self::INCLUDES_DIR . 'class-wc-vpd-xml-interest-calculator.php');\n\n\t\t//Interceptors\n\t\trequire_once(self::INTERCEPTORS_DIR . 'class-wc-vpd-settings-interceptor.php');\n\t\trequire_once(self::INTERCEPTORS_DIR . 'class-wc-vpd-gateway-interceptor.php');\n\t\trequire_once(self::INTERCEPTORS_DIR . 'class-wc-vpd-cart-interceptor.php');\n\t\trequire_once(self::INTERCEPTORS_DIR . 'class-wc-vpd-checkout-interceptor.php');\n\t}",
"function libs()\n{\n\t$libs = func_get_args();\n\tforeach ($libs as $lib)\n\t{\n\t\tif (strstr($lib,'/') || (strstr($lib,'.php')))\n\t\t\t$libFile = $lib;\n\t\telse\n\t\t\t$libFile = LIB_DIR.\"/$lib.php\";\n\t\trequire_once(\"$libFile\");\n\t}\n}",
"public function getLibraries();",
"protected function _initLibraries(){\n\t\t//This procedure of loading a custom library requires\n\t\t//that the folder be located inside the library folder.\n\t\t$autoloader = Zend_Loader_Autoloader::getInstance();\n \t$autoloader->registerNamespace('Maranatha'); \t\n \t\n \t\n \t\n \t//A file that defines constant variables accessible application wide\t\n \t$constantsFile = APPLICATION_PATH.DIRECTORY_SEPARATOR.\"..\".DIRECTORY_SEPARATOR.\"library\".DIRECTORY_SEPARATOR;\n\t \t$constantsFile .= 'Constants.php';\n\t \trequire_once($constantsFile); \n\t}",
"function processLibs() \n { \n if (count($this->libs) == 0) { return;\n }\n \n $css_files = $jscript_files = array();\n $load_order = -99999; // we set the libs to load first\n foreach ($this->libs as $lib => $options)\n {\n // attempt to load the config file\n if (file_exists(DIR_FS_CATALOG . 'plugins/riCjLoader/config/' . $lib . '.php')) {\n include DIR_FS_CATALOG . 'plugins/riCjLoader/config/' . $lib . '.php';\n $lib_versions = array_keys($libs[$lib]);\n foreach ($options as $option)\n {\n if (isset($option['min']) && (($pos = array_search($option['min'], $lib_versions)) != 0)) {\n $lib_versions = array_slice($lib_versions, $pos);\n }\n \n if (isset($option['max']) && (($pos = array_search($option['max'], $lib_versions)) < count($lib_versions)-1)) {\n array_splice($lib_versions, $pos+1);\n }\n }\n \n if (empty($lib_versions)) {\n // houston we have a problem\n // TODO: we need to somehow print out the error in this case\n }\n else \n {\n // we prefer the latest version\n $lib_version = end($lib_versions);\n // add the files\n if (isset($libs[$lib][$lib_version]['css_files'])) {\n foreach ($libs[$lib][$lib_version]['css_files'] as $css_file => $css_file_options)\n {\n if($this->get('cdn') && isset($css_file_options['cdn'])) {\n $file = $this->request_type == 'NONSSL' ? $css_file_options['cdn']['http'] : $css_file_options['cdn']['https'];\n $css_files[$file] = $load_order++;\n }\n else\n {\n $file = !empty($css_file_options['local']) ? $css_file_options['local'] : $css_file;\n $css_files['libs/' . $lib . '/' . $lib_version . '/' . $file] = $load_order++;\n } \n }\n }\n \n if (isset($libs[$lib][$lib_version]['jscript_files'])) {\n foreach ($libs[$lib][$lib_version]['jscript_files'] as $jscript_file => $jscript_file_options)\n {\n if($this->get('cdn') && isset($jscript_file_options['cdn'])) {\n $file = $this->request_type == 'NONSSL' ? $jscript_file_options['cdn']['http'] : $jscript_file_options['cdn']['https'];\n $jscript_files[$file] = $load_order++; \n }\n else\n {\n $file = !empty($jscript_file_options['local']) ? $jscript_file_options['local'] : $jscript_file;\n $jscript_files['libs/' . $lib . '/' . $lib_version . '/' . $file] = $load_order++;\n } \n }\n }\n }\n } \n }\n \n if (!empty($css_files)) { $this->addLoaderAssets($css_files, 'css');\n }\n if (!empty($jscript_files)) { $this->addLoaderAssets($jscript_files, 'jscript');\n }\n \n }",
"private function IncludeLibraries()\n {\n foreach ($this->libraries_files as $library_folder => $library_files) {\n foreach ($library_files as $library_file) {\n $path = \"Lib/\" . $library_folder . \"/\" . $library_file . \".php\";\n if (file_exists($path))\n include $path;\n else\n throw new Exception(\"There is no a file named '{$path}'.\", 404);\n }\n }\n }",
"protected function _load_libs() {\n\t\t$path = dirname( __FILE__ ). '/WP-Parser/';\n\n\t\trequire_once \"$path/vendor/autoload.php\";\n\t\trequire_once \"$path/lib/WP/runner.php\";\n\t}",
"protected function readLibraries() {\n\t\t$this->libaries = WCF::getCache()->get('libary', 'libaries');\n\t}",
"function psm_autoloader_add_lib_dirs() {\n foreach (drush_commandfile_list() as $file_path) {\n $dir = dirname($file_path);\n if (is_dir(\"$dir/lib\")) {\n psm_autoloader_add_lib_dir(\"$dir/lib\");\n }\n elseif (preg_match('@.+/includes$@', $dir) && is_dir(\"$dir/../lib\")) {\n psm_autoloader_add_lib_dir(\"$dir/../lib\");\n }\n }\n}",
"function parseLibPath() {\n\tglobal $custom_libpaths;\n\tif (!is_array($custom_libpaths)) {\n\t\t$custom_libpaths = array($custom_libpaths);\n\t}\n\tforeach ($custom_libpaths as $path) {\n\t\taddLibPath($path);\n\t}\n}",
"protected function makeLibs()\n {\n $list = $this->getBuffer()->getLibs();\n\n $access = $this->getBuffer()->getNeedLibs();\n\n $html = \"\";\n\n foreach ($list as $path) {\n\n if($access === false && $path[LibsFinder::L_MAIN] === true){\n $html .= sprintf($this->templateScriptFile, $path[BufferCache::PATH_ABS]);\n } elseif($access !== false && array_search($path[BufferCache::FILE_ALIAS], $access) !== false){\n $html .= sprintf($this->templateScriptFile, $path[BufferCache::PATH_ABS]); \n } elseif($path[LibsFinder::ALWAYS] === true){\n $html .= sprintf($this->templateScriptFile, $path[BufferCache::PATH_ABS]);\n }\n\n }\n\n $this->replace('js_libs', $html);\n }",
"public static function getLibsFolder(){\r\n return self::$paths[\"libraries\"];\r\n }",
"public static function getLibraries() {\n self::$libraries = self::getClassesInDir(BASEPATH . 'libs');\n return array_keys(self::$libraries);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation getAuthorizationDivisionAsyncWithHttpInfo Returns an authorization division. | public function getAuthorizationDivisionAsyncWithHttpInfo($divisionId, $objectCount = 'false')
{
$returnType = '\PureCloudPlatform\Client\V2\Model\AuthzDivision';
$request = $this->getAuthorizationDivisionRequest($divisionId, $objectCount);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
} | [
"public function getAuthorizationDivisionsHomeAsyncWithHttpInfo()\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\AuthzDivision';\n $request = $this->getAuthorizationDivisionsHomeRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getAuthorizationDivisionsHomeWithHttpInfo()\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\AuthzDivision';\n $request = $this->getAuthorizationDivisionsHomeRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\AuthzDivision',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 413:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 415:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 503:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 504:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function postAuthorizationDivisionsAsyncWithHttpInfo($body)\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\AuthzDivision';\n $request = $this->postAuthorizationDivisionsRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getAuthorizationDivisionspermittedMeAsyncWithHttpInfo($permission, $name = null)\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\AuthzDivision[]';\n $request = $this->getAuthorizationDivisionspermittedMeRequest($permission, $name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getAuthorizationDivisionsWithHttpInfo($pageSize = '25', $pageNumber = '1', $sortBy = null, $expand = null, $nextPage = null, $previousPage = null, $objectCount = 'false', $id = null, $name = null)\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\AuthzDivisionEntityListing';\n $request = $this->getAuthorizationDivisionsRequest($pageSize, $pageNumber, $sortBy, $expand, $nextPage, $previousPage, $objectCount, $id, $name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\AuthzDivisionEntityListing',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 413:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 415:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 503:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 504:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function deleteAuthorizationDivisionAsyncWithHttpInfo($divisionId)\n {\n $returnType = '';\n $request = $this->deleteAuthorizationDivisionRequest($divisionId);\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 getAuthorizationDivisionAsync($divisionId, $objectCount = 'false')\n {\n return $this->getAuthorizationDivisionAsyncWithHttpInfo($divisionId, $objectCount)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getCorporationsCorporationIdDivisionsAsyncWithHttpInfo($corporation_id, $datasource = 'tranquility', $if_none_match = null, $token = null, string $contentType = self::contentTypes['getCorporationsCorporationIdDivisions'][0])\n {\n $returnType = '\\Swagger\\Client\\Eve\\Model\\GetCorporationsCorporationIdDivisionsOk';\n $request = $this->getCorporationsCorporationIdDivisionsRequest($corporation_id, $datasource, $if_none_match, $token, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function getAuthorizationDivisionspermittedSubjectIdAsyncWithHttpInfo($subjectId, $permission, $name = null)\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\AuthzDivision[]';\n $request = $this->getAuthorizationDivisionspermittedSubjectIdRequest($subjectId, $permission, $name);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function getAuthorizationDivisionsLimitRequest()\n {\n\n $resourcePath = '/api/v2/authorization/divisions/limit';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function availableOperationsAuthorizationAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\ResourceOptionsDto';\n $request = $this->availableOperationsAuthorizationRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function defDivisionsGetAsync()\n {\n return $this->defDivisionsGetAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"function grabDivision(){\n\t\t$division = $_GET['viewDivisionOptionsId'];\n\n\t\tif ($division == 0){\n\t\t\t$division = \"all\";\n\t\t}\n\t\treturn $division;\n\t}",
"public function availableOperationsAuthorizationInstanceAsyncWithHttpInfo($id)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\ResourceOptionsDto';\n $request = $this->availableOperationsAuthorizationInstanceRequest($id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"protected function defDivisionsGetRequest()\n {\n\n $resourcePath = '/def/divisions';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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 OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function postAuthorizationDivisionObjectAsyncWithHttpInfo($divisionId, $objectType, $body)\n {\n $returnType = '';\n $request = $this->postAuthorizationDivisionObjectRequest($divisionId, $objectType, $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 getPrivilegesAsyncWithHttpInfo()\n {\n $returnType = '\\NexusClient\\Model\\ApiPrivilege[]';\n $request = $this->getPrivilegesRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected function getAuthorizationDivisionRequest($divisionId, $objectCount = 'false')\n {\n // verify the required parameter 'divisionId' is set\n if ($divisionId === null || (is_array($divisionId) && count($divisionId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $divisionId when calling getAuthorizationDivision'\n );\n }\n\n $resourcePath = '/api/v2/authorization/divisions/{divisionId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($objectCount !== null) {\n $queryParams['objectCount'] = ObjectSerializer::toQueryValue($objectCount);\n }\n\n // path params\n if ($divisionId !== null) {\n $resourcePath = str_replace(\n '{' . 'divisionId' . '}',\n ObjectSerializer::toPathValue($divisionId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function restPropertiesSelectionsPropertySelectionIdDeleteAsyncWithHttpInfo($property_selection_id)\n {\n $returnType = '';\n $request = $this->restPropertiesSelectionsPropertySelectionIdDeleteRequest($property_selection_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read remote roles by location | protected function readRemoteRoles($a_remote_ref, $a_global = true)
{
$GLOBALS['ilLog']->write(__METHOD__.': '. $a_remote_ref.': '. ($a_global ? 'true' : 'false'));
return $this->getSoapClient()->call(
'getLocalRoles',
array(
$this->getSoapSid(),
$a_remote_ref
)
);
} | [
"abstract public function loadRole();",
"public function getRole();",
"function xarFindRole($name) { return xarRoles::findRole($name); }",
"public function get()\n {\n return $this->retrieveAPIParseJSON(\n 'clouds/' . $this->cloud . '/roles'\n );\n }",
"public function getUserRoles();",
"public function rolesForUser();",
"public function getRoleProvider();",
"function getRoles ( $type ) {\n }",
"public function getRoles()\n {\n }",
"static function getRoles() {\n global $user;\n $mdb2 = getConnection();\n\n $group_id = $user->getGroup();\n $org_id = $user->org_id;\n $sql = \"select * from tt_roles\".\n \" where group_id = $group_id and org_id = $org_id and status is not null\";\n $res = $mdb2->query($sql);\n if (is_a($res, 'PEAR_Error')) return false;\n while ($val = $res->fetchRow()) {\n $roles[] = $val;\n }\n return $roles;\n }",
"public static function getAllRoleOrGate();",
"private function loadRoles()\r\n {\r\n $db = Sweia::getInstance()->getDB();\r\n\r\n $roles = $db->query(\"SELECT ur.rid, r.role FROM \" . SystemTables::DB_TBL_USER_ROLE . \" ur LEFT JOIN role r ON (r.rid = ur.rid) WHERE uid='$this->uid'\");\r\n while ($role = $db->fetchObject($roles))\r\n {\r\n $this->roles[$role->rid] = $role->role;\r\n }\r\n\r\n /* If the currently logged in user is this user, add the authenticated user role to this user */\r\n if (Session::loggedInUid() == $this->uid)\r\n {\r\n $this->roles[2] = \"authenticated\";\r\n }\r\n \r\n return $this->roles;\r\n }",
"public function getGlobalRoles();",
"function monsterinsights_get_roles() {\n\tglobal $wp_roles;\n\n\t$all_roles = $wp_roles->roles;\n\t$roles = array();\n\n\t/**\n\t * Filter: 'editable_roles' - Allows filtering of the roles shown within the plugin (and elsewhere in WP as it's a WP filter)\n\t *\n\t * @api array $all_roles\n\t */\n\t$editable_roles = apply_filters( 'editable_roles', $all_roles );\n\n\tforeach ( $editable_roles as $id => $name ) {\n\t\t$roles[ $id ] = translate_user_role( $name['name'] );\n\t}\n\n\treturn $roles;\n}",
"public function loadRoles()\n {\n $this->roles = array();\n $db = Codeli::getInstance()->getDB();\n\n $sql = \"SELECT ur.rid, r.* FROM \" . SystemTables::USER_ROLE\n . \" ur LEFT JOIN \" . SystemTables::ROLE . \" r ON (r.rid = ur.rid) WHERE uid=':uid'\";\n $roles = $db->query($sql, array(\":uid\" => $this->user->getId()));\n while ($row = $db->fetchObject($roles))\n {\n $role = new Role();\n $role->loadFromMap($row);\n $this->roles[$row->rid] = $role;\n }\n\n return $this->roles;\n }",
"function _film_links_get_roles($rid = NULL) {\n $query = db_select('film_link_role','r');\n \n // might not need the following so will need to test it.\n if (!empty($rid)) {\n // We are looking for all the sub roles\n $query->condition('r.pid',$rid,'=');\n } else {\n // we are getting all the main roles.\n $query->isNull('r.pid'); \n }\n \n $query->fields('r', array('rid','pid','name','film_character'));\n \n $result = $query->execute();\n\n return $result;\n}",
"private function getRouteRoles()\n {\n $router = $this->router;\n\n $cache = $this->getConfigCacheFactory()->cache(\n $this->options['cache_dir'].'/tenside_roles.php',\n function (ConfigCacheInterface $cache) use ($router) {\n $routes = $router->getRouteCollection();\n $roles = [];\n foreach ($routes as $name => $route) {\n if ($requiredRole = $route->getOption('required_role')) {\n $roles[$name] = $requiredRole;\n }\n }\n\n $cache->write('<?php return ' . var_export($roles, true) . ';', $routes->getResources());\n }\n );\n\n return require_once $cache->getPath();\n }",
"static function read_remote($keys)\n\t{\n\t\tadmin_cmd::_instanciate_remote();\n\n\t\treturn admin_cmd::$remote->read($keys);\n\t}",
"protected function get_roles_data()\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the public 'knp_menu.menu_provider' shared service. | protected function getKnpMenu_MenuProviderService()
{
$a = $this->get('knp_menu.factory');
return $this->services['knp_menu.menu_provider'] = new \Knp\Menu\Provider\ChainProvider(array(0 => new \Knp\Bundle\MenuBundle\Provider\ContainerAwareProvider($this, array('sonata_admin_sidebar' => 'sonata.admin.sidebar_menu')), 1 => new \Knp\Bundle\MenuBundle\Provider\BuilderServiceProvider($this, array()), 2 => new \Knp\Bundle\MenuBundle\Provider\BuilderAliasProvider($this->get('kernel'), $this, $a), 3 => new \Sonata\AdminBundle\Menu\Provider\GroupMenuProvider($a, $this->get('sonata.admin.pool'), $this->get('security.authorization_checker'))));
} | [
"protected function getKnpMenu_MenuProviderService()\n {\n return $this->services['knp_menu.menu_provider'] = new \\Knp\\Menu\\Provider\\ChainProvider(array(0 => new \\Knp\\Bundle\\MenuBundle\\Provider\\ContainerAwareProvider($this, array()), 1 => new \\Knp\\Bundle\\MenuBundle\\Provider\\BuilderAliasProvider($this->get('kernel'), $this, $this->get('knp_menu.factory')), 2 => $this->get('symfony_cmf_menu.provider'), 3 => $this->get('symfony_cmf_simple_cms.menu_provider')));\n }",
"protected function getKnpMenu_MenuProviderService()\n {\n return $this->services['knp_menu.menu_provider'] = new \\Knp\\Menu\\Provider\\ChainProvider(array(0 => new \\Knp\\Bundle\\MenuBundle\\Provider\\ContainerAwareProvider($this, array('sylius.frontend.main' => 'sylius.menu.frontend.main', 'sylius.frontend.currency' => 'sylius.menu.frontend.currency', 'sylius.frontend.taxonomies' => 'sylius.menu.frontend.taxonomies', 'sylius.frontend.account' => 'sylius.menu.frontend.account', 'sylius.frontend.social' => 'sylius.menu.frontend.social', 'sylius.backend.main' => 'sylius.menu.backend.main', 'sylius.backend.sidebar' => 'sylius.menu.backend.sidebar')), 1 => new \\Knp\\Bundle\\MenuBundle\\Provider\\BuilderAliasProvider($this->get('kernel'), $this, $this->get('knp_menu.factory'))));\n }",
"protected function getSymfonyCmfMenu_ProviderService()\n {\n return $this->services['symfony_cmf_menu.provider'] = new \\Symfony\\Cmf\\Bundle\\MenuBundle\\Provider\\PHPCRMenuProvider($this, $this->get('symfony_cmf_menu.factory'), 'default', '/cms');\n }",
"protected function getSymfonyCmfSimpleCms_MenuProviderService()\n {\n return $this->services['symfony_cmf_simple_cms.menu_provider'] = new \\Symfony\\Cmf\\Bundle\\MenuBundle\\Provider\\PHPCRMenuProvider($this, $this->get('symfony_cmf_menu.factory'), 'default', '/cms/simple');\n }",
"protected function getMenuManager()\n {\n return $this->container->get('kr_solutions_krcms.menu_manager');\n }",
"public function serviceProvidersItems()\n {\n return Configure::read('Site.menu.items.serviceProvider');\n }",
"protected function getSonata_Block_Service_MenuService()\n {\n return $this->services['sonata.block.service.menu'] = new \\Sonata\\BlockBundle\\Block\\Service\\MenuBlockService('sonata.block.menu', ${($_ = isset($this->services['sonata.templating']) ? $this->services['sonata.templating'] : $this->get('sonata.templating')) && false ?: '_'}, ${($_ = isset($this->services['knp_menu.menu_provider']) ? $this->services['knp_menu.menu_provider'] : $this->get('knp_menu.menu_provider')) && false ?: '_'}, ${($_ = isset($this->services['sonata.block.menu.registry']) ? $this->services['sonata.block.menu.registry'] : $this->get('sonata.block.menu.registry')) && false ?: '_'});\n }",
"protected function getOroMenu_FactoryService()\n {\n $this->services['oro_menu.factory'] = $instance = new \\Knp\\Menu\\MenuFactory();\n\n $instance->addExtension($this->get('oro_menu_acl_extension'));\n\n return $instance;\n }",
"protected function getSonata_Block_Service_MenuService()\n {\n return $this->services['sonata.block.service.menu'] = new \\Sonata\\BlockBundle\\Block\\Service\\MenuBlockService('sonata.block.menu', ${($_ = isset($this->services['templating']) ? $this->services['templating'] : $this->get('templating')) && false ?: '_'}, ${($_ = isset($this->services['knp_menu.menu_provider']) ? $this->services['knp_menu.menu_provider'] : $this->get('knp_menu.menu_provider')) && false ?: '_'}, ${($_ = isset($this->services['sonata.block.menu.registry']) ? $this->services['sonata.block.menu.registry'] : $this->get('sonata.block.menu.registry')) && false ?: '_'});\n }",
"protected function getKnpMenu_FactoryService()\n {\n $this->services['knp_menu.factory'] = $instance = new \\Knp\\Menu\\MenuFactory();\n\n $instance->addExtension(new \\Knp\\Menu\\Integration\\Symfony\\RoutingExtension($this->get('router')), 0);\n\n return $instance;\n }",
"protected function getSonata_Block_Service_MenuService()\n {\n return $this->services['sonata.block.service.menu'] = new \\Sonata\\BlockBundle\\Block\\Service\\MenuBlockService('sonata.block.menu', $this->get('templating'), $this->get('knp_menu.menu_provider'), $this->get('sonata.block.menu.registry'));\n }",
"public function getProvider() {\n\t\tif ($this->provider === null) {\n\t\t\tif ($this->className) {\n\t\t\t\tif (!class_exists($this->className)) {\n\t\t\t\t\tthrow new SystemException(\"Unable to find class '\".$this->className.\"'\");\n\t\t\t\t}\n\t\t\t\tif (!ClassUtil::isInstanceOf($this->className, 'wcf\\system\\menu\\page\\PageMenuItemProvider')) {\n\t\t\t\t\tthrow new SystemException($this->className.\" should implement wcf\\system\\menu\\page\\PageMenuItemProvider\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->provider = new $this->className();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->provider = new DefaultPageMenuItemProvider();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->provider;\n\t}",
"protected function getKnpMenu_FactoryService()\n {\n return $this->services['knp_menu.factory'] = new \\Knp\\Menu\\Silex\\RouterAwareFactory($this->get('symfony_cmf_routing_extra.router'));\n }",
"protected function getPlugin_Manager_Menu_LinkService()\n {\n return $this->services['plugin.manager.menu.link'] = new \\Drupal\\Core\\Menu\\MenuLinkManager($this->get('menu.tree_storage'), $this->get('menu_link.static.overrides'), $this->get('module_handler'));\n }",
"public function promoteGlobalScreenProvider(): AbstractStaticPluginMainMenuProvider {\n\t\tglobal $DIC;\n\n\t\treturn new ilMMRoleBasedProvider($DIC,$this);\n\t}",
"protected function getKnpMenu_MenuProvider_LazyService()\n {\n return $this->services['knp_menu.menu_provider.lazy'] = new \\Knp\\Menu\\Provider\\LazyProvider(array('sonata_admin_sidebar' => function () {\n return ${($_ = isset($this->services['sonata.admin.sidebar_menu']) ? $this->services['sonata.admin.sidebar_menu'] : $this->get('sonata.admin.sidebar_menu')) && false ?: '_'};\n }));\n }",
"public function getMenuService()\n {\n if (null === $this->_menuService) {\n if ($this->_di) {\n $this->_menuService = $this->_di->get('coreMenuService');\n }\n }\n if (!$this->_menuService instanceof MenuService) {\n throw new \\Engine\\Exception('Object not instance of Core\\Service\\Menu');\n }\n return $this->_menuService;\n }",
"protected function getKnpMenu_RendererProviderService()\n {\n return $this->services['knp_menu.renderer_provider'] = new \\Knp\\Menu\\Renderer\\PsrProvider(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('list' => function () {\n return ${($_ = isset($this->services['knp_menu.renderer.list']) ? $this->services['knp_menu.renderer.list'] : $this->get('knp_menu.renderer.list')) && false ?: '_'};\n }, 'twig' => function () {\n return ${($_ = isset($this->services['knp_menu.renderer.twig']) ? $this->services['knp_menu.renderer.twig'] : $this->get('knp_menu.renderer.twig')) && false ?: '_'};\n })), 'twig');\n }",
"static public function menu_view() {\n return 'cmf::ui.menu';\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of field funcionario | public function getFuncionario()
{
return $this->funcionario;
} | [
"public function getFunc_nome()\n {\n return $this->func_nome;\n }",
"public function getFunction();",
"function getFieldValue($field);",
"private function getFuction() {\n return $this->_function;\n }",
"public function getFieldHandler();",
"function _f($field)\r\n {\r\n \treturn $this->row[$field];\r\n }",
"public function getFunc_bruto()\n {\n return $this->func_bruto;\n }",
"public function getFuncionarios() {\n //\n }",
"public function getFunction()\n {\n return $this->function;\n }",
"public function getDataFunc()\n {\n return $this->_dataFunc;\n }",
"public function getFunction()\n {\n return $this->readOneof(3);\n }",
"public function getValue();",
"function f($field)\n {\n return $this->row[$field];\n }",
"abstract public function getValor($campo);",
"function acf_get_value($post_id = 0, $field)\n{\n}",
"public function _field() {\n }",
"public function get_field_name();",
"public function getGetfield(){\n return $this->getfield;\n }",
"function field($table, $condition, $nombre_field)\n {\n $field = NULL; //Valor por defecto\n $query = $this->db->query(\"SELECT {$nombre_field} FROM {$table} WHERE {$condition} LIMIT 1\");\n \n if ( $query->num_rows() > 0 ){ $field = $query->row()->$nombre_field; }\n \n return $field;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
BBCodes initialisation. Filling in message::regexp array | function init_bbcodes(){
global $system,$lightbox_config;
$this->regexp[0] = array();
$this->regexp[1] = array(
"#\[b\](.*?)\[/b\]#is" => '<span style="font-weight: bold">\\1</span>',
"#\[(h[1-5])\](.*?)\[/(h[1-5])\]#is" => '<\\1>\\2</\\3>',
"#\[i\](.*?)\[/i\]#is" => '<span style="font-style: italic">\\1</span>',
"#\[u\](.*?)\[/u\]#is" => '<span style="text-decoration: underline">\\1</span>',
"#\[del\](.*?)\[/del\]#is" => '<span style="text-decoration: line-through">\\1</span>',
"#\[url\][\s\n\r]*(((https?|ftp|ed2k|irc)://|" . RCMS_ROOT_PATH . ")[^ \"\n\r\t\<]*)[\s\n\r]*\[/url\]#is" => '<a href="\\1" >\\1</a>',
"#\[url\][\s\n\r]*(www\.[^ \"\n\r\t\<]*?)[\s\n\r]*\[/url\]#is" => '<a href="http://\\1" >\\1</a>',
"#\[url\][\s\n\r]*((ftp)\.[^ \"\n\r\t\<]*?)[\s\n\r]*\[/url\]#is" => '<a href="\\2://\\1" target="_blank">\\1</a>',
"#\[url=(\"|"|)(((https?|ftp|ed2k|irc)://|" . RCMS_ROOT_PATH . ")[^ \"\n\r\t\<]*?)(\"|"|)\](.*?)\[/url\]#is" => '<a href="\\2" >\\6</a>',
"#\[url=(\"|"|)(www\.[^ \"\n\r\t\<]*?)(\"|"|)\](.*?)\[/url\]#is" => '<a href="http://\\2" >\\4</a>',
"#\[url=(\"|"|)((ftp)\.[^ \"\n\r\t\<]*?)(\"|"|)\](.*?)\[/url\]#is" => '<a href="\\3://\\2" target="_blank">\\5</a>',
"#\[mailto\][\s\n\r]*([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)[\s\n\r]*\[/mailto\]#is" => '<a href="mailto:\\1">\\1</a>',
"#\[mailto=(\"|"|)([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)(\"|"|)\](.*?)\[/mailto\]#is" => '<a href="mailto:\\2">\\5</a>',
"#\[color=(\"|"|)([\#\w]*)(\"|"|)\](.*?)\[/color(.*?)\]#is" => '<span style="color:\\2">\\4</span>',
"#\[size=(\"|"|)([0-9]*)(\"|"|)\](.*?)\[/size(.*?)\]#is" => '<span style="font-size: \\2pt">\\4</span>',
"#\[align=(\"|"|)(left|right|center|justify)(\"|"|)\](.*?)\[/align(.*?)\]#is" => '<span style="text-align: \\2">\\4</span>',
"#\[user\]([\d\w]*?)\[/user\]#is" => ' [ <a href="' . RCMS_ROOT_PATH . '?module=user.list&user=\\1">\\1</a> ] ',
"#\[user=([\d\w]*?)\](.*?)\[/user\]#is" => ' [ <a href="' . RCMS_ROOT_PATH . '?module=user.list&user=\\1">\\2</a> ] ',
"#\[hidden\](.*?)\[/hidden\]#is" => return_hidden_bb_text()
);
$this->regexp[1] = array_merge(get_animated_to_array(), $this->regexp[1]);
if (@$lightbox_config['articles']) {
$this->regexp[2] = array(
"#[\s\n\r]*\[img\][\s\n\r]*([\w]+?://[^ \"\n\r\t<]*?|".RCMS_ROOT_PATH."[^ \"\n\r\t<]*?)\.(gif|png|jpe?g)[\s\n\r]*\[/img\][\s\n\r]*#is" => '<br /><a href="\\1.\\2" class="gallery"><img src="\\1.\\2" alt="\\2" width="'.$lightbox_config['width'].'px"/></a><br />',
"#[\s\n\r]*\[img=(\"|"|)(left|right)(\"|"|)\][\s\n\r]*([\w]+?://[^ \"\n\r\t<]*?|".RCMS_ROOT_PATH."[^ \"\n\r\t<]*?)\.(gif|png|jpe?g)[\s\n\r]*\[/img\][\s\n\r]*#is" => '<br /><img src="\\4.\\5" alt="\\5" align="\\2" style="padding: 5px;" /><br />',
"#[\s\n\r]*\[img=(\"|"|)(\d+)(\"|"|)\][\s\n\r]*([\w]+?://[^ \"\n\r\t<]*?|".RCMS_ROOT_PATH."[^ \"\n\r\t<]*?)\.(gif|png|jpe?g)[\s\n\r]*\[/img\][\s\n\r]*#is" => '<br /><img src="\\4.\\5" alt="\\5" width="\\2px" /><br />',
"#[\s\n\r]*\[img=(\"|"|)(100%|[1-9]?[0-9]%)(\"|"|)\][\s\n\r]*([\w]+?://[^ \"\n\r\t<]*?)\.(gif|png|jpe?g)[\s\n\r]*\[/img\][\s\n\r]*#is" => '<br/><img src="\\4.\\5" alt="\\5" width="\\2" /><br/>'
);
} else {
$this->regexp[2] = array(
"#[\s\n\r]*\[img\][\s\n\r]*([\w]+?://[^ \"\n\r\t<]*?|".RCMS_ROOT_PATH."[^ \"\n\r\t<]*?)\.(gif|png|jpe?g)[\s\n\r]*\[/img\][\s\n\r]*#is" => '<br /><img src="\\1.\\2" alt="\\5" /><br />',
"#[\s\n\r]*\[img=(\"|"|)(left|right)(\"|"|)\][\s\n\r]*([\w]+?://[^ \"\n\r\t<]*?|".RCMS_ROOT_PATH."[^ \"\n\r\t<]*?)\.(gif|png|jpe?g)[\s\n\r]*\[/img\][\s\n\r]*#is" => '<img src="\\4.\\5" alt="\\5" align="\\2" style="padding: 5px;" />',
"#[\s\n\r]*\[img=(\"|"|)(\d+)(\"|"|)\][\s\n\r]*([\w]+?://[^ \"\n\r\t<]*?|".RCMS_ROOT_PATH."[^ \"\n\r\t<]*?)\.(gif|png|jpe?g)[\s\n\r]*\[/img\][\s\n\r]*#is" => '<br /><img src="\\4.\\5" alt="\\5" width="\\2px" /><br />',
"#[\s\n\r]*\[img=(\"|"|)(100%|[1-9]?[0-9]%)(\"|"|)\][\s\n\r]*([\w]+?://[^ \"\n\r\t<]*?)\.(gif|png|jpe?g)[\s\n\r]*\[/img\][\s\n\r]*#is" => '<br/><img src="\\4.\\5" alt="\\5" width="\\2" /><br/>'
);
}
} | [
"function bbcode_init()\n {\n $this->bbcodes = array(\n 'code'\t\t\t=> array('bbcode_id' => 8,\t'regexp' => array('#\\[code(?:=([a-z]+))?\\](.+\\[/code\\])#ise' => \"\\$this->bbcode_code('\\$1', '\\$2')\")),\n 'quote'\t\t\t=> array('bbcode_id' => 0,\t'regexp' => array('#\\[quote(?:="(.*?)")?\\](.+)\\[/quote\\]#ise' => \"\\$this->bbcode_quote('\\$0')\")),\n 'attachment'\t=> array('bbcode_id' => 12,\t'regexp' => array('#\\[attachment=([0-9]+)\\](.*?)\\[/attachment\\]#ise' => \"\\$this->bbcode_attachment('\\$1', '\\$2')\")),\n 'b'\t\t\t\t=> array('bbcode_id' => 1,\t'regexp' => array('#\\[b\\](.*?)\\[/b\\]#ise' => \"\\$this->bbcode_strong('\\$1')\")),\n 'i'\t\t\t\t=> array('bbcode_id' => 2,\t'regexp' => array('#\\[i\\](.*?)\\[/i\\]#ise' => \"\\$this->bbcode_italic('\\$1')\")),\n 'url'\t\t\t=> array('bbcode_id' => 3,\t'regexp' => array('#\\[url(=(.*))?\\](.*)\\[/url\\]#iUe' => \"\\$this->validate_url('\\$2', '\\$3')\")),\n 'img'\t\t\t=> array('bbcode_id' => 4,\t'regexp' => array('#\\[img\\](.*)\\[/img\\]#iUe' => \"\\$this->bbcode_img('\\$1')\")),\n 'size'\t\t\t=> array('bbcode_id' => 5,\t'regexp' => array('#\\[size=([\\-\\+]?\\d+)\\](.*?)\\[/size\\]#ise' => \"\\$this->bbcode_size('\\$1', '\\$2')\")),\n 'color'\t\t\t=> array('bbcode_id' => 6,\t'regexp' => array('!\\[color=(#[0-9a-f]{6}|[a-z\\-]+)\\](.*?)\\[/color\\]!ise' => \"\\$this->bbcode_color('\\$1', '\\$2')\")),\n 'u'\t\t\t\t=> array('bbcode_id' => 7,\t'regexp' => array('#\\[u\\](.*?)\\[/u\\]#ise' => \"\\$this->bbcode_underline('\\$1')\")),\n 'list'\t\t\t=> array('bbcode_id' => 9,\t'regexp' => array('#\\[list(?:=(?:[a-z0-9]|disc|circle|square))?].*\\[/list]#ise' => \"\\$this->bbcode_parse_list('\\$0')\")),\n 'email'\t\t\t=> array('bbcode_id' => 10,\t'regexp' => array('#\\[email=?(.*?)?\\](.*?)\\[/email\\]#ise' => \"\\$this->validate_email('\\$1', '\\$2')\")),\n 'flash'\t\t\t=> array('bbcode_id' => 11,\t'regexp' => array('#\\[flash=([0-9]+),([0-9]+)\\](.*?)\\[/flash\\]#ie' => \"\\$this->bbcode_flash('\\$1', '\\$2', '\\$3')\")),\n 'youtube'\t => array('bbcode_id' => 13,\t'regexp' => array('!\\[youtube\\]([a-zA-Z0-9-+.,_ ]+)\\[/youtube\\]!i' => \"\")),\n 'hide'\t => array('bbcode_id' => 14,\t'regexp' => array('!\\[hide\\](.*?)\\[/hide\\]!ies' => \"\")),\n 'center'\t => array('bbcode_id' => 16,\t'regexp' => array('!\\[center\\](.*?)\\[/center\\]!ies' => \"\")),\n 'right'\t => array('bbcode_id' => 18,\t'regexp' => array('!\\[right\\](.*?)\\[/right\\]!ies' => \"\")),\n 's'\t => array('bbcode_id' => 19,\t'regexp' => array('!\\[s\\](.*?)\\[/s\\]!ies' => \"\")),\n );\n }",
"private static function getBBcodes()\n {\n if (!isset(self::$bbCodes))\n self::$bbCodes = array(\n array(\n 'tag' => 'b',\n 'before' => '<strong>',\n 'after' => '</strong>'\n ),\n\n array(\n 'tag' => 'i',\n 'before' => '<em>',\n 'after' => '</em>'\n ),\n\n array(\n 'tag' => 'img',\n 'type' => 'unparsed_content',\n 'content' => '<img src=\"$1\" alt=\"\" />',\n 'validate' => create_function('&$param', '\n $param = BBCodeParser::validateURL($param);\n return true;')\n ),\n\n array(\n 'tag' => 'li',\n 'before' => '<li>',\n 'after' => '</li>',\n 'trim' => 'both'\n ),\n\n array(\n 'tag' => 'list',\n 'before' => '<ul class=\"normal\">',\n 'after' => '</ul>',\n 'trim' => 'inside'\n ),\n\n array(\n 'tag' => 'list',\n 'parameters' => array(\n 'type' => array('match' => '(disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-greek|lower-latin|upper-latin|armenian|georgian|lower-alpha|upper-alpha|none)')\n ),\n 'before' => '<ul class=\"normal\" style=\"list-style-type: {type};\">',\n 'after' => '</ul>',\n 'trim' => 'inside'\n ),\n\n array(\n 'tag' => 'quote',\n 'before' => '<div class=\"quote-left\"><div class=\"quote-right\"><div class=\"quote-content\">',\n 'after' => '</div></div></div>'\n ),\n\n array(\n 'tag' => 'quote',\n 'type' => 'unparsed_equals',\n 'before' => '<div class=\"quote-left\"><div class=\"quote-right\"><div class=\"quote-from\">$1</div><div class=\"quote-content\">',\n 'after' => '</div></div></div>'\n ),\n\n array(\n 'tag' => 's',\n 'before' => '<del>',\n 'after' => '</del>'\n ),\n\n array(\n 'tag' => 'size',\n 'type' => 'unparsed_equals',\n 'before' => '<span style=\"font-size: $1;\">',\n 'after' => '</span>',\n 'validate' => create_function('&$param', '\n if (is_numeric($param))\n $param = $param . \\'px\\';\n return true;')\n ),\n\n array(\n 'tag' => 'spoiler',\n 'before' => '<div class=\"spoilerContainer\"><div class=\"spoilerHeader\">+ Show Spoiler +</div><div class=\"spoilerContent\" style=\"display:none\">',\n 'after' => '</div></div>'\n ),\n\n array(\n 'tag' => 'u',\n 'before' => '<u>',\n 'after' => '</u>'\n ),\n\n array(\n 'tag' => 'url',\n 'type' => 'unparsed_content',\n 'content' => '<a href=\"$1\" target=\"_blank\">$1</a>',\n 'validate' => create_function('&$param', '\n $param = BBCodeParser::validateURL($param);\n return true;')\n ),\n\n array(\n 'tag' => 'url',\n 'type' => 'unparsed_equals',\n 'before' => '<a href=\"$1\" target=\"_blank\">',\n 'after' => '</a>',\n 'validate' => create_function('&$param', '\n $param = BBCodeParser::validateURL($param);\n return true;')\n ),\n\n array(\n 'tag' => 'youtube',\n 'type' => 'unparsed_content',\n 'content' => '<iframe width=\"560\" height=\"315\" src=\"//www.youtube.com/embed/$1\" frameborder=\"0\" allowfullscreen></iframe>',\n 'validate' => create_function('&$param', '\n $param = BBCodeParser::extractYoutubeId($param);\n return true;')\n ),\n );\n\n return self::$bbCodes;\n }",
"function bbcode_init()\n\t{\n\t\tstatic $rowset;\n\n\t\t// This array holds all bbcode data. BBCodes will be processed in this\n\t\t// order, so it is important to keep [code] in first position and\n\t\t// [quote] in second position.\n\t\t$this->bbcodes = array(\n\t\t\t'code'\t\t\t=> array('bbcode_id' => 8,\t'regexp' => array('#\\[code(?:=([a-z]+))?\\](.+\\[/code\\])#ise' => \"\\$this->bbcode_code('\\$1', '\\$2')\")),\n\t\t\t'quote'\t\t\t=> array('bbcode_id' => 0,\t'regexp' => array('#\\[quote(?:="(.*?)")?\\](.+)\\[/quote\\]#ise' => \"\\$this->bbcode_quote('\\$0')\")),\n\t\t\t'attachment'\t=> array('bbcode_id' => 12,\t'regexp' => array('#\\[attachment=([0-9]+)\\](.*?)\\[/attachment\\]#ise' => \"\\$this->bbcode_attachment('\\$1', '\\$2')\")),\n\t\t\t'b'\t\t\t\t=> array('bbcode_id' => 1,\t'regexp' => array('#\\[b\\](.*?)\\[/b\\]#ise' => \"\\$this->bbcode_strong('\\$1')\")),\n\t\t\t'i'\t\t\t\t=> array('bbcode_id' => 2,\t'regexp' => array('#\\[i\\](.*?)\\[/i\\]#ise' => \"\\$this->bbcode_italic('\\$1')\")),\n\t\t\t'url'\t\t\t=> array('bbcode_id' => 3,\t'regexp' => array('#\\[url(=(.*))?\\](.*)\\[/url\\]#iUe' => \"\\$this->validate_url('\\$2', '\\$3')\")),\n\t\t\t'img'\t\t\t=> array('bbcode_id' => 4,\t'regexp' => array('#\\[img\\](https?://)([a-z0-9\\-\\.,\\?!%\\*_:;~\\\\&$@/=\\+]+)\\[/img\\]#ie' => \"\\$this->bbcode_img('\\$1\\$2')\")),\n\t\t\t'size'\t\t\t=> array('bbcode_id' => 5,\t'regexp' => array('#\\[size=([\\-\\+]?[1-2]?[0-9])\\](.*?)\\[/size\\]#ise' => \"\\$this->bbcode_size('\\$1', '\\$2')\")),\n\t\t\t'color'\t\t\t=> array('bbcode_id' => 6,\t'regexp' => array('!\\[color=(#[0-9A-Fa-f]{6}|[a-z\\-]+)\\](.*?)\\[/color\\]!ise' => \"\\$this->bbcode_color('\\$1', '\\$2')\")),\n\t\t\t'u'\t\t\t\t=> array('bbcode_id' => 7,\t'regexp' => array('#\\[u\\](.*?)\\[/u\\]#ise' => \"\\$this->bbcode_underline('\\$1')\")),\n\t\t\t'list'\t\t\t=> array('bbcode_id' => 9,\t'regexp' => array('#\\[list(=[a-z|0-9|(?:disc|circle|square))]+)?\\].*\\[/list\\]#ise' => \"\\$this->bbcode_parse_list('\\$0')\")),\n\t\t\t'email'\t\t\t=> array('bbcode_id' => 10,\t'regexp' => array('#\\[email=?(.*?)?\\](.*?)\\[/email\\]#ise' => \"\\$this->validate_email('\\$1', '\\$2')\")),\n\t\t\t'flash'\t\t\t=> array('bbcode_id' => 11,\t'regexp' => array('#\\[flash=([0-9]+),([0-9]+)\\](.*?)\\[/flash\\]#ie' => \"\\$this->bbcode_flash('\\$1', '\\$2', '\\$3')\"))\n\t\t);\n\n\t\t// Zero the parsed items array\n\t\t$this->parsed_items = array();\n\n\t\tforeach ($this->bbcodes as $tag => $bbcode_data)\n\t\t{\n\t\t\t$this->parsed_items[$tag] = 0;\n\t\t}\n\n\t\tif (!is_array($rowset))\n\t\t{\n\t\t\tglobal $db;\n\t\t\t$rowset = array();\n\n\t\t\t$sql = 'SELECT *\n\t\t\t\tFROM ' . BBCODES_TABLE;\n\t\t\t$result = $db->sql_query($sql);\n\n\t\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t\t{\n\t\t\t\t$rowset[] = $row;\n\t\t\t}\n\t\t\t$db->sql_freeresult($result);\n\t\t}\n\n\t\tforeach ($rowset as $row)\n\t\t{\n\t\t\t$this->bbcodes[$row['bbcode_tag']] = array(\n\t\t\t\t'bbcode_id'\t=> (int) $row['bbcode_id'],\n\t\t\t\t'regexp'\t=> array($row['first_pass_match'] => str_replace('$uid', $this->bbcode_uid, $row['first_pass_replace']))\n\t\t\t);\n\t\t}\n\t}",
"abstract public function bbcode();",
"function _get_bbcode_matches()\n\t{\n\t\t$bbcode_matches = array('~\\[b](.*?)\\[/b]~is',\n\t\t\t'~\\[i](.*?)\\[/i]~is',\n\t\t\t'~\\[u](.*?)\\[/u]~is',\n\t\t\t'~\\[s](.*?)\\[/s]~is',\n\t\t\t'~\\[sup](.*?)\\[/sup]~is',\n\t\t\t'~\\[sub](.*?)\\[/sub]~is',\n\t\t\t'~\\[indent](.*?)\\[/indent]~is',\n\t\t\t'~\\[email]([a-z0-9-_.]+@[a-z0-9-.]+\\.[a-z0-9-_.]+)?\\[/email]~i',\n\t\t\t'~\\[email=([^<]+?)](.*?)\\[/email]~i',\n\t\t\t'~\\[img](h t t p|h t t p s|f t p) : / /(.*?)\\[/img]~ise',\n\t\t\t'~\\[(left|right|center|justify)](.*?)\\[/\\1]~is',\n\t\t\t'~\\[color=(#?[a-zA-Z0-9]+?)](.*?)\\[/color]~is',\n\t\t\t'~\\[font=([a-zA-Z0-9 \\-]+?)](.*?)\\[/font]~is',\n\t\t\t'~\\[size=([0-9]+?)](.*?)\\[/size]~is',\n\t\t\t'~\\[spoiler](.*?)\\[/spoiler]~is',\n\t\t\t'~\\[code](.*?)\\[/code]~ise',\n\t\t\t'~\\[php](.*?)\\[/php]~ise',\n\t\t\t'~\\[php=([0-9]+?)](.*?)\\[/php]~ise',\n\t\t\t'~\\[url](h t t p|h t t p s|f t p) : / /(.+?)\\[/url]~ise',\n\t\t\t'~\\[url=(h t t p|h t t p s|f t p) : / /(.+?)](.+?)\\[/url]~ise');\n\n\t\t$bbcode_replacements = array('<strong>\\\\1</strong>',\n\t\t\t'<em>\\\\1</em>',\n\t\t\t'<span style=\"text-decoration:underline;\">\\\\1</span>',\n\t\t\t'<span style=\"text-decoration:line-through;\">\\\\1</span>',\n\t\t\t'<sup>\\\\1</sup>',\n\t\t\t'<sub>\\\\1</sub>',\n\t\t\t'<p style=\\'text-indent:2em\\'>\\\\1</p>',\n\t\t\t'<a href=\"mailto:\\\\1\">\\\\1</a>',\n\t\t\t'<a href=\"mailto:\\\\1\">\\\\2</a>',\n\t\t\t'\\'<img src=\\\\\\'\\' . str_replace(\\' \\', \\'\\', \\'\\\\1://\\\\2\\') . \\'\\\\\\' alt=\\\\\\'\\' . str_replace(\\' \\', \\'\\', \\'\\\\1://\\\\2\\') . \\'\\\\\\' />\\'',\n\t\t\t'<p style=\\'text-align:\\\\1\\'>\\\\2</p>',\n\t\t\t'<span style=\\'color:\\\\1\\'>\\\\2</span>',\n\t\t\t'<span style=\\'font-family:\\\\1\\'>\\\\2</span>',\n\t\t\t'<span style=\\'font-size:\\\\1ex\\'>\\\\2</span>',\n\t\t\t'<div class=\"spoilerbox\"><strong>' . $this->lang->spoiler . ':</strong><div class=\"spoiler\">\\\\1</div></div>',\n\t\t\t'$this->_format_code(\\'\\\\1\\', 0)',\n\t\t\t'$this->_format_code(\\'\\\\1\\', 1)',\n\t\t\t'$this->_format_code(\\'\\\\2\\', 1, \\'\\\\1\\')',\n\t\t\t'\\'<a href=\"\\' . str_replace(\\' \\', \\'\\', \\'\\\\1://\\\\2\\') . \\'\" onclick=\"window.open(this.href,\\\\\\'' . $this->sets['link_target'] . '\\\\\\');return false;\" rel=\"nofollow\">\\' . $this->_trim_string(str_replace(\\' \\', \\'\\', \\'\\\\1://\\\\2\\'), $this->max_url_length) . \\'</a>\\'',\n\t\t\t'\\'<a href=\"\\' . str_replace(\\' \\', \\'\\', \\'\\\\1://\\\\2\\') . \\'\" onclick=\"window.open(this.href,\\\\\\'' . $this->sets['link_target'] . '\\\\\\');return false;\" rel=\"nofollow\">\\\\3</a>\\'');\n\t\t\t\n\t\treturn array('matches' => $bbcode_matches,\n\t\t\t'replacements' => $bbcode_replacements);\n\t}",
"function parse_bbcode()\n\t{\n\t\t$this->post['message'] = parse_pm_bbcode($this->post['message'], $this->post['allowsmilie']);\n\t}",
"function bb_decode($text)\n{\n $text = nl2br($text);\n\n static $bbcode_tpl = array();\n static $patterns = array();\n static $replacements = array();\n\n // First: If there isn't a \"[\" and a \"]\" in the message, don't bother.\n if ((strpos($text, \"[\") === false || strpos($text, \"]\") === false))\n {\n return $text;\n }\n\n // [b] and [/b] for bolding text.\n $text = str_replace(\"[b]\", '<b>', $text);\n $text = str_replace(\"[/b]\", '</b>', $text);\n\n // [u] and [/u] for underlining text.\n $text = str_replace(\"[u]\", '<u>', $text);\n $text = str_replace(\"[/u]\", '</u>', $text);\n\n // [i] and [/i] for italicizing text.\n $text = str_replace(\"[i]\", '<i>', $text);\n $text = str_replace(\"[/i]\", '</i>', $text);\n\n // colours\n $text = preg_replace(\"/\\[color=(\\#[0-9A-F]{6}|[a-z]+)\\]/\", '<span style=\"color:$1\">', $text);\n $text = str_replace(\"[/color]\", '</span>', $text);\n\n // [i] and [/i] for italicizing text.\n //$text = str_replace(\"[i:$uid]\", $bbcode_tpl['i_open'], $text);\n //$text = str_replace(\"[/i:$uid]\", $bbcode_tpl['i_close'], $text);\n\n if (!count($bbcode_tpl)) {\n // We do URLs in several different ways..\n $bbcode_tpl['url'] = '<span class=\"bblink\"><a href=\"{URL}\" rel=\"external\">{DESCRIPTION}</a></span>';\n $bbcode_tpl['email']= '<span class=\"bblink\"><a href=\"mailto:{EMAIL}\">{EMAIL}</a></span>';\n\n $bbcode_tpl['url1'] = str_replace('{URL}', '\\\\1\\\\2', $bbcode_tpl['url']);\n $bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\\\1\\\\2', $bbcode_tpl['url1']);\n\n $bbcode_tpl['url2'] = str_replace('{URL}', 'http://\\\\1', $bbcode_tpl['url']);\n $bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\\\1', $bbcode_tpl['url2']);\n\n $bbcode_tpl['url3'] = str_replace('{URL}', '\\\\1\\\\2', $bbcode_tpl['url']);\n $bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\\\3', $bbcode_tpl['url3']);\n\n $bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\\\1', $bbcode_tpl['url']);\n $bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\\\2', $bbcode_tpl['url4']);\n\n $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\\\1', $bbcode_tpl['email']);\n\n // [url]xxxx://www.phpbb.com[/url] code..\n $patterns[1] = \"#\\[url\\]([a-z]+?://){1}([a-z0-9\\-\\.,\\?!%\\*_\\#:;~\\\\&$@\\/=\\+\\(\\)]+)\\[/url\\]#si\";\n $replacements[1] = $bbcode_tpl['url1'];\n\n // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).\n $patterns[2] = \"#\\[url\\]([a-z0-9\\-\\.,\\?!%\\*_\\#:;~\\\\&$@\\/=\\+\\(\\)]+)\\[/url\\]#si\";\n $replacements[2] = $bbcode_tpl['url2'];\n\n // [url=xxxx://www.phpbb.com]phpBB[/url] code..\n $patterns[3] = \"#\\[url=([a-z]+?://){1}([a-z0-9\\-\\.,\\?!%\\*_\\#:;~\\\\&$@\\/=\\+\\(\\)]+)\\](.*?)\\[/url\\]#si\";\n $replacements[3] = $bbcode_tpl['url3'];\n\n // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).\n $patterns[4] = \"#\\[url=([a-z0-9\\-\\.,\\?!%\\*_\\#:;~\\\\&$@\\/=\\+\\(\\)]+)\\](.*?)\\[/url\\]#si\";\n $replacements[4] = $bbcode_tpl['url4'];\n\n // [email]user@domain.tld[/email] code..\n $patterns[5] = \"#\\[email\\]([a-z0-9\\-_.]+?@[\\w\\-]+\\.([\\w\\-\\.]+\\.)?[\\w]+)\\[/email\\]#si\";\n $replacements[5] = $bbcode_tpl['email'];\n\n // [img]xxxx://www.phpbb.com[/img] code..\n $bbcode_tpl['img'] = '<img src=\"{URL}\" alt=\"\" />';\n $bbcode_tpl['img'] = str_replace('{URL}', '\\\\1\\\\2', $bbcode_tpl['img']);\n\n $patterns[6] = \"#\\[img\\]([a-z]+?://){1}([a-z0-9\\-\\.,\\?!%\\*_\\#:;~\\\\&$@\\/=\\+\\(\\)]+)\\[/img\\]#si\";\n $replacements[6] = $bbcode_tpl['img'];\n\n }\n\n $text = preg_replace($patterns, $replacements, $text);\n\n return $text;\n}",
"public function __construct()\n\t{\t\t\n\t\t(($sPlugin = Phpfox_Plugin::get('parse_bbcode_construct')) ? eval($sPlugin) : false);\n\t}",
"function parse_bbcode()\n\t{\n\t\t$this->post['message'] = parse_usernote_bbcode($this->post['message'], $this->post['allowsmilies']);\n\t}",
"function parse_bbcode()\n\t{\n\t\t$this->post['message'] = $this->bbcode_parser->parse($this->post['pagetext'], 'announcement', $this->post['allowsmilies']);\n\t}",
"Function bbcode($str){\n\t\t// Makes < and > page friendly\n\t\t//$str=str_replace(\"&\",\"&\",$str);\n\t\t$str=str_replace(\"<\",\"<\",$str);\n\t\t$str=str_replace(\">\",\">\",$str);\n\t\t\n\t\t// Link inside tags new window\n\t\t$str = preg_replace(\"#\\[url\\](.*?)?(.*?)\\[/url\\]#si\", \"<A HREF=\\\"\\\\1\\\\2\\\" TARGET=\\\"_blank\\\">\\\\1\\\\2</A>\", $str);\n\t\t\n\t\t// Link inside first tag new window\n\t\t$str = preg_replace(\"#\\[url=(.*?)?(.*?)\\](.*?)\\[/url\\]#si\", \"<A HREF=\\\"\\\\2\\\" TARGET=\\\"_blank\\\">\\\\3</A>\", $str);\n\t\t\n\t\t// Link inside tags\n\t\t$str = preg_replace(\"#\\[url2\\](.*?)?(.*?)\\[/url2\\]#si\", \"<A HREF=\\\"\\\\1\\\\2\\\">\\\\1\\\\2</A>\", $str);\n\t\t\n\t\t// Link inside first tag\n\t\t$str = preg_replace(\"#\\[url2=(.*?)?(.*?)\\](.*?)\\[/url2\\]#si\", \"<A HREF=\\\"\\\\2\\\">\\\\3</A>\", $str);\n\t\t\n\t\t// Automatic links if no url tags used\n\t\t$str = preg_replace_callback(\"#([\\n ])([a-z]+?)://([a-z0-9\\-\\.,\\?!%\\*_\\#:;~\\\\&$@\\/=\\+]+)#si\", \"bbcode_autolink\", $str);\n\t\t$str = preg_replace(\"#([\\n ])www\\.([a-z0-9\\-]+)\\.([a-z0-9\\-.\\~]+)((?:/[a-z0-9\\-\\.,\\?!%\\*_\\#:;~\\\\&$@\\/=\\+]*)?)#i\", \" <a href=\\\"http://www.\\\\2.\\\\3\\\\4\\\" target=\\\"_blank\\\">www.\\\\2.\\\\3\\\\4</a>\", $str);\n\t\t$str = preg_replace(\"#([\\n ])([a-z0-9\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)?[\\w]+)#i\", \"\\\\1<a href=\\\"mailto: \\\\2@\\\\3\\\">\\\\2_(at)_\\\\3</a>\", $str);\n\t\t\n\t\t// PHP Code\n\t\t$str = preg_replace(\"#\\[php\\](.*?)\\[/php]#si\", \"<div class=\\\"codetop\\\"><u><strong><?PHP:</strong></u></div><div class=\\\"codemain\\\">\\\\1</div>\", $str);\n\t\t\n\t\t// Bold\n\t\t$str = preg_replace(\"#\\[b\\](.*?)\\[/b\\]#si\", \"<strong>\\\\1</strong>\", $str);\n\t\t\n\t\t// Italics\n\t\t$str = preg_replace(\"#\\[i\\](.*?)\\[/i\\]#si\", \"<em>\\\\1</em>\", $str);\n\t\t\n\t\t// Underline\n\t\t$str = preg_replace(\"#\\[u\\](.*?)\\[/u\\]#si\", \"<u>\\\\1</u>\", $str);\n\t\t\n\t\t// Alig text\n\t\t$str = preg_replace(\"#\\[align=(left|center|right)\\](.*?)\\[/align\\]#si\", \"<div align=\\\"\\\\1\\\">\\\\2</div>\", $str); \n\t\t\n\t\t// Font Color\n\t\t$str = preg_replace(\"#\\[color=(.*?)\\](.*?)\\[/color\\]#si\", \"<span style=\\\"color:\\\\1\\\">\\\\2</span>\", $str);\n\t\t\n\t\t// Font Size\n\t\t$str = preg_replace(\"#\\[size=(.*?)\\](.*?)\\[/size\\]#si\", \"<span style=\\\"font-size:\\\\1\\\">\\\\2</span>\", $str);\n\t\t\n\t\t// Image\n\t\t$str = preg_replace(\"#\\[img\\](.*?)\\[/img\\]#si\", \"<img src=\\\"\\\\1\\\" border=\\\"0\\\" alt=\\\"\\\" />\", $str);\n\t\t\n\t\t// Uploaded image\n\t\t$str = preg_replace(\"#\\[ftp_img\\](.*?)\\[/ftp_img\\]#si\", \"<img src=\\\"img/\\\\1\\\" border=\\\"0\\\" alt=\\\"\\\" />\", $str);\n\t\t\n\t\t// HR Line\n\t\t$str = preg_replace(\"#\\[hr=(\\d{1,2}|100)\\]#si\", \"<hr class=\\\"linia\\\" width=\\\"\\\\1%\\\" />\", $str);\n\t\t\n\t\t// Code\n\t\t$str = preg_replace(\"#\\[code\\](.*?)\\[/code]#si\", \"<div class=\\\"codetop\\\"><u><strong>Code:</strong></u></div><div class=\\\"codemain\\\">\\\\1</div>\", $str);\n\t\t\n\t\t// Code, Provide Author\n\t\t$str = preg_replace(\"#\\[code=(.*?)\\](.*?)\\[/code]#si\", \"<div class=\\\"codetop\\\"><u><strong>Code \\\\1:</strong></u></div><div class=\\\"codemain\\\">\\\\2</div>\", $str);\n\t\t\n\t\t// Quote\n\t\t$str = preg_replace(\"#\\[quote\\](.*?)\\[/quote]#si\", \"<div class=\\\"quotetop\\\"><u><strong>Quote:</strong></u></div><div class=\\\"quotemain\\\">\\\\1</div>\", $str);\n\t\t\n\t\t// Quote, Provide Author\n\t\t$str = preg_replace(\"#\\[quote=(.*?)\\](.*?)\\[/quote]#si\", \"<div class=\\\"quotetop\\\"><u><strong>Quote \\\\1:</strong></u></div><div class=\\\"quotemain\\\">\\\\2</div>\", $str);\n\t\t\n\t\t// Email\n\t\t$str = preg_replace(\"#\\[email\\]([a-z0-9\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)?[\\w]+)\\[/email\\]#i\", \"<a href=\\\"mailto:\\\\1@\\\\2\\\">\\\\1@\\\\2</a>\", $str);\n\t\t\n\t\t// Email, Provide Author\n\t\t$str = preg_replace(\"#\\[email=([a-z0-9\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)?[\\w]+)?(.*?)\\](.*?)\\[/email\\]#i\", \"<a href=\\\"mailto:\\\\1@\\\\2\\\">\\\\5</a>\", $str);\n\t\t\n\t\t// YouTube\n\t\t$str = preg_replace(\"#\\[youtube\\]http://(?:www\\.)?youtube.com/v/([0-9A-Za-z-_]{11})[^[]*\\[/youtube\\]#si\", \"<object width=\\\"425\\\" height=\\\"350\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/\\\\1\\\"></param><param name=\\\"wmode\\\" value=\\\"transparent\\\"></param><embed src=\\\"http://www.youtube.com/v/\\\\1\\\" type=\\\"application/x-shockwave-flash\\\" wmode=\\\"transparent\\\" width=\\\"425\\\" height=\\\"350\\\"></embed></object>\", $str);\n\t\t$str = preg_replace(\"#\\[youtube\\]http://(?:www\\.)?youtube.com/watch\\?v=([0-9A-Za-z-_]{11})[^[]*\\[/youtube\\]#si\", \"<object width=\\\"425\\\" height=\\\"350\\\"><param name=\\\"movie\\\" value=\\\"http://www.youtube.com/v/\\\\1\\\"></param><param name=\\\"wmode\\\" value=\\\"transparent\\\"></param><embed src=\\\"http://www.youtube.com/v/\\\\1\\\" type=\\\"application/x-shockwave-flash\\\" wmode=\\\"transparent\\\" width=\\\"425\\\" height=\\\"350\\\"></embed></object>\", $str);\n\t\t\n\t\t// Google Video\n\t\t$str = preg_replace(\"#\\[gvideo\\]http://video.google.[A-Za-z0-9.]{2,5}/videoplay\\?docid=([0-9A-Za-z-_]*)[^[]*\\[/gvideo\\]#si\", \"<object width=\\\"425\\\" height=\\\"350\\\"><param name=\\\"movie\\\" value=\\\"http://video.google.com/googleplayer.swf\\?docId=\\\\1\\\"></param><param name=\\\"wmode\\\" value=\\\"transparent\\\"></param><embed src=\\\"http://video.google.com/googleplayer.swf\\?docId=\\\\1\\\" type=\\\"application/x-shockwave-flash\\\" allowScriptAccess=\\\"sameDomain\\\" quality=\\\"best\\\" bgcolor=\\\"#ffffff\\\" scale=\\\"noScale\\\" salign=\\\"TL\\\" FlashVars=\\\"playerMode=embedded\\\" wmode=\\\"transparent\\\" width=\\\"425\\\" height=\\\"350\\\"></embed></object>\", $str);\n\t\t\n\t\t// change \\n to <br />\n\t\t$str = nl2br($str);\n\t\t\n\t\t// return bbdecoded string\n\t\treturn $str;\n\t}",
"function parse_bbcode($str)\n {\n\t$keys = array();\n\t$data = array();\n\tforeach (array(\"r\", \"s\", \"e\", \"S\", \"E\", \"LI\", \"LIST\") as $rep) {\n\t\t$keys[] = \"/<$rep>/\";\n\t\t$data[] = \"\";\n\n\t\t$keys[] = \"/<\\/$rep>/\";\n\t\t$data[] = \"\";\n\t}\n\n\tforeach (array(\"URL\", \"IMG\") as $rep) {\n\t\t$keys[] = '/<'.$rep.' \\w+=\".*\">/';\n\t\t$data[] = \"\";\n\n\t\t$keys[] = \"/<\\/$rep>/\";\n\t\t$data[] = \"\";\n\t}\n\t$keys[] = \"/\\r/\";\n\t$data[] = \"\";\n\n\t$keys[] = \"/\\n/\";\n\t$data[] = \"\";\n\n $str = preg_replace($keys, $data, $str);\n\n $keys = array('/{SMILIES_PATH}/',\n '/\\[b]/',\n '/\\[\\/b]/',\n '/\\[u:\\w*\\]/',\n '/\\[\\/u:\\w*\\]/',\n '/\\[s\\]/',\n '/\\[\\/s\\]/',\n '/\\[i:\\w*\\]/',\n '/\\[\\/i:\\w*\\]/',\n '/\\[url]/',\n '/\\[url=(.*?)\\]/',\n '/\\[\\/url\\]/',\n '/\\[list]\\n?/',\n '/\\[\\*\\]\\n?/',\n '/\\[\\/\\*[:\\w]*\\]\\n?/',\n '/\\[\\/list[:\\w]*\\]\\n?/',\n '/\\[img\\]/',\n '/\\[\\/img\\]/',\n '/\\[size=(.*?):\\w*\\]/',\n '/\\[\\/size:\\w*\\]/',\n '/\\[color=([^\\]]+)\\]/',\n '/\\[\\/color\\]/',\n '/\\n/',\n '/\\[code\\]/',\n );\n $data = array('/phpbb/images/smilies',\n '<b>',\n '</b>',\n '<u>',\n '</u>',\n '<span style=\"text-decoration:line-through\">',\n '</span>',\n '<i>',\n '</i>',\n '<a href=\"$1\">$1</a>',\n '<a href=\"$1\">',\n '</a>',\n '<ul>',\n '<li>',\n '</li>',\n '</ul>',\n '<img alt=\"\" src=\"',\n '\" />',\n '',\n '',\n '<span style=\"color:$1\">',\n '</span>',\n '<br />',\n '<div class=\"codebox\">',\n '</div>',\n );\n return preg_replace($keys, $data, $str);\n }",
"private function initialize_components() {\n\t\t// Various regex components (but not complete patterns).\n\t\t$this->components['nonEnglishWordCharacters'] = \"\n\t\t\t\t\t[0-9A-Za-z]|\\x{00c0}|\\x{00c1}|\\x{00c2}|\\x{00c3}|\\x{00c4}|\\x{00c5}|\\x{00c6}|\\x{00c7}|\\x{00c8}|\\x{00c9}|\n\t\t\t\t\t\\x{00ca}|\\x{00cb}|\\x{00cc}|\\x{00cd}|\\x{00ce}|\\x{00cf}|\\x{00d0}|\\x{00d1}|\\x{00d2}|\\x{00d3}|\\x{00d4}|\n\t\t\t\t\t\\x{00d5}|\\x{00d6}|\\x{00d8}|\\x{00d9}|\\x{00da}|\\x{00db}|\\x{00dc}|\\x{00dd}|\\x{00de}|\\x{00df}|\\x{00e0}|\n\t\t\t\t\t\\x{00e1}|\\x{00e2}|\\x{00e3}|\\x{00e4}|\\x{00e5}|\\x{00e6}|\\x{00e7}|\\x{00e8}|\\x{00e9}|\\x{00ea}|\\x{00eb}|\n\t\t\t\t\t\\x{00ec}|\\x{00ed}|\\x{00ee}|\\x{00ef}|\\x{00f0}|\\x{00f1}|\\x{00f2}|\\x{00f3}|\\x{00f4}|\\x{00f5}|\\x{00f6}|\n\t\t\t\t\t\\x{00f8}|\\x{00f9}|\\x{00fa}|\\x{00fb}|\\x{00fc}|\\x{00fd}|\\x{00fe}|\\x{00ff}|\\x{0100}|\\x{0101}|\\x{0102}|\n\t\t\t\t\t\\x{0103}|\\x{0104}|\\x{0105}|\\x{0106}|\\x{0107}|\\x{0108}|\\x{0109}|\\x{010a}|\\x{010b}|\\x{010c}|\\x{010d}|\n\t\t\t\t\t\\x{010e}|\\x{010f}|\\x{0110}|\\x{0111}|\\x{0112}|\\x{0113}|\\x{0114}|\\x{0115}|\\x{0116}|\\x{0117}|\\x{0118}|\n\t\t\t\t\t\\x{0119}|\\x{011a}|\\x{011b}|\\x{011c}|\\x{011d}|\\x{011e}|\\x{011f}|\\x{0120}|\\x{0121}|\\x{0122}|\\x{0123}|\n\t\t\t\t\t\\x{0124}|\\x{0125}|\\x{0126}|\\x{0127}|\\x{0128}|\\x{0129}|\\x{012a}|\\x{012b}|\\x{012c}|\\x{012d}|\\x{012e}|\n\t\t\t\t\t\\x{012f}|\\x{0130}|\\x{0131}|\\x{0132}|\\x{0133}|\\x{0134}|\\x{0135}|\\x{0136}|\\x{0137}|\\x{0138}|\\x{0139}|\n\t\t\t\t\t\\x{013a}|\\x{013b}|\\x{013c}|\\x{013d}|\\x{013e}|\\x{013f}|\\x{0140}|\\x{0141}|\\x{0142}|\\x{0143}|\\x{0144}|\n\t\t\t\t\t\\x{0145}|\\x{0146}|\\x{0147}|\\x{0148}|\\x{0149}|\\x{014a}|\\x{014b}|\\x{014c}|\\x{014d}|\\x{014e}|\\x{014f}|\n\t\t\t\t\t\\x{0150}|\\x{0151}|\\x{0152}|\\x{0153}|\\x{0154}|\\x{0155}|\\x{0156}|\\x{0157}|\\x{0158}|\\x{0159}|\\x{015a}|\n\t\t\t\t\t\\x{015b}|\\x{015c}|\\x{015d}|\\x{015e}|\\x{015f}|\\x{0160}|\\x{0161}|\\x{0162}|\\x{0163}|\\x{0164}|\\x{0165}|\n\t\t\t\t\t\\x{0166}|\\x{0167}|\\x{0168}|\\x{0169}|\\x{016a}|\\x{016b}|\\x{016c}|\\x{016d}|\\x{016e}|\\x{016f}|\\x{0170}|\n\t\t\t\t\t\\x{0171}|\\x{0172}|\\x{0173}|\\x{0174}|\\x{0175}|\\x{0176}|\\x{0177}|\\x{0178}|\\x{0179}|\\x{017a}|\\x{017b}|\n\t\t\t\t\t\\x{017c}|\\x{017d}|\\x{017e}|\\x{017f}\n\t\t\t\t\t\";\n\n\t\t/**\n\t\t * Find the HTML character representation for the following characters:\n\t\t *\t\ttab | line feed | carriage return | space | non-breaking space | ethiopic wordspace\n\t\t *\t\togham space mark | en quad space | em quad space | en-space | three-per-em space\n\t\t *\t\tfour-per-em space | six-per-em space | figure space | punctuation space | em-space\n\t\t *\t\tthin space | hair space | narrow no-break space\n\t\t *\t\tmedium mathematical space | ideographic space\n\t\t * Some characters are used inside words, we will not count these as a space for the purpose\n\t\t * of finding word boundaries:\n\t\t *\t\tzero-width-space (\"​\", \"​\")\n\t\t *\t\tzero-width-joiner (\"‌\", \"‌\", \"‍\")\n\t\t *\t\tzero-width-non-joiner (\"‍\", \"‍\", \"‌\")\n\t\t */\n\t\t$this->components['htmlSpaces'] = '\n\t\t\t\\x{00a0}\t\t# no-break space\n\t\t\t|\n\t\t\t\\x{1361}\t\t# ethiopic wordspace\n\t\t\t|\n\t\t\t\\x{2000}\t\t# en quad-space\n\t\t\t|\n\t\t\t\\x{2001}\t\t# em quad-space\n\t\t\t|\n\t\t\t\\x{2002}\t\t# en space\n\t\t\t|\n\t\t\t\\x{2003}\t\t# em space\n\t\t\t|\n\t\t\t\\x{2004}\t\t# three-per-em space\n\t\t\t|\n\t\t\t\\x{2005}\t\t# four-per-em space\n\t\t\t|\n\t\t\t\\x{2006}\t\t# six-per-em space\n\t\t\t|\n\t\t\t\\x{2007}\t\t# figure space\n\t\t\t|\n\t\t\t\\x{2008}\t\t# punctuation space\n\t\t\t|\n\t\t\t\\x{2009}\t\t# thin space\n\t\t\t|\n\t\t\t\\x{200a}\t\t# hair space\n\t\t\t|\n\t\t\t\\x{200b}\t\t# zero-width space\n\t\t\t|\n\t\t\t\\x{200c}\t\t# zero-width joiner\n\t\t\t|\n\t\t\t\\x{200d}\t\t# zero-width non-joiner\n\t\t\t|\n\t\t\t\\x{202f}\t\t# narrow no-break space\n\t\t\t|\n\t\t\t\\x{205f}\t\t# medium mathematical space\n\t\t\t|\n\t\t\t\\x{3000}\t\t# ideographic space\n\t\t\t'; // required modifiers: x (multiline pattern) i (case insensitive) u (utf8).\n\t\t$this->components['normalSpaces'] = ' \\f\\n\\r\\t\\v'; // equivalent to \\s in non-Unicode mode.\n\n\t\t// Hanging punctuation.\n\t\t$this->components['doubleHangingPunctuation'] = \"\n\t\t\t\\\"\n\t\t\t{$this->chr['doubleQuoteOpen']}\n\t\t\t{$this->chr['doubleQuoteClose']}\n\t\t\t{$this->chr['doubleLow9Quote']}\n\t\t\t{$this->chr['doublePrime']}\n\t\t\t{$this->quote_styles['doubleCurled']['open']}\n\t\t\t{$this->quote_styles['doubleCurled']['close']}\n\n\t\t\t\"; // requires modifiers: x (multiline pattern) u (utf8).\n\t\t$this->components['singleHangingPunctuation'] = \"\n\t\t\t'\n\t\t\t{$this->chr['singleQuoteOpen']}\n\t\t\t{$this->chr['singleQuoteClose']}\n\t\t\t{$this->chr['singleLow9Quote']}\n\t\t\t{$this->chr['singlePrime']}\n\t\t\t{$this->quote_styles['singleCurled']['open']}\n\t\t\t{$this->quote_styles['singleCurled']['close']}\n\t\t\t{$this->chr['apostrophe']}\n\n\t\t\t\"; // requires modifiers: x (multiline pattern) u (utf8).\n\n\t\t$this->components['unitSpacingStandardUnits'] = '\n\t\t\t### Temporal units\n\t\t\t(?:ms|s|secs?|mins?|hrs?)\\.?|\n\t\t\tmilliseconds?|seconds?|minutes?|hours?|days?|years?|decades?|century|centuries|millennium|millennia|\n\n\t\t\t### Imperial units\n\t\t\t(?:in|ft|yd|mi)\\.?|\n\t\t\t(?:ac|ha|oz|pt|qt|gal|lb|st)\\.?\n\t\t\ts\\.f\\.|sf|s\\.i\\.|si|square[ ]feet|square[ ]foot|\n\t\t\tinch|inches|foot|feet|yards?|miles?|acres?|hectares?|ounces?|pints?|quarts?|gallons?|pounds?|stones?|\n\n\t\t\t### Metric units (with prefixes)\n\t\t\t(?:p|µ|[mcdhkMGT])?\n\t\t\t(?:[mgstAKNJWCVFSTHBL]|mol|cd|rad|Hz|Pa|Wb|lm|lx|Bq|Gy|Sv|kat|Ω|Ohm|Ω|&\\#0*937;|&\\#[xX]0*3[Aa]9;)|\n\t\t\t(?:nano|micro|milli|centi|deci|deka|hecto|kilo|mega|giga|tera)?\n\t\t\t(?:liters?|meters?|grams?|newtons?|pascals?|watts?|joules?|amperes?)|\n\n\t\t\t### Computers units (KB, Kb, TB, Kbps)\n\t\t\t[kKMGT]?(?:[oBb]|[oBb]ps|flops)|\n\n\t\t\t### Money\n\t\t\t¢|M?(?:£|¥|€|$)|\n\n\t\t\t### Other units\n\t\t\t°[CF]? |\n\t\t\t%|pi|M?px|em|en|[NSEOW]|[NS][EOW]|mbar\n\t\t'; // required modifiers: x (multiline pattern).\n\n\t\t$this->components['hyphensArray'] = array_unique( array( '-', $this->chr['hyphen'] ) );\n\t\t$this->components['hyphens'] = implode( '|', $this->components['hyphensArray'] );\n\n\t\t$this->components['numbersPrime'] = '\\b(?:\\d+\\/)?\\d{1,3}';\n\n\t\t/*\n\t\t // \\p{Lu} equals upper case letters and should match non english characters; since PHP 4.4.0 and 5.1.0\n\t\t // for more info, see http://www.regextester.com/pregsyntax.html#regexp.reference.unicode\n\t\t $this->components['styleCaps'] = '\n\t\t (?<![\\w\\-_'.$this->chr['zeroWidthSpace'].$this->chr['softHyphen'].'])\n\t\t # negative lookbehind assertion\n\t\t (\n\t\t (?:\t\t\t\t\t\t\t# CASE 1: \" 9A \"\n\t\t [0-9]+\t\t\t\t\t# starts with at least one number\n\t\t \\p{Lu}\t\t\t\t\t# must contain at least one capital letter\n\t\t (?:\\p{Lu}|[0-9]|\\-|_|'.$this->chr['zeroWidthSpace'].'|'.$this->chr['softHyphen'].')*\n\t\t # may be followed by any number of numbers capital letters, hyphens, underscores, zero width spaces, or soft hyphens\n\t\t )\n\t\t |\n\t\t (?:\t\t\t\t\t\t\t# CASE 2: \" A9 \"\n\t\t \\p{Lu}\t\t\t\t\t# starts with capital letter\n\t\t (?:\\p{Lu}|[0-9])\t\t# must be followed a number or capital letter\n\t\t (?:\\p{Lu}|[0-9]|\\-|_|'.$this->chr['zeroWidthSpace'].'|'.$this->chr['softHyphen'].')*\n\t\t # may be followed by any number of numbers capital letters, hyphens, underscores, zero width spaces, or soft hyphens\n\n\t\t )\n\t\t )\n\t\t (?![\\w\\-_'.$this->chr['zeroWidthSpace'].$this->chr['softHyphen'].'])\n\t\t # negative lookahead assertion\n\t\t '; // required modifiers: x (multiline pattern) u (utf8)\n\t\t */\n\n\t\t// Servers with PCRE compiled without \"--enable-unicode-properties\" fail at \\p{Lu} by returning an empty string (this leaving the screen void of text\n\t\t// thus are testing this alternative.\n\t\t$this->components['styleCaps'] = '\n\t\t\t\t(?<![\\w\\-_' . $this->chr['zeroWidthSpace'] . $this->chr['softHyphen'] . ']) # negative lookbehind assertion\n\t\t\t\t(\n\t\t\t\t\t(?:\t\t\t\t\t\t\t# CASE 1: \" 9A \"\n\t\t\t\t\t\t[0-9]+\t\t\t\t\t# starts with at least one number\n\t\t\t\t\t (?:\\-|_|' . $this->chr['zeroWidthSpace'] . '|' . $this->chr['softHyphen'] . ')*\n\t\t\t\t\t \t # may contain hyphens, underscores, zero width spaces, or soft hyphens,\n\t\t\t\t\t\t[A-ZÀ-ÖØ-Ý]\t\t\t\t# but must contain at least one capital letter\n\t\t\t\t\t\t(?:[A-ZÀ-ÖØ-Ý]|[0-9]|\\-|_|' . $this->chr['zeroWidthSpace'] . '|' . $this->chr['softHyphen'] . ')*\n\t\t\t\t\t\t\t\t\t\t\t\t# may be followed by any number of numbers capital letters, hyphens, underscores, zero width spaces, or soft hyphens\n\t\t\t\t\t)\n\t\t\t\t\t|\n\t\t\t\t\t(?:\t\t\t\t\t\t\t# CASE 2: \" A9 \"\n\t\t\t\t\t\t[A-ZÀ-ÖØ-Ý]\t\t\t\t# starts with capital letter\n\t\t\t\t\t\t(?:[A-ZÀ-ÖØ-Ý]|[0-9])\t# must be followed a number or capital letter\n\t\t\t\t\t\t(?:[A-ZÀ-ÖØ-Ý]|[0-9]|\\-|_|' . $this->chr['zeroWidthSpace'] . '|' . $this->chr['softHyphen'] . ')*\n\t\t\t\t\t\t\t\t\t\t\t\t# may be followed by any number of numbers capital letters, hyphens, underscores, zero width spaces, or soft hyphens\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t(?![\\w\\-_' . $this->chr['zeroWidthSpace'] . $this->chr['softHyphen'] . ']) # negative lookahead assertion\n\t\t\t'; // required modifiers: x (multiline pattern) u (utf8).\n\n\t\t// Initialize valid top level domains from IANA list.\n\t\t$this->components['validTopLevelDomains'] = $this->get_top_level_domains_from_file( dirname( __DIR__ ) . '/vendor/IANA/tlds-alpha-by-domain.txt' );\n\t\t// Valid URL schemes.\n\t\t$this->components['urlScheme'] = '(?:https?|ftps?|file|nfs|feed|itms|itpc)';\n\t\t// Combined URL pattern.\n\t\t$this->components['urlPattern'] = \"(?:\n\t\t\t\\A\n\t\t\t(?<schema>{$this->components['urlScheme']}:\\/\\/)?\t# Subpattern 1: contains _http://_ if it exists\n\t\t\t(?<domain>\t\t\t\t\t\t\t\t\t\t\t# Subpattern 2: contains subdomains.domain.tld\n\t\t\t\t(?:\n\t\t\t\t\t[a-z0-9]\t\t\t\t\t\t\t\t\t# first chr of (sub)domain can not be a hyphen\n\t\t\t\t\t[a-z0-9\\-]{0,61}\t\t\t\t\t\t\t# middle chrs of (sub)domain may be a hyphen;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t# limit qty of middle chrs so total domain does not exceed 63 chrs\n\t\t\t\t\t[a-z0-9]\t\t\t\t\t\t\t\t\t# last chr of (sub)domain can not be a hyphen\n\t\t\t\t\t\\.\t\t\t\t\t\t\t\t\t\t\t# dot separator\n\t\t\t\t)+\n\t\t\t\t(?:\n\t\t\t\t\t{$this->components['validTopLevelDomains']}\t# validates top level domain\n\t\t\t\t)\n\t\t\t\t(?:\t\t\t\t\t\t\t\t\t\t\t\t# optional port numbers\n\t\t\t\t\t:\n\t\t\t\t\t(?:\n\t\t\t\t\t\t[1-5]?[0-9]{1,4} | 6[0-4][0-9]{3} | 65[0-4][0-9]{2} | 655[0-2][0-9] | 6553[0-5]\n\t\t\t\t\t)\n\t\t\t\t)?\n\t\t\t)\n\t\t\t(?<path>\t\t\t\t\t\t\t\t\t\t\t# Subpattern 3: contains path following domain\n\t\t\t\t(?:\n\t\t\t\t\t\\/\t\t\t\t\t\t\t\t\t\t\t# marks nested directory\n\t\t\t\t\t[a-z0-9\\\"\\$\\-_\\.\\+!\\*\\'\\(\\),;\\?:@=&\\#]+\t\t# valid characters within directory structure\n\t\t\t\t)*\n\t\t\t\t[\\/]?\t\t\t\t\t\t\t\t\t\t\t# trailing slash if any\n\t\t\t)\n\t\t\t\\Z\n\t\t)\"; // required modifiers: x (multiline pattern) i (case insensitive).\n\n\t\t$this->components['wrapEmailsEmailPattern'] = \"(?:\n\t\t\t\\A\n\t\t\t[a-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+\n\t\t\t(?:\n\t\t\t\t\\.\n\t\t\t\t[a-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+\n\t\t\t)*\n\t\t\t@\n\t\t\t(?:\n\t\t\t\t[a-z0-9]\n\t\t\t\t[a-z0-9\\-]{0,61}\n\t\t\t\t[a-z0-9]\n\t\t\t\t\\.\n\t\t\t)+\n\t\t\t(?:\n\t\t\t\t{$this->components['validTopLevelDomains']}\n\t\t\t)\n\t\t\t\\Z\n\t\t)\"; // required modifiers: x (multiline pattern) i (case insensitive).\n\n\t\t$this->components['smartQuotesApostropheExceptions'] = array(\n\t\t\t\"'tain\" . $this->chr['apostrophe'] . 't' => $this->chr['apostrophe'] . 'tain' . $this->chr['apostrophe'] . 't',\n\t\t\t\"'twere\" => $this->chr['apostrophe'] . 'twere',\n\t\t\t\"'twas\" => $this->chr['apostrophe'] . 'twas',\n\t\t\t\"'tis\" => $this->chr['apostrophe'] . 'tis',\n\t\t\t\"'til\" => $this->chr['apostrophe'] . 'til',\n\t\t\t\"'bout\" => $this->chr['apostrophe'] . 'bout',\n\t\t\t\"'nuff\" => $this->chr['apostrophe'] . 'nuff',\n\t\t\t\"'round\" => $this->chr['apostrophe'] . 'round',\n\t\t\t\"'cause\" => $this->chr['apostrophe'] . 'cause',\n\t\t\t\"'splainin\" => $this->chr['apostrophe'] . 'splainin',\n\t\t);\n\t\t$this->components['smartQuotesApostropheExceptionMatches'] = array_keys( $this->components['smartQuotesApostropheExceptions'] );\n\t\t$this->components['smartQuotesApostropheExceptionReplacements'] = array_values( $this->components['smartQuotesApostropheExceptions'] );\n\n\t\t// These patterns need to be updated whenever the quote style changes.\n\t\t$this->update_smart_quotes_brackets();\n\n\t\t// Marker for strings that should not be replaced.\n\t\t$this->components['escapeMarker'] = '_E_S_C_A_P_E_D_';\n\t}",
"public function __construct()\n {\n $regexp = array();\n foreach ($this->tokens as $token=>$exp) {\n $regexp[] = '(?<' . $token . '>' . $exp . ')';\n }\n $this->regexp = '@' . implode('|', $regexp) . '@i';\n }",
"protected function cacheCodes() {\n\t\tif (!empty($this->sourceCodeRegEx)) {\n\t\t\tstatic $bbcodeRegex = null;\n\t\t\tstatic $callback = null;\n\t\t\t\n\t\t\tif ($bbcodeRegex === null) {\n\t\t\t\t$bbcodeRegex = new Regex(\"\n\t\t\t\t(\\[(\".$this->sourceCodeRegEx.\")\n\t\t\t\t(?:=\n\t\t\t\t\t(?:\\'[^\\'\\\\\\\\]*(?:\\\\\\\\.[^\\'\\\\\\\\]*)*\\'|[^,\\]]*)\n\t\t\t\t\t(?:,(?:\\'[^\\'\\\\\\\\]*(?:\\\\\\\\.[^\\'\\\\\\\\]*)*\\'|[^,\\]]*))*\n\t\t\t\t)?\\])\n\t\t\t\t(.*?)\n\t\t\t\t(?:\\[/\\\\2\\])\", Regex::DOT_ALL | Regex::IGNORE_WHITESPACE | Regex::CASE_INSENSITIVE);\n\t\t\t\t\n\t\t\t\t$callback = new Callback(function ($matches) {\n\t\t\t\t\treturn StringStack::pushToStringStack($matches[0], 'preParserCode');\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t$this->cachedCodes = array();\n\t\t\t$this->text = $bbcodeRegex->replace($this->text, $callback);\n\t\t}\n\t}",
"function BBCode ($string) {\n $search = array( '@\\[(?i)b\\](.*?)\\[/(?i)b\\]@si', '@\\[(?i)i\\](.*?)\\[/(?i)i\\]@si', '@\\[(?i)u\\](.*?)\\[/(?i)u\\]@si', '@\\[(?i)img\\](.*?)\\[/(?i)img\\]@si', '@\\[(?i)url=(.*?)\\](.*?)\\[/(?i)url\\]@si', '@\\[(?i)code\\](.*?)\\[/(?i)code\\]@si' );\n $replace = array( '<b>\\\\1</b>', '<i>\\\\1</i>', '<u>\\\\1</u>', '<img src=\"\\\\1\">', '<a href=\"\\\\1\">\\\\2</a>', '<code>\\\\1</code>' );\n return preg_replace($search , $replace, $string); \n }",
"function smarty_modifier_bbcode2html($message) {\n $preg = array(\n '/(?<!\\\\\\\\)\\[color(?::\\w+)?=(.*?)\\](.*?)\\[\\/color(?::\\w+)?\\]/si' => \"<span style=\\\"color:\\\\1\\\">\\\\2</span>\",\n '/(?<!\\\\\\\\)\\[size(?::\\w+)?=(.*?)\\](.*?)\\[\\/size(?::\\w+)?\\]/si' => \"<span style=\\\"font-size:\\\\1\\\">\\\\2</span>\",\n '/(?<!\\\\\\\\)\\[font(?::\\w+)?=(.*?)\\](.*?)\\[\\/font(?::\\w+)?\\]/si' => \"<span style=\\\"font-family:\\\\1\\\">\\\\2</span>\",\n '/(?<!\\\\\\\\)\\[align(?::\\w+)?=(.*?)\\](.*?)\\[\\/align(?::\\w+)?\\]/si' => \"<div style=\\\"text-align:\\\\1\\\">\\\\2</div>\",\n '/(?<!\\\\\\\\)\\[b(?::\\w+)?\\](.*?)\\[\\/b(?::\\w+)?\\]/si' => \"<span style=\\\"font-weight:bold\\\">\\\\1</span>\",\n '/(?<!\\\\\\\\)\\[i(?::\\w+)?\\](.*?)\\[\\/i(?::\\w+)?\\]/si' => \"<span style=\\\"font-style:italic\\\">\\\\1</span>\",\n '/(?<!\\\\\\\\)\\[u(?::\\w+)?\\](.*?)\\[\\/u(?::\\w+)?\\]/si' => \"<span style=\\\"text-decoration:underline\\\">\\\\1</span>\",\n '/(?<!\\\\\\\\)\\[center(?::\\w+)?\\](.*?)\\[\\/center(?::\\w+)?\\]/si' => \"<div style=\\\"text-align:center\\\">\\\\1</div>\",\n\n // [code] & [php]\n '/(?<!\\\\\\\\)\\[code(?::\\w+)?\\](.*?)\\[\\/code(?::\\w+)?\\]/si' => \"<div class=\\\"bb-code\\\">\\\\1</div>\",\n '/(?<!\\\\\\\\)\\[php(?::\\w+)?\\](.*?)\\[\\/php(?::\\w+)?\\]/si' => \"<div class=\\\"bb-php\\\">\\\\1</div>\",\n // [email]\n '/(?<!\\\\\\\\)\\[email(?::\\w+)?\\](.*?)\\[\\/email(?::\\w+)?\\]/si' => \"<a href=\\\"mailto:\\\\1\\\" class=\\\"bb-email\\\">\\\\1</a>\",\n '/(?<!\\\\\\\\)\\[email(?::\\w+)?=(.*?)\\](.*?)\\[\\/email(?::\\w+)?\\]/si' => \"<a href=\\\"mailto:\\\\1\\\" class=\\\"bb-email\\\">\\\\2</a>\",\n // [url]\n '/(?<!\\\\\\\\)\\[url(?::\\w+)?\\]www\\.(.*?)\\[\\/url(?::\\w+)?\\]/si' => \"<a href=\\\"http://www.\\\\1\\\" target=\\\"_blank\\\" class=\\\"bb-url\\\">\\\\1</a>\",\n '/(?<!\\\\\\\\)\\[url(?::\\w+)?\\](.*?)\\[\\/url(?::\\w+)?\\]/si' => \"<a href=\\\"\\\\1\\\" target=\\\"_blank\\\" class=\\\"bb-url\\\">\\\\1</a>\",\n '/(?<!\\\\\\\\)\\[url(?::\\w+)?=(.*?)?\\](.*?)\\[\\/url(?::\\w+)?\\]/si' => \"<a href=\\\"\\\\1\\\" target=\\\"_blank\\\" class=\\\"bb-url\\\">\\\\2</a>\",\n // [img]\n '/(?<!\\\\\\\\)\\[img(?::\\w+)?\\](.*?)\\[\\/img(?::\\w+)?\\]/si' => \"<img src=\\\"\\\\1\\\" alt=\\\"\\\\1\\\" class=\\\"bb-image\\\" />\",\n '/(?<!\\\\\\\\)\\[img(?::\\w+)?=(.*?)x(.*?)\\](.*?)\\[\\/img(?::\\w+)?\\]/si' => \"<img width=\\\"\\\\1\\\" height=\\\"\\\\2\\\" src=\\\"\\\\3\\\" alt=\\\"\\\\3\\\" class=\\\"bb-image\\\" />\",\n // [quote]\n '/(?<!\\\\\\\\)\\[quote(?::\\w+)?\\](.*?)\\[\\/quote(?::\\w+)?\\]/si' => \"<div>Quote:<div class=\\\"bb-quote\\\">\\\\1</div></div>\",\n '/(?<!\\\\\\\\)\\[quote(?::\\w+)?=(?:"|\"|\\')?(.*?)[\"\\']?(?:"|\"|\\')?\\](.*?)\\[\\/quote\\]/si' => \"<div>Quote \\\\1:<div class=\\\"bb-quote\\\">\\\\2</div></div>\",\n // [list]\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[\\*(?::\\w+)?\\](.*?)(?=(?:\\s*<br\\s*\\/?>\\s*)?\\[\\*|(?:\\s*<br\\s*\\/?>\\s*)?\\[\\/?list)/si' => \"\\n<li class=\\\"bb-listitem\\\">\\\\1</li>\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[\\/list(:(?!u|o)\\w+)?\\](?:<br\\s*\\/?>)?/si' => \"\\n</ul>\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[\\/list:u(:\\w+)?\\](?:<br\\s*\\/?>)?/si' => \"\\n</ul>\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[\\/list:o(:\\w+)?\\](?:<br\\s*\\/?>)?/si' => \"\\n</ol>\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[list(:(?!u|o)\\w+)?\\]\\s*(?:<br\\s*\\/?>)?/si' => \"\\n<ul class=\\\"bb-list-unordered\\\">\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[list:u(:\\w+)?\\]\\s*(?:<br\\s*\\/?>)?/si' => \"\\n<ul class=\\\"bb-list-unordered\\\">\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[list:o(:\\w+)?\\]\\s*(?:<br\\s*\\/?>)?/si' => \"\\n<ol class=\\\"bb-list-ordered\\\">\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[list(?::o)?(:\\w+)?=1\\]\\s*(?:<br\\s*\\/?>)?/si' => \"\\n<ol class=\\\"bb-list-ordered,bb-list-ordered-d\\\">\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[list(?::o)?(:\\w+)?=i\\]\\s*(?:<br\\s*\\/?>)?/s' => \"\\n<ol class=\\\"bb-list-ordered,bb-list-ordered-lr\\\">\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[list(?::o)?(:\\w+)?=I\\]\\s*(?:<br\\s*\\/?>)?/s' => \"\\n<ol class=\\\"bb-list-ordered,bb-list-ordered-ur\\\">\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[list(?::o)?(:\\w+)?=a\\]\\s*(?:<br\\s*\\/?>)?/s' => \"\\n<ol class=\\\"bb-list-ordered,bb-list-ordered-la\\\">\",\n '/(?<!\\\\\\\\)(?:\\s*<br\\s*\\/?>\\s*)?\\[list(?::o)?(:\\w+)?=A\\]\\s*(?:<br\\s*\\/?>)?/s' => \"\\n<ol class=\\\"bb-list-ordered,bb-list-ordered-ua\\\">\",\n // escaped tags like \\[b], \\[color], \\[url], ...\n '/\\\\\\\\(\\[\\/?\\w+(?::\\w+)*\\])/' => \"\\\\1\"\n\n );\n $message = preg_replace(array_keys($preg), array_values($preg), $message);\n return $message;\n}",
"private function clearBBCode($p_text)\r\n\t\t{\r\n //$p_text = preg_replace('`\\[EMAIL\\]([^\\[]*)\\[/EMAIL\\]`i','<a href=\"mailto:\\\\1\">\\\\1</a>',$p_text);\r\n //$p_text = preg_replace('`\\[EMAIL\\](.*?)\\[/EMAIL\\]`i','<a href=\"mailto:\\\\1\">\\\\1</a>',$p_text);\r\n // Information : Double [/email][/email] to avoid end of email area\r\n $p_text = preg_replace('`\\[email\\](.*?(\\[/email\\]\\[/email\\].*?)*)\\[/email\\](?!(\\[/email\\]))`i','\\\\1',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[b\\]([^\\[]*)\\[/b\\]`i','<b>\\\\1</b>',$p_text); // Generation 1 : First [ or ] encounter stop translation\r\n //$p_text = preg_replace('`\\[b\\](.*?)\\[/b\\]`i','<b>\\\\1</b>',$p_text); // Generation 2 : Can't bold string [/b]\r\n // Generation 3 : Information : Double [/b][/b] to avoid end of bold area\r\n $p_text = preg_replace('`\\[b\\](.*?(\\[/b\\]\\[/b\\].*?)*)\\[/b\\](?!(\\[/b\\]))`i','\\\\1',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[i\\]([^\\[]*)\\[/i\\]`i','<i>\\\\1</i>',$p_text);\r\n //$p_text = preg_replace('`\\[i\\](.*?)\\[/i\\]`i','<i>\\\\1</i>',$p_text);\r\n // Information : Double [/i][/i] to avoid end of italic area\r\n $p_text = preg_replace('`\\[i\\](.*?(\\[/i\\]\\[/i\\].*?)*)\\[/i\\](?!(\\[/i\\]))`i','\\\\1',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[u\\]([^\\[]*)\\[/u\\]`i','<u>\\\\1</u>',$p_text);\r\n //$p_text = preg_replace('`\\[u\\](.*?)\\[/u\\]`i','<u>\\\\1</u>',$p_text);\r\n // Information : Double [/u][/u] to avoid end of underline area\r\n $p_text = preg_replace('`\\[u\\](.*?(\\[/u\\]\\[/u\\].*?)*)\\[/u\\](?!(\\[/u\\]))`i','\\\\1',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[s\\]([^\\[]*)\\[/s\\]`i','<s>\\\\1</s>',$p_text);\r\n //$p_text = preg_replace('`\\[s\\](.*?)\\[/s\\]`i','<s>\\\\1</s>',$p_text);\r\n // Information : Double [/s][/s] to avoid end of stroke line area\r\n $p_text = preg_replace('`\\[s\\](.*?(\\[/s\\]\\[/s\\].*?)*)\\[/s\\](?!(\\[/s\\]))`i','\\\\1',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[center\\]([^\\[]*)\\[/center\\]`','<p style=\"text-align: center;\">\\\\1</p>',$p_text);\r\n //$p_text = preg_replace('`\\[center\\](.*?)\\[/center\\]`','<p style=\"text-align: center;\">\\\\1</p>',$p_text);\r\n // Information : Double [/center][/center] to avoid end of center line area\r\n $p_text = preg_replace('`\\[center\\](.*?(\\[/center\\]\\[/center\\].*?)*)\\[/center\\](?!(\\[/center\\]))`i','\\\\1',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[left\\]([^\\[]*)\\[/left\\]`i','<p style=\"text-align: left;\">\\\\1</p>',$p_text);\r\n //$p_text = preg_replace('`\\[left\\](.*?)\\[/left\\]`i','<p style=\"text-align: left;\">\\\\1</p>',$p_text);\r\n // Information : Double [/left][/left] to avoid end of left line area\r\n $p_text = preg_replace('`\\[left\\](.*?(\\[/left\\]\\[/left\\].*?)*)\\[/left\\](?!(\\[/left\\]))`i','\\\\1',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[right\\]([^\\[]*)\\[/right\\]`i','<p style=\"text-align: right;\">\\\\1</p>',$p_text);\r\n //$p_text = preg_replace('`\\[right\\](.*?)\\[/right\\]`i','<p style=\"text-align: right;\">\\\\1</p>',$p_text);\r\n // Information : Double [/right][/right] to avoid end of right line area\r\n $p_text = preg_replace('`\\[right\\](.*?(\\[/right\\]\\[/right\\].*?)*)\\[/right\\](?!(\\[/right\\]))`i','\\\\1',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[img\\]([^\\[]*)\\[/img\\]`i','<img src=\"\\\\1\" />',$p_text);\r\n //$p_text = preg_replace('`\\[img\\](.*?)\\[/img\\]`i','<img src=\"\\\\1\" />',$p_text);\r\n // Information : Double [/img][/img] to avoid end of picture area\r\n $p_text = preg_replace('`\\[img\\](.*?(\\[/img\\]\\[/img\\].*?)*)\\[/img\\](?!(\\[/img\\]))`i','\\\\1',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[color=([^[]*)\\]([^[]*)\\[/color\\]`i','<font color=\"\\\\1\">\\\\2</font>',$p_text);\r\n //$p_text = preg_replace('`\\[color=(.*?)\\](.*?)\\[/color\\]`i','<font color=\"\\\\1\">\\\\2</font>',$p_text);\r\n // Information : Double [/color][/color] to avoid end of color area\r\n $p_text = preg_replace('`\\[color=(.*?)\\](.*?(\\[/color\\]\\[/color\\].*?)*)\\[/color\\](?!(\\[/color\\]))`i','\\\\2',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[bg=([^[]*)\\]([^[]*)\\[/bg\\]`i','<font style=\"background-color: \\\\1;\">\\\\2</font>',$p_text);\r\n //$p_text = preg_replace('`\\[bg=(.*?)\\](.*?)\\[/bg\\]`i','<font style=\"background-color: \\\\1;\">\\\\2</font>',$p_text);\r\n // Information : Double [/bg][/bg] to avoid end of background color area\r\n $p_text = preg_replace('`\\[bg=(.*?)\\](.*?(\\[/bg\\]\\[/bg\\].*?)*)\\[/bg\\](?!(\\[/bg\\]))`i','\\\\2',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[size=([^[]*)\\]([^[]*)\\[/size\\]`i','<font size=\"\\\\1\">\\\\2</font>',$p_text);\r\n //$p_text = preg_replace('`\\[size=(.*?)\\](.*?)\\[/size\\]`i','<font size=\"\\\\1\">\\\\2</font>',$p_text);\r\n // Information : Double [/size][/size] to avoid end of font size area\r\n $p_text = preg_replace('`\\[size=(.*?)\\](.*?(\\[/size\\]\\[/size\\].*?)*)\\[/size\\](?!(\\[/size\\]))`i','\\\\2',$p_text);\r\n\r\n //$p_text = preg_replace('`\\[font=([^[]*)\\]([^[]*)\\[/font\\]`i','<font face=\"\\\\1\">\\\\2</font>',$p_text);\r\n //$p_text = preg_replace('`\\[font=(.*?)\\](.*?)\\[/font\\]`i','<font face=\"\\\\1\">\\\\2</font>',$p_text);\r\n // Information : Double [/font][/font] to avoid end of font area\r\n $p_text = preg_replace('`\\[font=(.*?)\\](.*?(\\[/font\\]\\[/font\\].*?)*)\\[/font\\](?!(\\[/font\\]))`i','\\\\2',$p_text);\r\n\r\n // Information : Double [/url][/url] to avoid end of URL area\r\n $p_text = preg_replace('`\\[url\\](.*?(\\[/url\\]\\[/url\\].*?)*)\\[/url\\](?!(\\[/url\\]))`i','\\\\1',$p_text);\r\n $p_text = preg_replace('`\\[url=(.*?)\\](.*?(\\[/url\\]\\[/url\\].*?)*)\\[/url\\](?!(\\[/url\\]))`i','\\\\2',$p_text);\r\n\r\n // Found a randomized string do not exists in string to convert\r\n $temp_str = '7634253332';while(stristr($p_text,$temp_str)){$temp_str = mt_rand();}\r\n $p_text = str_replace('[br][br]',$temp_str,$p_text);\r\n $p_text = preg_replace('`(?<!\\[br\\])\\[br\\](?!(\\[br\\]))`i','\\\\',$p_text);\r\n $p_text = str_replace($temp_str,'',$p_text);\r\n\r\n // Found a randomized string do not exists in string to convert\r\n $temp_str = '7634253332';while(stristr($p_text,$temp_str)){$temp_str = mt_rand();}\r\n $p_text = str_replace('[hr][hr]',$temp_str,$p_text);\r\n $p_text = preg_replace('`(?<!\\[hr\\])\\[hr\\](?!(\\[hr\\]))`i','\\\\',$p_text);\r\n $p_text = str_replace($temp_str,'',$p_text);\r\n\r\n return $p_text;\r\n\t\t}",
"function strbbcode1 ($matches) {\r\n\t\r\n\tglobal $bbcode , $xhtml , $emoticonc , $emoticonv ,$emoticonnb, $bbcss_code, $bbcss_code_titre;\r\n\tfor($em=0;$em<$emoticonnb;$em++)\t$matches[1] = str_replace($emoticonc[$em],'<img src=\"'.$emoticonv[$em].'\" border=\"0\" alt=\"\" />',$matches[1]);\r\n\treturn preg_replace ($bbcode , $xhtml , $matches[1]).'<h6 style=\"'.$bbcss_code_titre.'\">Code :</h6><div style=\"'.$bbcss_code.'\"><pre>';\r\n\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update assignee for conversation This endpoint update assignee of conversation in the company using whatsapp channel | public function updateAssignee(int $companyId, int $conversationId, int $assigneeId)
{
$this->validator->_($assigneeId <= 0, 'Assignee id must be greater than 0');
$body = ["assignee_id" => $assigneeId];
return $this->request(
Methods::PUT,
static::SERVICE_ENDPOINT . '/%s/assign',
[$companyId, $conversationId],
$body
);
} | [
"protected function update_assigned_to() {\n // Verify the nonce\n $response = new AjaxResponse( $this->verified() );\n\n // Make sure we have the proper parameters\n $response->check( isset( $_POST['tid'] ) && isset( $_POST['auid'] ), _('Failed to update assigned user') );\n\n // If there is an error or now user id, return\n if ( $response->has_error() )\n return $response;\n\n $assigned_user = new User();\n $assigned_user->get( $_POST['auid'] );\n $response->check( $assigned_user->has_permission( User::ROLE_COMPANY_ADMIN ), 'Can not assign ticket to ' . $assigned_user->contact_name );\n if ( $response->has_error() )\n return $response;\n\n // Get ticket\n $ticket = new Ticket();\n $ticket->get( $_POST['tid'] );\n\n // Change priority\n $ticket->assigned_to_user_id = $_POST['auid'];\n\n // Update ticket\n $ticket->save();\n\n // Send out email\n $priorities = array(\n Ticket::PRIORITY_NORMAL => 'Normal',\n Ticket::PRIORITY_HIGH => 'High',\n Ticket::PRIORITY_URGENT => 'Urgent'\n );\n\n // Send out an email if their role is less than 8\n $message = 'Hello ' . $assigned_user->contact_name . \",\\n\\n\";\n $message .= 'You have been assigned Ticket #' . $ticket->id . \". To view it, follow the link below:\\n\\n\";\n $message .= 'http://admin.greysuitretail.com/customer-support/#!tid=' . $ticket->id . \"\\n\\n\";\n $message .= 'Priority: ' . $priorities[$ticket->priority] . \"\\n\\n\";\n $message .= \"Sincerely,\\n\" . $assigned_user->company . \" Team\";\n\n library('sendgrid-api');\n SendgridApi::send( $assigned_user->email, 'You have been assigned Ticket #' . $ticket->id . ' (' . $priorities[$ticket->priority] . ') - ' . $ticket->summary, $message, $assigned_user->company . ' <noreply@' . url::domain( $assigned_user->domain, false ) . '>' );\n\n // If assigned to Development, make sure it's on Jira\n if ( $assigned_user->id == User::DEVELOPMENT ) {\n if ( $ticket->jira_id ) {\n $ticket->update_jira_issue();\n } else {\n $ticket->create_jira_issue();\n\n $ticket_comment = new TicketComment();\n $comments = $ticket_comment->get_by_ticket( $ticket->id );\n if ( $comments ) {\n foreach ( $comments as $comment ) {\n $comment->create_jira_comment();\n }\n }\n }\n }\n\n return $response;\n }",
"public function updateAssignee($postData)\n\t{\t\n\t\t$this->db->where('Id',$postData['contactId']);\n\t\t$this->db->update('leads', array(\"AssignedUserId\" => $postData['AssignedUserId'])); \n\t\tif($this->db->affected_rows() > 0)\n\t\t{\n\t\t\treturn array(\"status\"=>1,\"data\"=>$this->db->affected_rows(),\"message\"=>'success');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array(\"status\"=>0,\"data\"=>'',\"message\"=>'Sorry There is some error');\n\t\t}\n\t}",
"public function setAssignee($value)\n {\n return $this->set('Assignee', $value);\n }",
"function setOwnerForAssignor()\n {\n $recipTable = mapi_message_getrecipienttable($this->message);\n $recips = mapi_table_queryallrows($recipTable, array(PR_DISPLAY_NAME));\n\n if (!empty($recips)) {\n $owner = array();\n foreach ($recips as $value) {\n $owner[] = $value[PR_DISPLAY_NAME];\n }\n\n $props = array($this->props['owner'] => implode(\"; \", $owner));\n mapi_setprops($this->message, $props);\n }\n }",
"public function assignuserAction()\n {\n $user_params=$this->_request->getParams();\n $automail=new Ep_Message_AutoEmails();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $data = array(\"assigned_to\"=>$user_params['userId'], \"assigned_at\"=>date('Y-m-d H:i:s'), \"status\"=>\"pending\", \"closed_at\"=>NULL, \"cancelled_at\"=>NULL);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $ftvrequest_obj->updateFtvRequests($data,$query);\n $deletequery = \"ftvrequest_id= '\".$user_params['requestId'].\"'\";\n $ftvpausetime_obj->deleteFtvPauseTime($deletequery);\n $parameters['ftvType'] = \"chaine\";\n if($user_params['userId'] != '110823103540627') ///supposed to be johny head of BO user for FTV\n $automail->messageToEPMail($user_params['userId'],113,$parameters);//\n }",
"public function setAssignee(?WorkbookEmailIdentity $value): void {\n $this->getBackingStore()->set('assignee', $value);\n }",
"public function setAssignee($var)\n {\n GPBUtil::checkString($var, True);\n $this->assignee = $var;\n\n return $this;\n }",
"public function getAssignee()\n {\n return $this->assignee;\n }",
"public function removeAssignee()\n {\n $ticket = Ticket::find(\\request('id'));\n $ticket->update(['assigned_to' => null]);\n return response()->json('');\n }",
"public function setAssigneeEmail($assigneeEmail);",
"public function assignToUser($data){\r\n $client_id = $data['client_id'];\r\n $user_id = $data['user_id'];\r\n $sql = \"UPDATE clients SET assigned_to_user = '$user_id' WHERE id = '$client_id'\";\r\n\r\n return $this->db->query($sql);\r\n }",
"public function getAssigneeName();",
"public function assignToTeam(){\n\t\t\n\t\t$app \t= JFactory::getApplication();\n\t\t\n\t\t$uid \t\t= JRequest::getInt('uid');\n\t\t$tid \t\t= JRequest::getInt('tid');\n\t\t\t\n\t\t$model \t\t= $this->getModel('teams');\n\t\t$response \t= $model->assignToTeam( $uid, $tid );\n\t\t\n\t\techo $response;\n\t\t\n\t\t$app->close();\n\t\t\n\t}",
"public function testSetAssignee()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public static function remindAssignedUser() {\n $unrespondedToTickets = Self::getUnrespondedToTickets(15);\n\n if($unrespondedToTickets->count() > 0) {\n foreach($unrespondedToTickets as $ticket) {\n $vendor = $ticket->assignedTo;\n\n $message = \"<p>Hello {$vendor->name}.<br/> You are yet to respond to the ticket ID <a href='{{ route('tickets.vendor.show', ['ticket_id'=> $ticket->ticket_id]) }}''>#{{$ticket->ticket_id}}</p>. <p>If further delayed, your unit head would be notified of your delayed response to this ticket. <br/><br/>Thank you</p>\";\n $title = \"Ticket #{$ticket->ticket_id} is yet to receive a response\";\n send_email($vendor->name, $vendor->email, $message, route('tickets.vendor.show', ['ticket_id'=> $ticket->ticket_id]), $title);\n\n }\n }\n }",
"public function setAssignee($id, TaskRequest $request) {\n $this->setRequestUrl('/task/'.$id. '/assignee');\n $this->setRequestObject($request);\n $this->setRequestMethod('POST');\n\n try {\n $this->execute();\n } catch (Exception $e) {\n throw $e;\n }\n }",
"function addTaskAssignee(Request $request)\n {\n $cid = Session::get('company_id');\n $name = $request->input('memname');\n $pid = $request->input('Project');\n $memids = MemberDetail::where('name',$name)->select('member_id')->get();\n foreach($memids as $m)\n {\n $compid = Member::where('member_id', $m->member_id)->value('company_id');\n if ($compid == $cid)\n {\n $memberid = $m->member_id;\n break;\n }\n }\n Project::where('pid',$pid)->update(['techlead_mid'=>$memberid]);\n return 'ok';\n }",
"public function getAssigneeEmail();",
"function setAssignorInRecipients($task)\n {\n $recipTable = mapi_message_getrecipienttable($task);\n\n // Delete all MAPI_TO recipients\n $recips = mapi_table_queryallrows($recipTable, array(PR_ROWID), array(RES_PROPERTY,\n array( RELOP => RELOP_EQ,\n ULPROPTAG => PR_RECIPIENT_TYPE,\n VALUE => MAPI_TO\n )));\n foreach($recips as $recip) {\n mapi_message_modifyrecipients($task, MODRECIP_REMOVE, array($recip));\n }\n\n $recips = array();\n $taskReqProps = mapi_getprops($this->message, array(PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENT_REPRESENTING_ENTRYID, PR_SENT_REPRESENTING_ADDRTYPE));\n $associatedTaskProps = mapi_getprops($task, array($this->props['taskupdates'], $this->props['tasksoc'], $this->props['taskmultrecips']));\n\n // Build assignor info\n $assignor = array( PR_ENTRYID => $taskReqProps[PR_SENT_REPRESENTING_ENTRYID],\n PR_DISPLAY_NAME => $taskReqProps[PR_SENT_REPRESENTING_NAME],\n PR_EMAIL_ADDRESS => $taskReqProps[PR_SENT_REPRESENTING_EMAIL_ADDRESS],\n PR_RECIPIENT_DISPLAY_NAME => $taskReqProps[PR_SENT_REPRESENTING_NAME],\n PR_ADDRTYPE => empty($taskReqProps[PR_SENT_REPRESENTING_ADDRTYPE]) ? 'SMTP' : $taskReqProps[PR_SENT_REPRESENTING_ADDRTYPE],\n PR_RECIPIENT_FLAGS => recipSendable\n );\n\n // Assignor has requested task updates, so set him/her as MAPI_CC in recipienttable.\n if ((isset($associatedTaskProps[$this->props['taskupdates']]) && $associatedTaskProps[$this->props['taskupdates']])\n && !(isset($associatedTaskProps[$this->props['taskmultrecips']]) && $associatedTaskProps[$this->props['taskmultrecips']] == tmrReceived)) {\n $assignor[PR_RECIPIENT_TYPE] = MAPI_CC;\n $recips[] = $assignor;\n }\n\n // Assignor wants to receive an email report when task is mark as 'Complete', so in recipients as MAPI_BCC\n if ($associatedTaskProps[$this->props['tasksoc']]) {\n $assignor[PR_RECIPIENT_TYPE] = MAPI_BCC;\n $recips[] = $assignor;\n }\n\n if (!empty($recips)) {\n mapi_message_modifyrecipients($task, MODRECIP_ADD, $recips);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The SKU pertaining to the provisioning resource as specified in the Offer. Generated from protobuf field .google.cloud.channel.v1.Sku sku = 11; | public function setSku($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\Sku::class);
$this->sku = $var;
return $this;
} | [
"public function getSku()\n {\n return $this->_fields['Sku']['FieldValue'];\n }",
"function getSku() {\n\t\treturn $this->_Sku;\n\t}",
"public function getSku(): string\n {\n return $this->sku;\n }",
"public function setSku($sku);",
"public function sku()\n {\n return $this->sku;\n }",
"public function getSku(): string\r\n {\r\n \treturn $this->sku;\r\n }",
"public function setSKU($sku);",
"public function getSKU()\r\n {\r\n return $this->fields['SKU']['value'];\r\n }",
"public function setSku($sku){\n $this->sku = $sku;\n }",
"public function getSKU()\n {\n return $this->_fields['SKU']['FieldValue'];\n }",
"public function getSku() {\n return $this->item->getSku();\n }",
"public function getSkuId()\n {\n return $this->SkuId;\n }",
"public function getSKU();",
"private function createSku()\n {\n $product = $this->createProduct();\n\n return Sku::create([\n 'price' => 500,\n 'currency' => 'usd',\n 'id' => 'silver-sku-'.self::generateRandomString(20),\n 'inventory' => [\n 'type' => 'finite',\n 'quantity' => 40,\n ],\n 'product' => $product->id,\n ]);\n }",
"public function getProductSKU()\n {\n }",
"public function setSku($sku)\n {\n $this->sku = $sku;\n }",
"public function getSkuId()\n {\n return $this->sku_id;\n }",
"public function getSkuCode()\n {\n return $this->skuCode;\n }",
"public function getVariantSku() : string\n {\n return $this->variantSku;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
F U N C T I O N S This function detects two rectangles collision using their coordinates and dimensions | function rectangle_collision($x_1, $y_1, $width_1, $height_1, $x_2, $y_2, $width_2, $height_2)
{
return ($x_1 < ($x_2 + $width_2) && ($x_1 + $width_1) > $x_2 && $y_1 < ($y_2 + $height_2) && ($y_1 + $height_1) > $y_2);
} | [
"function CheckCollisionRecs(\\raylib\\Rectangle $rec1, \\raylib\\Rectangle $rec2): bool { return false; }",
"function collision_detect($shapes){\n // let's start by check to see if the bottom left co-rdinate of our first shape is higher or lower than the second \n if($shapes[0]['bottom_left'][0]<$shapes[1]['bottom_left'][0]){\n \n // check to see if the right hand co-ordinate is less\n if($shapes[0]['bottom_right'][0]<$shapes[1]['bottom_left'][0]){\n // no collision\n $data['x_collision'] = false;\n }\n else{\n // collision\n $data['x_collision'] = true;\n }\n\n }\n else{\n // check to see if the right hand co-ordinate is greater\n if($shapes[0]['bottom_left'][0]>$shapes[1]['bottom_right'][0]){\n // no collision\n $data['x_collision'] = false;\n }\n else{\n // collision\n $data['x_collision'] = true;\n }\n\n }\n // checking left hand side\n // check to see the top co-ordinates intersect on y axis\n if($shapes[0]['bottom_left'][1]<$shapes[1]['bottom_left'][1]){\n \n // check to see if the second bottom co-ordinate is greater\n if($shapes[0]['top_left'][1]<$shapes[1]['bottom_left'][1]){\n // no collision\n $data['y_collision'] = false;\n }\n else{\n // collision\n $data['y_collision'] = true;\n }\n\n }\n else{\n \n // check to see if the second bottom co-ordinate is greater\n if($shapes[0]['bottom_left'][1]>$shapes[1]['top_left'][1]){\n // no collision\n $data['y_collision'] = false;\n }\n else{\n // collision\n $data['y_collision'] = true;\n }\n }\n\n // checking right hand side\n // check to see the top co-ordinates intersect\n if($shapes[0]['bottom_right'][1]<$shapes[1]['bottom_right'][1]){\n \n // check to see if the second bottom co-ordinate is greater\n if($shapes[0]['top_right'][1]<$shapes[1]['bottom_right'][1]){\n // no collision\n $data['y_collision'] = false;\n }\n else{\n // collision\n $data['y_collision'] = true;\n }\n\n }\n else{\n \n // check to see if the second bottom co-ordinate is greater\n if($shapes[0]['bottom_right'][1]>$shapes[1]['top_right'][1]){\n // no collision\n $data['y_collision'] = false;\n }\n else{\n // collision\n $data['y_collision'] = true;\n }\n }\n // let's check to see if we are dealing with a 3d shape\n if(isset($shapes[0]['bottom_left'][2])){\n // check to see shapes collide on z axis\n // let's start by check to see if the bottom left front co-rdinate of our first shape is higher or lower than the second (checking if shape 1 is in front of or behind shape 2)\n if($shapes[0]['bottom_left'][2]<$shapes[1]['bottom_left'][2]){\n // shape 1 is in front of shape 2\n // check the position of all 4 corners\n // check to see if shape 1 bottom left hand back co-ordinate is less than shape 2 bottom left front\n if($shapes[0]['bottom_left'][3]<$shapes[1]['bottom_left'][2]){\n // no collision\n $data['z_collision'] = false;\n }\n else{\n // collision\n $data['z_collision'] = true;\n }\n \n // check to see if shape 1 bottom right hand back co-ordinate is less than shape 2 bottom left front\n if($shapes[0]['bottom_right'][3]<$shapes[1]['bottom_right'][2]){\n // no collision\n $data['z_collision'] = false;\n }\n else{\n // collision\n $data['z_collision'] = true;\n }\n \n // check to see if shape 1 top left hand back co-ordinate is less than shape 2 bottom left front\n if($shapes[0]['top_left'][3]<$shapes[1]['top_left'][2]){\n // no collision\n $data['z_collision'] = false;\n }\n else{\n // collision\n $data['z_collision'] = true;\n }\n \n // check to see if shape 1 top right hand back co-ordinate is less than shape 2 bottom left front\n if($shapes[0]['top_right'][3]<$shapes[1]['top_right'][2]){\n // no collision\n $data['z_collision'] = false;\n }\n else{\n // collision\n $data['z_collision'] = true;\n }\n\n }\n else{\n // shape 1 is in behind shape 2\n // check the position of all 4 corners\n // check to see if shape 1 bottom left hand back co-ordinate is less than shape 2 bottom left front\n if($shapes[0]['bottom_left'][2]>$shapes[1]['bottom_left'][3]){\n // no collision\n $data['z_collision'] = false;\n }\n else{\n // collision\n $data['z_collision'] = true;\n }\n \n // check to see if shape 1 bottom right hand back co-ordinate is less than shape 2 bottom left front\n if($shapes[0]['bottom_right'][2]>$shapes[1]['bottom_right'][3]){\n // no collision\n $data['z_collision'] = false;\n }\n else{\n // collision\n $data['z_collision'] = true;\n }\n \n // check to see if shape 1 top left hand back co-ordinate is less than shape 2 bottom left front\n if($shapes[0]['top_left'][2]>$shapes[1]['top_left'][3]){\n // no collision\n $data['z_collision'] = false;\n }\n else{\n // collision\n $data['z_collision'] = true;\n }\n \n // check to see if shape 1 top right hand back co-ordinate is less than shape 2 bottom left front\n if($shapes[0]['top_right'][2]>$shapes[1]['top_right'][3]){\n // no collision\n $data['z_collision'] = false;\n }\n else{\n // collision\n $data['z_collision'] = true;\n }\n\n }\n }\n else{\n // if no z axis is set then we always consider z axis true\n $data['z_collision'] = true; \n }\n\n\n echo \"<hr><h3>Result</h3>\";\n\n if($data['x_collision']&&$data['y_collision']&&$data['z_collision']){\n echo \"<br><strong>Collision</strong><br>\";\n }\n else{\n // collision\n echo \"<br><strong>No Collision</strong><br>\";\n }\n\n return $data;\n\n}",
"public function intersect($otherRect) {}",
"private function rectIntersect($r1,$r2){\n\t\tif(max($r1['left'], $r2['left']) <= min($r1['right'], $r2['right'])\n\t\t\t\t&& max($r1['top'], $r2['top']) <= min($r1['bottom'], $r2['bottom'])){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"function CheckCollisionBoxes(\\raylib\\BoundingBox $box1, \\raylib\\BoundingBox $box2): bool { return false; }",
"public function contains($otherRect) {}",
"function Intersects(wxRect $rect){}",
"function Intersect(wxRect $rect, wxRect $rect){}",
"private function checkCollision($element1, $element2) {\n $x1 = $element1->getPositionX();\n $x2 = $element2->getPositionX();\n $y1 = $element1->getPositionY();\n $y2 = $element2->getPositionY();\n\n $maxLeft = max($x1, $x2);\n $minRight = min($x1 + self::$_ELEMENT_SIZE, $x2 + self::$_ELEMENT_SIZE);\n $maxBottom = max($y1, $y2);\n $minTop = min($y1 + self::$_ELEMENT_SIZE, $y2 + self::$_ELEMENT_SIZE);\n\n if (($maxLeft < $minRight) && ($maxBottom < $minTop)) { // intersection\n return true; // collision\n }\n // no collision\n return false;\n }",
"private function rectIntersect2($rectangles) {\n\t\t$num_rectangles = count($rectangles);\n\t\tfor ($i = 0; $i < $num_rectangles; $i++) {\n\t\t\t//for each rectangle, compare points to every following rectangle\n\t\t\t$R1 = $rectangles[$i];\n\t\t\tfor ($k = $i; $k < ($num_rectangles - $i); $k++) {\n\t\t\t\t$R2 = $rectangles[$k + 1];\n\t\t\t\tif ($R1['LR']['x'] > $R2['UL']['x'] && $R1['UL']['x'] < $R2['LR']['x']) {\n\t\t\t\t\t//rectangles cross on x-axis\n\t\t\t\t\tif (($R1['LR']['y'] < $R2['UL']['y'] && $R1['UR']['y'] < $R2['LR']['y']) ||\n\t\t\t\t\t\t\t($R1['UL']['y'] > $R2['LR']['y'] && $R1['LR']['y'] < $R2['UL']['y'])) {\n\t\t\t\t\t\t//rectangles intersect\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"function overlaps($dd1, $dd2) {\r\n /*if (empty($coordinates)) {\r\n return false;\r\n }*/\r\n\r\n // horizontally aligned?\r\n $horizontal = (($dd1->x >= $dd2->x && $dd1->x <= $dd2->x + $dd2->width)\r\n || ($dd1->x + $dd1->width >= $dd2->x && $dd1->x + $dd1->width <= $dd2->x + $dd2->width)\r\n || ($dd1->x < $dd2->x && $dd1->x + $dd1->width > $dd2->x + $dd2->width));\r\n // vertically aligned?\r\n $vertical = (($dd1->y >= $dd2->y && $dd1->y <= $dd2->y + $dd2->height)\r\n ||($dd1->y + $dd1->height >= $dd2->y && $dd1->y + $dd1->height <= $dd2->y + $dd2->height)\r\n || ($dd1->y < $dd2->y && $dd1->y + $dd1->height > $dd2->y + $dd2->height));\r\n\r\n return ($horizontal && $vertical);\r\n }",
"function CheckCollisionLines(\\raylib\\Vector2 $startPos1, \\raylib\\Vector2 $endPos1, \\raylib\\Vector2 $startPos2, \\raylib\\Vector2 $endPos2, \\raylib\\Vector2 &$collisionPoint): bool { return false; }",
"private function overlaps($x, $y, $left)\n {\n foreach($_SESSION['randomID']['fish'] as $fishy){\n if(($left == $fishy['left']) && //check if on same layer\n (\n (($x>=$fishy['x']&&$x<=($fishy['x']+96)) || ($x<=$fishy['x']&&($x+96)>=$fishy['x'])) && //check if x position is overlapping\n (($y>=$fishy['y']&&($y-54)<=$fishy['y']) || ($y<=$fishy['y']&&$y>=($fishy['y']-54))) // check if y position is overlapping\n )\n )\n {\n return true;\n }\n }\n return false;\n }",
"protected function coordinates_match($a, $b)\n {\n }",
"protected function coordinates_match($a, $b)\n {\n }",
"function containsOrigin(array $rectangle): bool\n{\n\n $lt = getStartPoint($rectangle);\n $rb[\"x\"] = $lt[\"x\"] + getWidth($rectangle);\n $rb[\"y\"] = $lt[\"y\"] - getHeight($rectangle);\n \n if ($lt[\"x\"] < 0 && $lt[\"y\"] > 0) {\n if ($rb[\"x\"] > 0 && $rb[\"y\"] < 0) {\n return true;\n }\n }\n return false;\n}",
"function check_overlaps( $line1, $line2 ){\n\n if( !is_array($line1) || !is_array($line2) ){\n throw new \\Exception('Error : Argument type error.');\n }\n\n // None of the first line edges should be inside the second line.\n if( $line1['x1'] >= min( $line2 ) && $line1['x1'] <= max( $line2 ) ){\n return true;\n }\n if( $line1['x2'] >= min( $line2 ) && $line1['x2'] <= max( $line2 ) ){\n return true;\n }\n\n\n // None of the second line edges should be inside the first line.\n if( $line2['x1'] >= min( $line1 ) && $line2['x1'] <= max( $line1 ) ){\n return true;\n }\n if( $line2['x2'] >= min( $line1 ) && $line2['x2'] <= max( $line1 ) ){\n return true;\n }\n\n return false;\n\n}",
"public function roundrectangle($x1, $y1, $x2, $y2, $rx, $ry){}",
"function bevelRect($x1, $y1, $x2, $y2, $color1, $color2)\r\n {\r\n\r\n $resp = $this->forcePen();\r\n\r\n $resp .= $this->_getJavascriptVar() . \".strokeStyle = \\\"\" . $color1 . \"\\\";\\n\";\r\n $resp .= $this->drawLine(array($x1, $y2), array($x1, $y1));\r\n $resp .= $this->drawLine(array($x1, $y1), array($x2, $y1));\r\n $resp .= $this->_getJavascriptVar() . \".strokeStyle = \\\"\" . $color2 . \"\\\";\\n\";\r\n $resp .= $this->drawLine(array($x2, $y1), array($x2, $y2));\r\n $resp .= $this->drawLine(array($x2, $y2), array($x1, $y2));\r\n\r\n return $resp;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add our custom product cat rewrite rules | function devvn_product_category_rewrite_rules($flash = false) {
$terms = get_terms( array(
'taxonomy' => 'product_cat',
'post_type' => 'san-pham',
'hide_empty' => false,
));
if($terms && !is_wp_error($terms)){
$siteurl = esc_url(home_url('/'));
foreach ($terms as $term){
$term_slug = $term->slug;
$baseterm = str_replace($siteurl,'',get_term_link($term->term_id,'product_cat'));
add_rewrite_rule($baseterm.'?$','index.php?product_cat='.$term_slug,'top');
add_rewrite_rule($baseterm.'page/([0-9]{1,})/?$', 'index.php?product_cat='.$term_slug.'&paged=$matches[1]','top');
add_rewrite_rule($baseterm.'(?:feed/)?(feed|rdf|rss|rss2|atom)/?$', 'index.php?product_cat='.$term_slug.'&feed=$matches[1]','top');
}
}
if ($flash == true)
flush_rewrite_rules(false);
} | [
"public function getUrlRewriteProductCategoryAction();",
"function wpsc_taxonomy_rewrite_rules( $rewrite_rules ) {\n\tglobal $wpsc_page_titles;\n\t$products_page = $wpsc_page_titles['products'];\n\t$checkout_page = $wpsc_page_titles['checkout'];\n\t$target_string = \"index.php?product\";\n\t$replacement_string = \"index.php?post_type=wpsc-product&product\";\n\t$target_rule_set_query_var = 'products';\n\n\t$target_rule_set = array( );\n\tforeach ( $rewrite_rules as $rewrite_key => $rewrite_query ) {\n\t\tif ( stristr( $rewrite_query, \"index.php?product\" ) ) {\n\t\t\t$rewrite_rules[$rewrite_key] = str_replace( $target_string, $replacement_string, $rewrite_query );\n\t\t}\n\t\tif ( stristr( $rewrite_query, \"$target_rule_set_query_var=\" ) ) {\n\t\t\t$target_rule_set[] = $rewrite_key;\n\t\t}\n\t}\n\n\t$new_rewrite_rules[$products_page . '/(.+?)/product/([^/]+)/comment-page-([0-9]{1,})/?$'] = 'index.php?post_type=wpsc-product&products=$matches[1]&name=$matches[2]&cpage=$matches[3]';\n\t$new_rewrite_rules[$products_page . '/(.+?)/product/([^/]+)/?$'] = 'index.php?post_type=wpsc-product&products=$matches[1]&name=$matches[2]';\n\t$new_rewrite_rules[$products_page . '/(.+?)/([^/]+)/comment-page-([0-9]{1,})/?$'] = 'index.php?post_type=wpsc-product&products=$matches[1]&wpsc_item=$matches[2]&cpage=$matches[3]';\n\t$new_rewrite_rules[$products_page . '/(.+?)/([^/]+)?$'] = 'index.php?post_type=wpsc-product&products=$matches[1]&wpsc_item=$matches[2]';\n\n\t$last_target_rule = array_pop( $target_rule_set );\n\n\t$rebuilt_rewrite_rules = array( );\n\tforeach ( $rewrite_rules as $rewrite_key => $rewrite_query ) {\n\t\tif ( $rewrite_key == $last_target_rule ) {\n\t\t\t$rebuilt_rewrite_rules = array_merge( $rebuilt_rewrite_rules, $new_rewrite_rules );\n\t\t}\n\t\t$rebuilt_rewrite_rules[$rewrite_key] = $rewrite_query;\n\t}\n\n\t// fix pagination issue with product category hirarchical URL\n\tif ( get_option( 'product_category_hierarchical_url', false ) ) {\n\t\t$rule = $rebuilt_rewrite_rules[$products_page . '/(.+?)/page/?([0-9]{1,})/?$'];\n\t\tunset( $rebuilt_rewrite_rules[$products_page . '/(.+?)/page/?([0-9]{1,})/?$'] );\n\t\t$rebuilt_rewrite_rules = array_merge(\n\t\t\tarray(\n\t\t\t\t'(' . $products_page . ')/page/([0-9]+)/?' => 'index.php?pagename=$matches[1]&page=$matches[2]',\n\t\t\t\t$products_page . '/(.+?)(/.+?)?/page/?([0-9]{1,})/?$' => 'index.php?wpsc_product_category=$matches[1]&wpsc-product=$matches[2]&page=$matches[3]',\n\t\t\t),\n\t\t\t$rebuilt_rewrite_rules\n\t\t);\n\t}\n\n\t// fix pagination in WordPress 3.4\n\tif ( version_compare( get_bloginfo( 'version' ), '3.4', '>=' ) ) {\n\t\t$rebuilt_rewrite_rules = array_merge(\n\t\t\tarray(\n\t\t\t\t'(' . $products_page . ')/([0-9]+)/?$' => 'index.php?pagename=$matches[1]&page=$matches[2]',\n\t\t\t),\n\t\t\t$rebuilt_rewrite_rules\n\t\t);\n\t}\n\treturn $rebuilt_rewrite_rules;\n}",
"function add_rewrite() {\n\tadd_rewrite_rule( '^my-patterns/[^/]+/?$', 'index.php?pagename=my-patterns', 'top' );\n\tadd_rewrite_rule( '^favorites/.+/?$', 'index.php?pagename=favorites', 'top' );\n\tadd_rewrite_endpoint( 'categories', EP_AUTHORS );\n}",
"function add_query_arg_product_cats_for_filters($cat_slug) {\n // set the query arg url for product_cat from the product_cat->slug, removing _pjax\n $query_arg_product_cats_args = array(\n 'product_cat' => $cat_slug,\n );\n $the_url = add_query_arg($query_arg_product_cats_args);\n // parse the url into an array\n $parsed_url = wp_parse_url($the_url);\n // get the page path from the array\n $url_path = $parsed_url['path'];\n // the value we will use to search for in string\n $key_value = 'category'; \n // find key_value string in the page path\n $found = strpos_recursive($url_path, $key_value);\n // if the 'category' exists in the current page path\n if($found) {\n // before new path\n $new_path = '/shop';\n // remove the current url page path from url string & set new path\n $new_path .= str_replace($url_path,'/',$the_url);\n } else {\n // if 'category' doesnt exist in current page url, set the add_query_arg url to the default state abouve\n $new_path = $the_url;\n }\n // return the new path\n return esc_url($new_path);\n}",
"function cc_bare_category_rewrite_rules($rules) {\n\n\t$cc_rules = array();\n\n\t# We unset this existing rule so that we can later re-append it to the\n\t# list of rewrite rules, else it will match before the more specific\n\t# ones do.\n\tunset($rules['(.+?)/?$']);\n\n\t# Handles pagination for URLs like /catname/year/month/page/#\n\t$cc_rules['(.+?)/([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$'] = 'index.php?category_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]';\n\n\t# Handles pagination for URLs like /catname/year/page/#\n\t$cc_rules['(.+?)/([0-9]{4})/page/?([0-9]{1,})/?$'] = 'index.php?category_name=$matches[1]&year=$matches[2]&paged=$matches[3]';\n\n\t# Handles pagination for URLs like /catname/page/#\n\t$cc_rules['(.+?)/page/?([0-9]{1,})/?$'] = 'index.php?category_name=$matches[1]&paged=$matches[2]';\n\n\t# Handles the basic bare category for URLs like /catname\n\t$cc_rules['(.+?)/?$'] = 'index.php?category_name=$matches[1]';\n\n\t# Now append our rules to the ones WP generated\n\treturn $rules + $cc_rules;\n\n}",
"function online_resources_cat_rewrite_rule() {\n\t$resources = get_posts( array(\n\t\t'post_type' => 'post',\n\t\t'numberposts' => -1,\n\t\t'category_name' => 'resources'\n\t) );\n\n\tif ( $resources ) {\n\t\tforeach ( $resources as $resource ) {\n\t\t\tif ( $resource->post_status === 'publish' ) {\n\t\t\t\tadd_rewrite_rule( 'student-resources/([^/]+)/?$', 'index.php?post_type=post&name=$matches[1]', 'top' );\n\t\t\t}\n\t\t}\n\t}\n}",
"function add_query_arg_product_cats_for_filters($cat_slug) {\n // set the query arg url for product_cat from the product_cat->slug\n $query_arg_product_cats_args = array(\n 'product_cat' => $cat_slug,\n );\n $the_url = add_query_arg($query_arg_product_cats_args);\n // parse the url into an array\n $parsed_url = wp_parse_url($the_url);\n // get the page path from the array\n $url_path = $parsed_url['path'];\n // the value we will use to search for in string\n $key_value = 'category'; \n // find key_value string in the page path\n $found = strpos_recursive($url_path, $key_value);\n // if the 'category' exists in the current page path\n if($found) {\n // before new path\n $new_path = get_permalink(woocommerce_get_page_id('shop'));\n // remove the current url page path from url string & set new path\n $new_path .= str_replace($url_path,'/',$the_url);\n } else {\n // if 'category' doesnt exist in current page url, set the add_query_arg url to the default state abouve\n $new_path = $the_url;\n }\n // return the new path\n return esc_url($new_path);\n}",
"function register_portfolio_rewrite_rules( $wp_rewrite ) {\n \n\t$new_rules = array( \n 'clases_cursos_yoga/categoria(.+?)/categoria(.+?)/categoria(.+?)/([^/]+)/?$' => 'index.php?name=' . $wp_rewrite->preg_index( 4 ),\n 'clases_cursos_yoga/categoria(.+?)/categoria(.+?)/(.*(?<!categoria)).*/?$'=> 'index.php?category_name=' . $wp_rewrite->preg_index( 3 ),\n 'clases_cursos_yoga/categoria(.+?)/((categoria).*)/?$'=> 'index.php?category_name=' . $wp_rewrite->preg_index( 2 ),\n 'clases_cursos_yoga/categoria(.+?)/(.*(?<!categoria)).*/?$'=> 'index.php?name=' . $wp_rewrite->preg_index( 2 ),\n 'clases_cursos_yoga/categoria(.+?)/categoria(.+?)/(.*(?<!categoria)).*/?$'=> 'index.php?name=' . $wp_rewrite->preg_index( 3 ),\n 'centros-yoga/yoga-barcelona/bcn-centro-urquinaona-horarios/?$' => 'index.php?post_type=horariocentral',\n 'centros-yoga/yoga-barcelona/bcn-poblenou-horarios/?$' => 'index.php?post_type=horariopoblenou',\n 'centros-yoga/yoga-barcelona/bcn-gracia-horarios/?$' => 'index.php?post_type=horariogracia',\n\t);\n\t$wp_rewrite->rules = $new_rules + $wp_rewrite->rules;\n \n//var_dump($wp_rewrite);\n\n}",
"function no_category_base_rewrite_rules($category_rewrite) {\n $category_rewrite = array();\n $categories = get_categories(array('hide_empty' => false));\n foreach ($categories as $category) {\n $category_nicename = $category -> slug;\n if ($category -> parent == $category -> cat_ID)// recursive recursion\n $category -> parent = 0;\n elseif ($category -> parent != 0)\n $category_nicename = get_category_parents($category -> parent, false, '/', true) . $category_nicename;\n $category_rewrite['(' . $category_nicename . ')/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?category_name=$matches[1]&feed=$matches[2]';\n\t\t\t$category_rewrite['(' . $category_nicename . ')/page/?([0-9]{1,})/?$'] = 'index.php?category_name=$matches[1]&paged=$matches[2]';\n $category_rewrite['(' . $category_nicename . ')/?$'] = 'index.php?category_name=$matches[1]';\n }\n // Redirect support from Old Category Base\n global $wp_rewrite;\n $old_category_base = get_option('category_base') ? get_option('category_base') : 'category';\n $old_category_base = trim($old_category_base, '/');\n $category_rewrite[$old_category_base . '/(.*)$'] = 'index.php?category_redirect=$matches[1]';\n //var_dump($category_rewrite); // For Debugging\n\t\treturn $category_rewrite;\n }",
"function no_category_base_rewrite_rules($category_rewrite) {\r\n $category_rewrite = array();\r\n $categories = get_categories(array('hide_empty' => false));\r\n foreach ($categories as $category) {\r\n $category_nicename = $category -> slug;\r\n if ($category -> parent == $category -> cat_ID)// recursive recursion\r\n $category -> parent = 0;\r\n elseif ($category -> parent != 0)\r\n $category_nicename = get_category_parents($category -> parent, false, '/', true) . $category_nicename;\r\n $category_rewrite['(' . $category_nicename . ')/(?:feed/)?(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?category_name=$matches[1]&feed=$matches[2]';\r\n $category_rewrite['(' . $category_nicename . ')/page/?([0-9]{1,})/?$'] = 'index.php?category_name=$matches[1]&paged=$matches[2]';\r\n $category_rewrite['(' . $category_nicename . ')/?$'] = 'index.php?category_name=$matches[1]';\r\n }\r\n // Redirect support from Old Category Base\r\n global $wp_rewrite;\r\n $old_category_base = get_option('category_base') ? get_option('category_base') : 'category';\r\n $old_category_base = trim($old_category_base, '/');\r\n $category_rewrite[$old_category_base . '/(.*)$'] = 'index.php?category_redirect=$matches[1]';\r\n \r\n //var_dump($category_rewrite); // For Debugging\r\n return $category_rewrite;\r\n}",
"public function add_rewrite_tags()\n {\n }",
"protected function _addUrlRewrite()\n {\n $urlRewrites = null;\n if ($this->_cacheConf) {\n if (!($urlRewrites = Mage::app()->loadCache($this->_cacheConf['prefix'] . 'urlrewrite'))) {\n $urlRewrites = null;\n } else {\n $urlRewrites = unserialize($urlRewrites);\n }\n }\n\n if (!$urlRewrites) {\n $productIds = array();\n foreach($this->getItems() as $item) {\n $productIds[] = $item->getEntityId();\n }\n if (!count($productIds)) {\n return;\n }\n\n $select = $this->_factory->getProductUrlRewriteHelper()\n ->getTableSelect($productIds, $this->_urlRewriteCategory, Mage::app()->getStore()->getId());\n\n $urlRewrites = array();\n foreach ($this->getConnection()->fetchAll($select) as $row) {\n if (!isset($urlRewrites[$row['product_id']])) {\n $urlRewrites[$row['product_id']] = $row['request_path'];\n }\n }\n\n if ($this->_cacheConf) {\n Mage::app()->saveCache(\n serialize($urlRewrites),\n $this->_cacheConf['prefix'] . 'urlrewrite',\n array_merge($this->_cacheConf['tags'], array(Mage_Catalog_Model_Product_Url::CACHE_TAG)),\n $this->_cacheLifetime\n );\n }\n }\n\n foreach($this->getItems() as $item) {\n if (empty($this->_urlRewriteCategory)) {\n $item->setDoNotUseCategoryId(true);\n }\n if (isset($urlRewrites[$item->getEntityId()])) {\n $item->setData('request_path', $urlRewrites[$item->getEntityId()]);\n } else {\n $item->setData('request_path', false);\n }\n }\n }",
"function add_rewrite_rules() {\n\n\tadd_rewrite_tag( '%image%', '([^/]*)');\n\n\tadd_rewrite_rule('^gallery/([^/]*)/([^/]*)/?$', 'index.php?gallery=$matches[1]&image=$matches[2]', 'top');\n}",
"function getNewsCategoryPath() {\n\treturn rewrite_path(\"/category/\",\"&category=\",false);\n}",
"function templatic_add_rewrite_city_rules() {\r\n\tglobal $wp_rewrite,$wpdb;\r\n\t$city_slug=get_option('location_multicity_slug');\r\n\t$multi_city=($city_slug)? $city_slug : 'city';\r\n\t\r\n\t$wp_rewrite->add_rewrite_tag('%city%', '([^/]+)', $multi_city.'=');\r\n\t$pid = get_option('default_comments_page');\r\n\tif(!get_option('permalink_autoupdate')){\r\n\t\t$wpdb->query($wpdb->prepare(\"DELETE FROM $wpdb->options WHERE option_name like '%s'\",'%_tevolution_query_%' ));\r\n\t\tupdate_option('permalink_autoupdate',1);\r\n\t}\r\n\tif($pid =='last'){ $pid ='1'; }else{ $pid ='1';}\r\n\t$location_post_type=get_option('location_post_type');\r\n\t$tevolution_taxonomies=get_option('templatic_custom_taxonomy');\r\n\r\n\t$tevolution_taxonomies_data=get_option('tevolution_taxonomies_rules_data');\r\n\tif($location_post_type!='' ||!empty($location_post_type)){\r\n\t\tforeach($location_post_type as $post_type){\r\n\t\t\t$posttype=explode(',',$post_type);\r\n\t\t\t$wp_rewrite->add_rewrite_tag('%'.$posttype[0].'%', '([^/]+)', $posttype[0].'=');\r\n\t\t\t/*Remove city base slug */\r\n\t\t\t$wp_rewrite->add_permastruct($posttype[0], '/'.$multi_city.'/%city%/'.$posttype[0].'/%'.$posttype[0].'%', false);\r\n\r\n\t\t\t$category_slug=@$tevolution_taxonomies[$posttype[1]]['rewrite']['slug'];\r\n\t\t\tif($posttype[0]=='post'){\r\n\t\t\t\t$category_slug='category';\r\n\t\t\t}\r\n\t\t\tif($category_slug==\"\"){\r\n\t\t\t\t$taxonomies = get_object_taxonomies( (object) array( 'post_type' => $posttype[0],'public' => true, '_builtin' => true ));\r\n\t\t\t\t$category_slug=$taxonomies[0];\r\n\t\t\t}\r\n\t\t\t/*Remove city base slug */\r\n\t\t\t$wp_rewrite->add_permastruct($posttype[1], '/'.$multi_city.'/%city%/'.$category_slug.'/%'.$posttype[1].'%', false);\r\n\t\t}\r\n\t\t$wp_rewrite->flush_rules();\r\n\t}\r\n}",
"private function isCategoryRewritesEnabled(): bool\n {\n return (bool)$this->config->getValue('catalog/seo/generate_category_product_rewrites');\n }",
"function rewrite() {\n\n\t\t// for each path (course)\n\t\tforeach ( $this->types[ 'paths' ] as $path ) {\n\n\t\t\t// Permalink structure course/%coursename%\n\t\t\t$path_structure = \"{$path}/%{$path}name%\";\n\n\t\t\t// add permalink structure to wp rewrite rules\n\t\t\tadd_permastruct( $path, $path_structure, false );\n\n\t\t\t// add the regex to match %coursename% & placing it in ?coursename=\n\t\t\tadd_rewrite_tag( \"%{$path}name%\", '([^/]+)', \"{$path}name=\" );\n\n\t\t\t// create rewrite rules for modules\n\t\t\t$this->rewrite_modules( $path_structure );\n\n\t\t\t// create rewrite rules for units\n\t\t\t$this->rewrite_units( $path_structure );\n\t\t}\n\t\t\n\t\tadd_rewrite_endpoint( 'learn', EP_PERMALINK | EP_PAGES );\n\t}",
"function bbp_add_rewrite_tags()\n{\n}",
"function cu_rewrite_add_rewrites() {\n\tadd_rewrite_tag( '%cpage%', '[^/]' );\n\tadd_rewrite_rule(\n\t\t'^users/?$',\n\t\t'index.php?cpage=custom_page_url',\n\t\t'top'\n\t);\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Get map info by Id getMapInfoById($id) | public function getMapInfoById($id = false) {
// Database Connection
$db = $GLOBALS['db'];
// Query set up
$return = ($id) ? $db->getRow('tb_areamap', 'id, boo_encounter, id_areatype, vc_name', "id = '{$id}'") : false;
// Return
return $return;
} | [
"protected function getMap($id)\n {\n $resolver = $this->get('molodyko.dashboard.logic.resolver');\n return $resolver->getMap($id);\n }",
"function ip_geoloc_plugin_style_leaflet_map_get_info($map_name = NULL) {\n return leaflet_map_get_info($map_name);\n}",
"public function getMap($mapName);",
"public function getAreaInfoByMapId($id = false) {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db'];\n\t\t\t// Query set up\n\t\t\t$return\t\t\t= ($id) ? $db->getRow('tb_area', '*', 'id_areamap = '.$id) : false;\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}",
"public function getWorldMapById($id = false) {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t\t= $GLOBALS['db'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t\t= false;\n\t\t\t// if email was sent\n\t\t\tif ($id) {\n\t\t\t\t// Query set up\n\t\t\t\t$table\t\t\t= 'tb_world AS w JOIN tb_areamap AS am ON w.id_areamap = am.id';\n\t\t\t\t$select_what\t= 'w.id AS id_world, am.*';\n\t\t\t\t$conditions\t\t= \"w.id = '{$id}'\";\n\t\t\t\t$return\t\t\t= $db->getRow($table, $select_what, $conditions);\n\t\t\t}\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}",
"public static function getMarkersGeoLoc($id)\r\n\t{\r\n\t\tglobal $wpdb;\r\n\t\tif($id == null)\r\n\t\t{\r\n\t\t\t$geoLoc = null;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$workingUnit = $wpdb->get_row( \"SELECT * FROM \" . TABLE_UNITE_TRAVAIL . \" WHERE id =\" . $id);\r\n\t\t\t$address = new EvaAddress($workingUnit->id_adresse);\r\n\t\t\t$address->load();\r\n\t\t\t$geoLoc = $address->getGeoLoc();\r\n\t\t\t$scoreRisque = eva_UniteDeTravail::getScoreRisque($workingUnit->id);\r\n\t\t\t$geoLoc['info'] = '<img class=\"alignleft\" style=\"margin-right:0.5em;\" src=\"' . EVA_WORKING_UNIT_ICON . '\" alt=\"Unité de travail : \"/><strong>' . $workingUnit->nom . '</strong><br /><em>' . __('Risque', 'evarisk') . ' : <span class=\"valeurInfoElement risque' . Risque::getSeuil($scoreRisque) . 'Text\">' . eva_UniteDeTravail::getNiveauRisque($scoreRisque) . '</span></em>';\r\n\t\t\t$geoLoc['type'] = \"unité de travail\";\r\n\t\t\t$geoLoc['adress'] = $workingUnit->id_adresse;\r\n\t\t\t$geoLoc['image'] = GOOGLEMAPS_UNITE;\r\n\t\t}\r\n\t\treturn $geoLoc;\r\n\t}",
"function get_map_zone($id, &$sqlm)\r\n{\r\n\t$map_zone = $sqlm->fetch_assoc($sqlm->query('\r\n\t\tSELECT area_id\r\n\t\tFROM dbc_map\r\n\t\tWHERE id='.$id.' LIMIT 1'));\r\n\treturn get_zone_name($map_zone['area_id'], $sqlm);\r\n}",
"public function get_bird_map($id)\n {\n $query = $this->db->query(\"SELECT birdId , comName , disMapLink FROM bird WHERE birdId = $id\");\n\n return $query->row(0);\n }",
"public function getMapID()\n\t{\n\t\treturn $this->getOption('mapid') ? $this->getOption('mapid') : 'map_canvas';\n\t}",
"public function getMapID()\n {\n return $this->MapID;\n }",
"public function loadMapInfoByFertilityMapId($fertilityMapId)\r\n {\r\n return MapInfo::where('fertility_id', $fertilityMapId)->limit(1);\r\n }",
"public function getMap() {\r\n\t\treturn $this->_mapObj;\r\n\t}",
"public function actionViewMap($id)\n {\n $model = $this->findModel($id);\n\n $gpsdata = array_map(function($data) {\n return [\n 'waypoint' => $data->waypoint,\n 'lat' => $data->lat,\n 'lon' => $data->lon\n ];\n }, $model->gps);\n\n return $this->renderPartial('//maps/maproutes', [\n 'gpsdata' => $gpsdata,\n 'routename' => $model->name_route\n ]);\n }",
"public function getParentMapInfoIdByMapId($id = false) {\n\t\t\t// Database Connection\n\t\t\t$db\t\t= $GLOBALS['db'];\n\t\t\t// Query\n\t\t\t$return\t= ($id) ? $db->getRow('tb_map_link_icon AS mli JOIN tb_areamap AS am ON mli.id_map_orign = am.id', 'am.id, am.boo_encounter', \"id_map_target = {$id}\") : false;\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}",
"function get_map_detail($id_section)\n\t{\n\t\t$this->load->model('map_model');\t\t\n\t\tprint_array($this->map_model->get_map_detail($id_section));\n\t}",
"public function get_bird_map($id) {\n $this->load->model('Model_Bird_Wiki');\n $result['birds'] = $this->Model_Bird_Wiki->get_bird_list();\n $result['maps'] = $this->Model_Bird_Wiki->get_bird_map($id);\n\n $this->load->view('bird_map', $result);\n }",
"abstract protected function getMap($key);",
"function _getMap()\n {\n // map : de_dust2 at: 0 x, 0 y, 0 z\n $map_regex = \"/^map\\s*:\\s*(\\w+)\\s/m\";\n return preg_match($map_regex, $this->status(), $match) ? $match[1] : 'Unknown';\n }",
"public function getFieldIdByMapId($id = false) {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db'];\n\t\t\t// Query set up\n\t\t\t$return\t\t\t= (($id) && ($return = $db->getRow('tb_area', 'id_field', 'id_areamap = '.$id))) ? $return['id_field'] : false;\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the getFilesize method | public function testGetFilesize() : void {
$this->assertNotEquals('', $this->fileService->getFilesize($this->file));
} | [
"public function testGetSize()\n {\n $this->assertEquals(\n 3,\n $this->file->getSize(),\n 'The uncompressed size of the file should be returned.'\n );\n }",
"abstract public function testFilesizeFromVal();",
"public function testSizeOutputsSize()\n {\n $size = file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertTrue($size === (int) File::size(self::$temp.DS.'foo.txt'));\n }",
"public function testFileSize()\n {\n $upload = Larupload::init('uploader')->upload($this->imageJPG);\n\n $this->assertEquals($upload->meta->size, $this->imageDetails['jpg']['size']);\n }",
"public function testEqualsFileSize()\n {\n $this->file->shouldreceive('getInfo')->andReturn(['size' => $this->getFileSize()]);\n $this->assertEquals($this->getFileSize(), $this->file->getSize());\n }",
"public function testSizeOutputsSize()\n {\n $size = file_put_contents(self::$temp . DS . 'foo.txt', 'foo');\n\n $this->assertTrue($size === (int) Storage::size(self::$temp . DS . 'foo.txt'));\n }",
"public function getSize($file);",
"public function testGetSize(): void\n {\n $model = File::load([\n \"size\" => 46290,\n ], $this->container);\n\n $this->assertSame(46290, $model->getSize());\n }",
"function check_file_size($file) {\n if ($file[\"size\"] > 1500000)\n return false;\n return true;\n}",
"public function testFstatReturnsSizeInformation()\n {\n $handle = fopen($this->stream, 'rb+');\n $info = fstat($handle);\n fclose($handle);\n $this->assertInternalType('array', $info);\n $expectedSize = strlen(self::INITIAL_CONTENT);\n $this->assertArrayHasKey(7, $info, 'Missing numerical key.');\n $this->assertArrayHasKey('size', $info, 'Missing associative key.');\n $this->assertEquals($expectedSize, $info[7]);\n $this->assertEquals($expectedSize, $info['size']);\n }",
"public function testGetNameSize()\n {\n $this->assertEquals(\n 2,\n $this->file->getNameSize(),\n 'The size of the file name should be returned.'\n );\n }",
"function getFilesize(){\n\t\t$file = $this->getElement('data');\n\t\treturn (file_exists($file) ? filesize($file) : 0);\n\t}",
"function getFilesize(){\n\t\treturn filesize($this->elements[\"data\"][\"dat\"]);\n\t}",
"public function checksize(){\r\t\t\tif(($this->file_size >= $this->maxsize)){\r\t\t\t\treturn true;\r\t\t\t}\r\t\t}",
"public function testGetSize()\n\t{\n\t\t$size = $this->object->getSize();\n\t\t$this->assertEquals($size, 648818);\n\t}",
"function c_filesize($filename) {\r\n\r\n $serach_name=e_file_exists($filename);\r\n return filesize($serach_name);\r\n}",
"public function getFilesize()\n {\n return $this->filesize;\n }",
"private function setFileSize()\n {\n\n }",
"function checkSize(){\n global $postpath;\n return (filesize($postpath) / 1000000) < 1;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The DeleteRouteTable operation is asynchronous. After you send the request, the system returns a request ID. However, the operation is still being performed in the system background. You can call the [DescribeRouteTableList](~~87602~~) operation to query the status of a custom route table: If the custom route table is in the Deleting state, the custom route table is being deleted. If you cannot query the custom route table, the custom route table is deleted. You cannot repeatedly call the DeleteRouteTable operation to delete a custom route table within the specified period of time. | public function deleteRouteTableWithOptions($request, $runtime)
{
Utils::validateModel($request);
$query = [];
if (!Utils::isUnset($request->ownerAccount)) {
$query['OwnerAccount'] = $request->ownerAccount;
}
if (!Utils::isUnset($request->ownerId)) {
$query['OwnerId'] = $request->ownerId;
}
if (!Utils::isUnset($request->regionId)) {
$query['RegionId'] = $request->regionId;
}
if (!Utils::isUnset($request->regionId)) {
$query['RegionId'] = $request->regionId;
}
if (!Utils::isUnset($request->resourceOwnerAccount)) {
$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;
}
if (!Utils::isUnset($request->resourceOwnerId)) {
$query['ResourceOwnerId'] = $request->resourceOwnerId;
}
if (!Utils::isUnset($request->routeTableId)) {
$query['RouteTableId'] = $request->routeTableId;
}
$req = new OpenApiRequest([
'query' => OpenApiUtilClient::query($query),
]);
$params = new Params([
'action' => 'DeleteRouteTable',
'version' => '2016-04-28',
'protocol' => 'HTTPS',
'pathname' => '/',
'method' => 'POST',
'authType' => 'AK',
'style' => 'RPC',
'reqBodyType' => 'formData',
'bodyType' => 'json',
]);
return DeleteRouteTableResponse::fromMap($this->callApi($params, $req, $runtime));
} | [
"public function deleteRouteTable($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->deleteRouteTableWithOptions($request, $runtime);\n }",
"public function deleteTransitRouterRouteTable($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->deleteTransitRouterRouteTableWithOptions($request, $runtime);\n }",
"public function deleteRoute($object) {\n\t\t// Delete the static route.\n\t\t$cmdArgs = [];\n\t\t$cmdArgs[] = \"route\";\n\t\t$cmdArgs[] = sprintf(\"delete %s\", escapeshellarg($objectv['network']));\n\t\t$cmdArgs[] = sprintf(\"via %s\", escapeshellarg($objectv['gateway']));\n\t\t$cmd = new \\OMV\\System\\Process(\"ip\", $cmdArgs);\n\t\t$cmd->setRedirect2to1();\n\t\t$cmd->setQuiet(TRUE);\n\t\t$cmd->execute();\n\t}",
"public function unassociateRouteTableWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->routeTableId)) {\n $query['RouteTableId'] = $request->routeTableId;\n }\n if (!Utils::isUnset($request->vSwitchId)) {\n $query['VSwitchId'] = $request->vSwitchId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'UnassociateRouteTable',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return UnassociateRouteTableResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"public function delete(string $uri, $callable, ?string $name = null): Route;",
"public function deleteRouteEntry($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->deleteRouteEntryWithOptions($request, $runtime);\n }",
"public function testDeleteRequestForUnExistingDynamicRoute(): void\n {\n // setup\n $_SERVER['REQUEST_METHOD'] = 'DELETE';\n\n $exception = '';\n $router = $this->getRouter();\n $router->addRoute('/catalog/[i:cat_id]', function () {\n return 1;\n });\n\n // test body\n try {\n $router->callRoute('/catalog/1025/');\n } catch (\\Exception $e) {\n $exception = $e->getMessage();\n }\n\n // assertions\n $msg = \"The processor was not found for the route catalog/1025\";\n\n $this->assertNotFalse(strpos($exception, $msg));\n }",
"public function deleteVpnRouteEntryWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->nextHop)) {\n $query['NextHop'] = $request->nextHop;\n }\n if (!Utils::isUnset($request->overlayMode)) {\n $query['OverlayMode'] = $request->overlayMode;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->routeDest)) {\n $query['RouteDest'] = $request->routeDest;\n }\n if (!Utils::isUnset($request->vpnGatewayId)) {\n $query['VpnGatewayId'] = $request->vpnGatewayId;\n }\n if (!Utils::isUnset($request->weight)) {\n $query['Weight'] = $request->weight;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteVpnRouteEntry',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteVpnRouteEntryResponse::fromMap($this->callApi($params, $req, $runtime));\n }",
"public function initDeleteRouteName();",
"public function delete($routePattern, $handler){ }",
"protected function get_route_delete_response( \\WP_REST_Request $request ) {\n\t\tthrow new RouteException( 'woocommerce_rest_invalid_endpoint', __( 'Method not implemented', 'woocommerce' ), 404 );\n\t}",
"public function delete_directions($id);",
"public function deleteSchedule()\r\n {\r\n $this->throttle();\r\n $response = $this->rest->delete(\"schedules/{$schedule_id}\");\r\n return $response;\r\n }",
"public function deleteRoute(RestServiceEntity $entity)\n {\n $serviceName = $entity->controllerServiceName;\n if (false === strstr($serviceName, '\\\\V1\\\\')) {\n // service > v1; do not delete route\n return;\n }\n\n $route = $entity->routeName;\n $key = ['router', 'routes', $route];\n $this->configResource->deleteKey($key);\n }",
"public function deleteRouteAction()\n {\n $filename = sprintf(\n '%s/%s/config/%s', \n Pi::path('var'),\n $this->getModule(), \n Route::RESOURCE_CONFIG_NAME\n );\n \n if (file_exists($filename)) {\n @unlink($filename);\n }\n \n // Clear cache\n Pi::service('registry')->handler('route', $module)->clear($module);\n \n return $this->redirect()->toRoute('', array('action' => 'route'));\n }",
"public function delete(string $path, Closure|string $handler, string $name = null, bool $setDependencies = false): Route;",
"public function delete(string $path, $handler): Route;",
"public function deleteRoutes(Request $request)\n {\n Route::where('report_date', $request[0]['report_date'])\n ->where('car_id', $request[0]['car_id'])\n ->delete();\n }",
"public function deleteVpnRouteEntry($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->deleteVpnRouteEntryWithOptions($request, $runtime);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ New lookup Form | public function newLookupForm()
{
return view::make($this->viewPath . 'new');
} | [
"public function getLookupField() {}",
"public function postNewLookup()\n {\n // Set the user to 0 if not logged in (for api)\n (Auth::user())? $userId = Auth::user()->id : $userId = 0;\n\n $reg = str_replace(' ', '', Input::get('reg'));\n\n // Lookup details\n $lookup = $this->repository->newLookup($userId, $reg, Input::get('make'));\n\n if ($lookup) {\n return view::make($this->viewPath . 'partials.newLookup')->with('lookup', $lookup);\n } else {\n return view::make($this->viewPath . 'partials.newLookup');\n }\n }",
"public static function searchForm() {}",
"function get_new_record_form () {\n\n}",
"function tpps_details_search(array $form, array $form_state) {\n $params = drupal_get_query_parameters();\n $form['details_type'] = array(\n '#type' => 'select',\n '#options' => array(\n 'title' => t('Title'),\n 'species' => t('Species'),\n 'accession' => t('Accession'),\n 'author' => t('Primary Author'),\n 'year' => t('Publication Year'),\n 'phenotype_name' => t('Phenotype Name'),\n 'phenotype_ontology' => t('Phenotype Ontology Name'),\n 'genotype_name' => t('Genotype Name'),\n 'genotype_marker' => t('Genotype Marker Type'),\n 'tags' => t('Tags'),\n ),\n '#ajax' => array(\n 'wrapper' => 'tpps-details-form',\n 'callback' => 'tpps_details_form_callback',\n ),\n '#prefix' => '<div id=\"tpps-details-form\">',\n '#default_value' => $params['type'] ?? NULL,\n );\n\n $ops = array(\n '~*' => '~*',\n 'LIKE' => 'LIKE',\n '=' => '=',\n );\n\n $form['details_op'] = array(\n '#type' => 'select',\n '#options' => $ops,\n '#default_value' => $params['op'] ?? NULL,\n );\n\n $form['details_value'] = array(\n '#type' => 'textfield',\n '#suffix' => '</div>',\n '#autocomplete_path' => 'tpps/autocomplete/project_title',\n '#default_value' => $params['value'] ?? NULL,\n );\n\n if (empty($form_state['values']['details_type'])) {\n $form_state['values']['details_type'] = $params['type'] ?? NULL;\n }\n\n if (!empty($form_state['values']['details_type'])) {\n switch ($form_state['values']['details_type']) {\n case 'title':\n $form['details_value']['#autocomplete_path'] = 'tpps/autocomplete/project_title';\n break;\n\n case 'species':\n $form['details_value']['#autocomplete_path'] = 'tpps/autocomplete/species';\n break;\n\n case 'accession':\n $form['details_value']['#autocomplete_path'] = 'tpps/autocomplete/project_accession';\n break;\n\n case 'author':\n $form['details_value']['#autocomplete_path'] = 'tpps/autocomplete/author';\n break;\n\n case 'phenotype_name':\n $form['details_value']['#autocomplete_path'] = 'tpps/autocomplete/phenotype';\n break;\n\n case 'phenotype_ontology':\n $form['details_value']['#autocomplete_path'] = 'tpps/autocomplete/phenotype_ontology';\n break;\n\n case 'genotype_name':\n $form['details_value']['#autocomplete_path'] = 'tpps/autocomplete/genotype';\n break;\n\n case 'genotype_marker':\n $form['details_value']['#autocomplete_path'] = 'tpps/autocomplete/genotype_marker';\n break;\n\n default:\n $form['details_value']['#autocomplete_path'] = NULL;\n break;\n }\n }\n\n $form['details_search'] = array(\n '#type' => 'button',\n '#button_type' => 'button',\n '#value' => t('Search'),\n );\n\n $form['reset_button'] = array(\n '#markup' => '<button class=\"btn btn-primary form-button\" type=\"reset\"/>Reset</button>',\n ); \n\n $form['#attributes'] = array(\n 'style' => 'text-align:center',\n );\n\n return $form;\n}",
"public function replaceLookupViewDynamic($table, $lookup)\n {\n\n $selects = array();\n\n // foreach field\n foreach ($table->getAllFields() as $field) {\n // If the field does not use lookup table\n if (false === $field->usesLookup) {\n array_push($selects, 't.'.$field->dbName);\n } else {\n // $field->usesLookup holds name of lookup field, if not false\n $fname = $field->usesLookup;\n\n // If the field uses the lookup table and is a checkbox field\n if (preg_match('/'.RedCapEtl::CHECKBOX_SEPARATOR.'/', $field->dbName)) {\n // For checkbox fields, the join needs to be done based on\n // the category embedded in the name of the checkbox field\n\n // Separate root from category\n list($rootName, $cat) = explode(RedCapEtl::CHECKBOX_SEPARATOR, $field->dbName);\n\n $agg = \"GROUP_CONCAT(if(l.field_name='\".$fname.\"' \".\n \"and l.category=\".$cat.\", label, NULL)) \";\n\n $select = 'CASE WHEN t.'.$field->dbName.' = 1 THEN '.$agg.\n ' ELSE 0'.\n ' END as '.$field->dbName;\n } // The field uses the lookup table and is not a checkbox field\n else {\n $select = \"GROUP_CONCAT(if(l.field_name='\".$fname.\"' \".\n \"and l.category=t.\".$field->dbName.\", label, NULL)) \".\n \"as \".$field->dbName;\n }\n\n array_push($selects, $select);\n }\n }\n\n $query = 'CREATE OR REPLACE VIEW '.$table->name.$this->labelViewSuffix.' AS ';\n\n $select = 'SELECT '. implode(', ', $selects);\n $from = 'FROM '.$this->tablePrefix.LookupTable::NAME.' l, '.$table->name.' t';\n $where = \"WHERE l.table_name like '\".$table->name.\"'\";\n $groupBy = 'GROUP BY t.'.$table->primary->name;\n\n $query .= $select.' '.$from.' '.$where.' '.$groupBy;\n\n // Execute query\n $result = $this->mysqli->query($query);\n if ($result === false) {\n $message = 'MySQL error in query \"'.$query.'\"'\n .' ['.$this->mysqli->errno.']: '.$this->mysqli->error;\n $code = EtlException::DATABASE_ERROR;\n throw new EtlException($message, $code);\n }\n\n\n return(1);\n }",
"public function replaceLookupViewStatic($table, $lookup)\n {\n $selects = array();\n\n // foreach field\n foreach ($table->getAllFields() as $field) {\n // If the field does not use lookup table\n if ($field->usesLookup === false) {\n array_push($selects, $field->dbName);\n } else {\n // $field->usesLookup holds name of lookup field, if not false\n // name of lookup field is root of field name for checkbox\n $fname = $field->usesLookup;\n\n // If the field uses the lookup table and is a checkbox field\n if (preg_match('/'.RedCapEtl::CHECKBOX_SEPARATOR.'/', $field->dbName)) {\n // For checkbox fields, the join needs to be done based on\n // the category embedded in the name of the checkbox field\n\n // Separate root from category\n list($rootName, $cat) = explode(RedCapEtl::CHECKBOX_SEPARATOR, $field->dbName);\n\n $label = $this->mysqli->real_escape_string(\n $lookup->getLabel($table->name, $fname, $cat)\n );\n $select = 'CASE '.$field->dbName.' WHEN 1 THEN '\n . \"'\".$label.\"'\"\n . ' ELSE 0'\n . ' END as '.$field->dbName;\n } // The field uses the lookup table and is not a checkbox field\n else {\n $select = 'CASE '.$field->dbName;\n $map = $lookup->getValueLabelMap($table->name, $fname);\n foreach ($map as $value => $label) {\n $select .= ' WHEN '.\"'\".($this->mysqli->real_escape_string($value)).\"'\"\n .' THEN '.\"'\".($this->mysqli->real_escape_string($label)).\"'\";\n }\n $select .= ' END as '.$field->dbName;\n }\n array_push($selects, $select);\n }\n }\n\n $query = 'CREATE OR REPLACE VIEW '.$table->name.$this->labelViewSuffix.' AS ';\n\n $select = 'SELECT '. implode(', ', $selects);\n $from = 'FROM '.$table->name;\n\n $query .= $select.' '.$from;\n\n ###print(\"QUERY: $query\\n\");\n\n // Execute query\n $result = $this->mysqli->query($query);\n if ($result === false) {\n $message = 'MySQL error in query \"'.$query.'\"'\n .' ['.$this->mysqli->errno.']: '.$this->mysqli->error;\n $code = EtlException::DATABASE_ERROR;\n throw new EtlException($message, $code);\n }\n\n\n return(1);\n }",
"abstract protected function getCrudForm();",
"public function actionCreate()\n {\n $model = new Lookup([\n 'type' => $this->id,\n 'code' => Lookup::nextCode($this->id),\n 'position' => Lookup::nextCode($this->id),\n ]);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', '新记录已创建');\n return $this->redirect('index');\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'label' => $this->name,\n ]);\n }",
"public function searchForm($resource=null);",
"function LoadBasicSearchValues() {\n\t\tglobal $view_reps_2_2_forma_1;\n\t\t$view_reps_2_2_forma_1->BasicSearchKeyword = @$_GET[UP_TABLE_BASIC_SEARCH];\n\t\t$view_reps_2_2_forma_1->BasicSearchType = @$_GET[UP_TABLE_BASIC_SEARCH_TYPE];\n\t}",
"public function searchAction() {\n\t\t$this->_helper->layout()->disableLayout();\n\n\t\t$labelRepo = $this->_entityManager->getRepository('Model\\Label');\n\n\t\t$form = new Dis_Form_SearchPassenger();\n\t\t$form->getElement('label')->setMultiOptions($labelRepo->findAllArray());\n\n\t\t$this->view->form = $form;\n\t}",
"function addLookupSettings()\n\t{\n\t\t$this->settingsMap[\"fieldSettings\"][\"CategoryControl\"] = array(\"default\" => \"\", \"jsName\" => \"categoryField\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"DependentLookups\"] = array(\"default\" => array(), \"jsName\" => \"depLookups\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"LCType\"] = array(\"default\" => LCT_DROPDOWN, \"jsName\" => \"lcType\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"LookupTable\"] = array(\"default\" => \"\", \"jsName\" => \"lookupTable\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"SelectSize\"] = array(\"default\" => 1, \"jsName\" => \"selectSize\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"Multiselect\"] = array(\"default\" => false, \"jsName\" => \"Multiselect\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"LinkField\"] = array(\"default\" => \"\", \"jsName\" => \"linkField\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"DisplayField\"] = array(\"default\" => \"\", \"jsName\" => \"dispField\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"freeInput\"] = array(\"default\" => false, \"jsName\" => \"freeInput\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"HorizontalLookup\"] = array(\"default\" => false, \"jsName\" => \"HorizontalLookup\");\n\t\t$this->settingsMap[\"fieldSettings\"][\"autoCompleteFields\"] = array(\"default\" => array(), \"jsName\" => \"autoCompleteFields\");\n\t}",
"function bbp_admin_repair_list_search_form()\n{\n}",
"function get_lookup_value($lookuptblid, $lookupid, $lang)\n{\n $row = NpfLookups::findFirst(\n array(\n 'conditions' => 'lookuptype_id =?1 and id=?2',\n 'bind' => array(1 => $lookuptblid, 2 => $lookupid),\n 'columns' => \"name_$lang name\"\n )\n );\n if ($row) {\n return $row->name;\n } else {\n return \"\";\n }\n}",
"function search_form() {\n global $CFG;\n return new search_form(\"$CFG->wwwroot/blocks/helpdesk/search.php\", null, 'post');\n }",
"function MetadataEntryForm() {\n\t\t// create a registerForm (uses the static searchForm value)\n\t\t$registerForm = self::get_registration_form_name();\n\t\t\n\t\t$form = new $registerForm($this,'MetadataEntryForm');\t\t\n\t\t\n\t\t// \n\t\t\n\t\t//SpamProtectorManager::update_form($form, null, array('Title', 'Content', 'Name', 'Website', 'Email'));\n\t\t///SpamProtectorManager::update_form($form);\n\t\t\n\t\treturn $form;\n\t}",
"function db_lookup($_name, $_table, $_type = \"select\", $_pick = null, $_order = null, $_isnull = null, $_where = null)\n{\n\t$_render = \"\";\n\t$_query = \"SELECT * FROM $_table\";\n\tif (is_array($_where)) {\n\t\tforeach ($_where AS $key => $val) {\n\t\t\t$_wheresql .= $key . \" = '\" . $val . \"' AND \";\n\t\t}\n\t\t$_query .= \" WHERE \" . remove_lastchar(trim($_wheresql), 'AND');\n\t}\n\tif ($_order) {\n\t\t$_query .= \" ORDER BY $_order\";\n\t}\n\t$_result = mysql_query($_query);\n\n\tif (!$_result) {\n\t\tdie(\"MySQL Error: \" . mysql_error());\n\t}\n\n\tif ($_type == \"array\") {\n\t\twhile ($_v = mysql_fetch_array($_result)) {\n\t\t\t$_render[$_v[0]] = $_v[1];\n\t\t}\n\t} elseif ($_type == \"checkbox\") {\n\t\twhile ($_v = mysql_fetch_array($_result)) {\n\t\t\t$_render .= '<input type=\"checkbox\" name=\"' . $_table . '\" value=\"' . $_v[0] . '\"';\n\t\t\tif ($_v[0] == $_pick) {\n\t\t\t\t$_render .= ' checked';\n\t\t\t}\n\t\t\t$_render .= ' />' . $_v[1] . '\n\t\t\t';\n\t\t}\n\t} elseif ($_type == \"radio\") {\n\t\twhile ($_v = mysql_fetch_array($_result)) {\n\t\t\t$_render .= '<input type=\"radio\" name=\"' . $_table . '\" value=\"' . $_v[0] . '\"';\n\t\t\tif ($_v[0] == $_pick) {\n\t\t\t\t$_render .= ' checked';\n\t\t\t}\n\t\t\t$_render .= ' />' . $_v[1] . '\n\t\t\t';\n\t\t}\n\t} elseif ($_type == \"select\") {\n\t\t// insert a blank option\n\t\tif ($_isnull && !isset($_pick)) {\n\t\t\t$_render .= '<option value=\"\"></option>\n\t\t\t';\n\t\t}\n\t\twhile ($_v = mysql_fetch_array($_result)) {\n\t\t\t$_render .= '<option value=\"' . $_v[0] . '\"';\n\t\t\tif ($_v[0] == $_pick) {\n\t\t\t\t$_render .= ' selected';\n\t\t\t}\n\t\t\t$_render .= '>' . $_v[1] . '</option>\n\t\t\t';\n\t\t}\n\t\t$_render = '<select name=\"' . $_name . '\">' . $_render . '</select>\n\t\t';\n\t}\n\n\tmysql_free_result($_result);\n\treturn $_render;\n\tunset($_table, $_where, $_query, $_sqlresult, $_sqlrow, $_v, $_value, $_matches, $_render, $_count, $_isnull);\n}",
"function\n\tdisplay()\n\t{\n\t\tprint \"<script langauge=\\\"JavaScript\\\">\\n\";\n\t\tprint \"<!--\\n\";\n\t\tprint \"function openLookupList(formID, fieldID, LutName, term)\\n\";\n\t\tprint \"{\\n\";\n\t\tprint \"\turl = '\" . $GLOBALS['LOOKUPLIST_URL'] . \"';\";\n\t\tprint \"\turl = url + '?formid=' + formID + '&fieldid=' + fieldID + '&lname=' + LutName + '&ll=' + term;\";\n\t\tprint '\tpopupWindow = window.open(url, \"popupWindow\", \"height=350,width=250,location=no,status=no,toolbar=no,scrollbars=yes\"); ';\n\t\tprint \"\tpopupWindow.focus();\\n\";\n\t\tprint \"}\\n\";\n\t\tprint \"//-->\\n\";\n\t\tprint \"</script>\\n\";\n\n\t\t$decorator = new HtmlBoxAndTitle;\n\t\t$decorator->BorderColor = $this->BorderColor;\n\t\t$decorator->BodyColor = $this->BodyColor;\n\t\t$decorator->TitleTextColor = $this->TitleTextColor;\n\t\t$decorator->FontFace = $this->FontFace;\n\t\t$decorator->Width = $this->Width;\n\t\t$decorator->Title = $this->Title;\n\t\t// Dump the HTML\n\t\t$decorator->Open();\n?>\n\n<form method=post name='dtlquery' action=\"<?php print $this->ResultsListPage?>\">\n\t<input type=hidden name=QueryName value=DetailedQuery>\n\t<input type=hidden name=StartAt value=1>\n\t<input type=hidden name=QueryPage value=\"<?php print $GLOBALS['PHP_SELF']?>\">\n\t<input type=hidden name=Restriction value=\"<?php print $this->Restriction?>\">\n\t<table width=100% border=0 cellspacing=0 cellpadding=2>\n<?php\n\t\tforeach ($this->Fields as $fld)\n\t\t{\n\t\t\t// Convert string fields to QueryField objects\n\t\t\tif (is_string($fld))\n\t\t\t{\n\t\t\t\t$fieldObject = new QueryField;\n\t\t\t\t$fieldObject->ColName = $fld;\n\t\t\t\t$fld = $fieldObject;\n\t\t\t}\n\n\t\t\t// Security\n\t\t\tif (strtolower($fld->ValidUsers) != 'all')\n\t\t\t{\n\t\t\t\tif (! $this->SecurityTester->UserIsValid($fld->ValidUsers))\n\t\t\t\t\tcontinue;\n\t\t\t}\n\n\n\t\t\tif (strtolower(get_class($fld)) == 'queryfield')\n\t\t\t{\n\t\t\t\tswitch (strtolower($fld->ColType))\n\t\t\t\t{\n\t\t\t\t case 'date':\n\t\t\t\t\t$htmlFieldName = 'col_date_' . $fld->ColName;\n\t\t\t\t\tbreak;\n\t\t\t\t case 'integer':\n\t\t\t\t\t$htmlFieldName = 'col_int_' . $fld->ColName;\n\t\t\t\t\tbreak;\n\t\t\t\t case 'string':\n\t\t\t\t\t$htmlFieldName = 'col_str_' . $fld->ColName;\n\t\t\t\t\tbreak;\n\t\t\t\t case 'text':\n\t\t\t\t\t$htmlFieldName = 'col_' . $fld->ColName;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tWebDie('Invalid Field Type - Expected QueryField');\n\n\t \t\tprint \"<tr>\\n\";\n\t \t\tprint \"<td nowrap width=25%>\\n\";\n\t\t\tprint \"<font color=\" . $this->BodyTextColor;\n\t\t\tprint \" size=\" . $this->FontSize . ' face=\"' . $this->FontFace . \"\\\">\\n\";\n\t\t\tif (isset($this->_STRINGS[$fld->ColName]))\n\t\t\t\t$label = $this->_STRINGS[$fld->ColName];\n\t\t\telse\n\t\t\t\t$label = $fld->ColName;\n\t\t\tprint \"<b> \" . $label . \"</b></font>\\n\";\n\t \t\tprint \"</td>\\n\";\n\t \t\tprint \"<td nowrap width=20%>\\n\";\n\t\t\tif (isset($this->DropDownLists[$fld->ColName]))\n\t\t\t{\n\t\t\t\tprint \" <select name=\\\"$htmlFieldName\\\">\\n\";\n\t\t\t\t$this->generateDropDown($fld->ColName);\n\t\t\t\tprint \"</select>\\n\";\n\t\t\t}\n\t\t\telseif (isset($this->LookupLists[$fld->ColName]))\n\t\t\t{\n\t\t\t\tprint ' <input class=WebInput type=text value=\"\" name=\"';\n\t\t\t\tprint $htmlFieldName . \"\\\" size=20>\";\n\t\t\t\t// print picklist/lookuplist image and link\n\t\t\t\t$lookupName = urlencode($this->LookupLists[$fld->ColName]);\n\t\t\t\tprint ' ';\n\t\t\t\tprint '<a href=\"javascript:void(0)\" onClick=\"openLookupList(\\'dtlquery\\', ';\n\t\t\t\tprint \"'$htmlFieldName', '$lookupName', dtlquery['$htmlFieldName'].value)\\\">\";\n\t\t\t\t$imgPath = $GLOBALS['WEB_PICKLIST_GRAPHIC'];\n\t\t\t\tprint \"<img src=\\\"$imgPath\\\" border=0 align=top>\";\n\t\t\t\tprint '</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprint ' <input class=WebInput type=text value=\"\" name=\"';\n\t\t\t\tprint $htmlFieldName . \"\\\" size=20>\\n\";\n\t\t\t}\n\t \t\tprint \"</td>\\n\";\n\t \t\tprint \"<td width=55%>\\n\";\n\t\t\tprint \"<font color=\" . $this->BodyTextColor . \" size=\" . $this->FontSize . ' face=\"' . $this->FontFace . \"\\\">\\n\";\n\t\t\tprint \" \" . $this->Hints[$fld->ColName] . \"</font>\\n\";\n\t \t\tprint \"</td>\\n\";\n\t \t\tprint \"</tr>\\n\";\n\t\t}\n?>\n\t\t<tr>\n\t\t<td nowrap>\n\t\t\t<font color=<?php print $this->BodyTextColor?> size=<?php print $this->FontSize?> face=\"<?php print $this->FontFace?>\">\n\t\t\t<b> <?php print $this->_STRINGS['NUMBER_OF_RECORDS']?></b></font>\n\t\t</td>\n\t\t<td nowrap>\n\t\t\t <select name=LimitPerPage>\n\t\t\t <option value=10 >10 results</option>\n\t\t\t <option value=20 selected>20 results</option>\n\t\t\t <option value=30 >30 results</option>\n\t\t\t <option value=50 >50 results</option>\n\t\t\t <option value=100 >100 results</option>\n\t\t\t</select>\n\t\t</td>\n\t\t<td>\n\t\t</td>\n\t</table>\n\t<p>\n\t <input class=WebInput type=submit name=Search value=\"Search\">\n\t<input type=reset name=Rearch value=\"Clear\">\n\t<font color=<?php print $this->BodyTextColor?> size=<?php print $this->FontSize?> face=<?php print $this->FontFace?>>\n\t <input class=WebInput type=checkbox name=ImagesOnly value=true>\n\t<?php print $this->_STRINGS['ONLY_WITH_IMAGES']?>\n\t</font>\n\t</p>\n</form>\n\n<?php\n\t\t$decorator->Close();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Purpose gets thumbnail file name Inputs $productID product ID Remarks Returns file name, it is not full path | function GetThumbnail($productID)
{
$q = db_query("select default_picture from ".PRODUCTS_TABLE." where productID=".(int)$productID);
if ($product = db_fetch_row($q))
{
$q2 = db_query("select filename from ".PRODUCT_PICTURES." where photoID=".(int)$product["default_picture"]." and productID=".(int)$productID);
if ($picture = db_fetch_row($q2))
{
if (file_exists("data/small/".$picture["filename"]) && strlen($picture["filename"]) > 0)
return $picture["filename"];
}
}
return "";
} | [
"public function getThumbnailFileName()\n {\n return $this->thumbnail_file_name;\n }",
"private function ProductFilesFileName() {\n\t\t/* Load some settings */\n\t\t$csvilog = JRequest::getVar('csvilog');\n\t\t$template = JRequest::getVar('template');\n\t\t\n\t\t/* Validate the input */\n\t\t$this->file_name = $this->_importmodel->ValidateCSVInput(\"product_files_file_name\");\n\t\t\n\t\t/* Process the image file */\n\t\tif ($template->thumb_create) {\n\t\t\t$file_details = $this->_importmodel->ProcessImage($this->file_name, $this->file_name, $template->file_location_product_images);\n\t\t}\n\t\telse {\n\t\t\t$file_details = $this->_importmodel->FileDetails($this->file_name, $this->file_name, $template->file_location_product_images);\n\t\t}\n\t\t\n\t\tif ($file_details) {\n\t\t\t$find = array(JPATH_SITE, '\\\\');\n\t\t\t$replace = array('', '/');\n\t\t\t$this->file_exists = true;\n\t\t\t$this->file_name = str_replace($find, $replace, $template->file_location_product_images.'/'.$file_details['clean_file_name_original']);\n\t\t\t$this->file_extension = $file_details['file_extension'];\n\t\t\t$this->file_mimetype = $file_details['file_mimetype'];\n\t\t\t$this->file_is_image = $file_details['file_is_image'];\n\t\t\tif (array_key_exists('file_thumb_name', $file_details)) {\n\t\t\t\t$this->file_image_thumb_width = $file_details['file_thumb_width'];\n\t\t\t\t$this->file_image_thumb_height = $file_details['file_thumb_height'];\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->file_exists = false;\n\t\t}\n\t}",
"private function getGeneralPhotoProduct($id_product) {\n $sql_query = \"SELECT name FROM photo WHERE id_product = \" . $id_product;\n $PhotoName = $this->connection->query($sql_query)->fetch_assoc()[\"name\"];\n return $PhotoName;\n }",
"function getProductPicture($product)\n{\n $imagepath = IMAGEPATH.\"product_pictures/$product.jpg\";\n return $imagepath;\n}",
"public function getThumbnailName()\n {\n $thn = $this->filename;\n $pos = strrpos($thn, '.');\n return ($pos !== false) ? substr_replace($thn, '_t', $pos, strlen($thn)) . substr($thn, $pos) : $thn;\n }",
"protected function thumbnailPath()\n {\n \treturn $this->basePath() . '/' . $this->thumbnail;\n }",
"public function getThumbnail() {\n\n if (file_exists($this->getUploadDir() . '/min_' . $this->path)){\n return $this->getUploadDir() . '/min_' . $this->path;\n }else{\n return $this->getWebPath();\n }\n }",
"public function getThumbnailName()\n {\n return 'image' . '_' . $this->randomName . '_thumbnail' . '.' . 'jpg';\n }",
"public function getThumbnail(): string\n\t{\n\t\t$path = config('Medias')->getPath() . 'thumbnails' . DIRECTORY_SEPARATOR . ($this->attributes['thumbnail'] ?? '');\n\t\t\t\n\t\tif (!is_file($path)) {\n $setThumbnail = self::locateDefaultThumbnail();\n }else{\n\t\t\t$setThumbnail = site_url(config('Medias')->segementUrl . DIRECTORY_SEPARATOR . 'thumbnails' . DIRECTORY_SEPARATOR . $this->attributes['filename']);\n\t\t}\n\n\t\treturn $setThumbnail;\n\t}",
"public function getThumbFilePath()\n {\n \t$filename=$this->const.\"_\".$this->max.\"_\".$this->qhash;\n \t$this->thumbPath= dirname(dirname(__FILE__)).\"/\".$this->relPath.$filename;\n \t$this->thumbHTMLPath= \"content/\".$this->relPath.$filename;\n \tswitch ($this->mimetype)\n\t\t{\n\t\t\tcase 'image/jpeg':\n\t\t\tcase 'image/pjpeg':\n\t\t\tcase 'image/x‑xbitmap':\n\t\t\tcase 'image/x‑xbm':\n\t\t\tcase 'image/x‑xpixmap':\n\t\t\tcase 'image/vnd.wap.wbmp':\n\t\t\t\t$this->thumbPath .= \".jpg\";\n\t\t\t\t$this->thumbHTMLPath .= \".jpg\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'image/webp':\n\t\t\tcase 'image/png':\n\t\t\tcase 'image/gif':\n\t\t\t\t$this->thumbPath .= \".png\";\n\t\t\t\t$this->thumbHTMLPath .= \".png\";\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t\n }",
"private function getProductImage()\n {\n $images = $this->product->getImages();\n\n if (!is_array($images) || count($images) == 0)\n {\n return;\n }\n\n return $this->config->image_product_live_path . '/' . $images[0]->image_full;\n }",
"public function getThumbnail() {\n if (file_exists($this->getUploadDir() . '/min_' . $this->path)){\n return $this->getUploadDir() . '/min_' . $this->path;\n }else{\n return $this->getWebPath();\n }\n }",
"function getThumbnailName($file){\n $parts = explode('.',$file);\n $ext = array_pop($parts);\n //return implode('.',$parts).'_thumb.'.$ext;\n return 'thumb_'.$file;\n }",
"function get_thumbnail($image_name)\n{\n if ($image_name) {\n $pieces = explode('.', $image_name);\n\n return $pieces[0] . '_thumb.' . $pieces[1];\n }\n\n}",
"public function getThumbnailFile()\n {\n return $this->thumbnailFile;\n }",
"public function getProductImageFullpath($filename){\n if($this ->print){\n $path = APPLICATION_ROOT . '/files/images/product_tiff/' . substr($filename, 0, strripos($filename, \".\")).'.tif';\n } else {\n $path = APPLICATION_ROOT . '/files/images/product/' . $filename;\n }\n return $path;\n }",
"function getThumbPath()\n\t{\n\t\tif(xoops_trim($this->getVar('product_thumb_url')) != '') {\n\t\t\treturn MYSHOP_PICTURES_PATH.DIRECTORY_SEPARATOR.$this->getVar('product_thumb_url');\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}",
"function get_thumbnail($image_name)\n{\n $pieces = explode('.', $image_name);\n\n return $pieces[0] . '_thumb.' . $pieces[1];\n}",
"function get_thumbnail($image_name)\n{\n $pieces=explode('.',$image_name);\n\n return $pieces[0].'_thumb.'.$pieces[1];\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
It returns the first message of error (if any), if not, it returns the first message of warning (if any) | public function firstErrorOrWarning() {
if ($this->errorcount) return $this->firstError;
return ($this->warningcount==0)?"":$this->firstWarning;
} | [
"public function getFirstWarning() {}",
"public function getFirstWarning() : Warning {}",
"public function getFirstErrorMessage()\n {\n return $this->data['errors'][0]['message'];\n }",
"public function firstErrorText() {\n return ($this->errorcount==0)?\"\":$this->firstError;\n }",
"public function firstError()\n {\n $errors = $this->allErrors();\n return current($errors);\n }",
"public function first($defaultMsg='') {\n $r=$this->firstError();\n if ($r!==null) return $r;\n $r=$this->firstWarning();\n if ($r!==null) return $r;\n $r=$this->firstInfo();\n if ($r!==null) return $r;\n $r=$this->firstSuccess();\n if ($r!==null) return $r;\n return $defaultMsg;\n }",
"public function error_message()\n\t{\n\t\t$code = $this->error_code();\n\t\tif (isset($this->_messages[$code]))\n\t\t\treturn $this->_messages[$code];\n\t\t\n\t\treturn 'Unknown error';\n\t}",
"public function getFirstError ()\n {\n if ( count($this->errors) == 0 )\n return NULL;\n\n return reset( $this->errors );\n }",
"public function errorMsg() {\n return $this->command_output[0];\n }",
"public function firstWarningText(string $default = ''): string\n {\n $r = $this->allWarningArray('first');\n return $r[0] ?? $default;\n }",
"public function firstError()\n {\n return $this->errors[0] ?? null;\n }",
"public function firstError($default=null) {\n if (isset($this->errorMsg[0])) {\n return $this->errorMsg[0];\n }\n return $default;\n }",
"public function last_error_message();",
"public function firstWarningText($default = '')\n {\n return ($this->warningCount === 0) ? $default : $this->firstWarning;\n }",
"public function getErrorMessage(){\n $categoryArray=array('Bugs','Code','Management','User');\n \n if ($this->category != self::USER_EXCEPTION)\n return $this->time.\"\\t\".$categoryArray[$this->category].\"\\t\\t\".$this->senderClass.\":\\n\".$this->message.\"\\n\";\n else\n return $this->message;\n }",
"public function getFirstError(\\Symfony\\Component\\Validator\\ConstraintViolationList $errors)\n {\n $message = '';\n\n foreach ($errors as $error) {\n $message = $error->getMessage();\n }\n\n return $message;\n }",
"private function getFirstExceptionMessage($fopOutput)\n {\n foreach ($fopOutput as $line) {\n if (preg_match('/Exception: (.*)/', $line, $matches)) {\n return $matches[1];\n }\n }\n return 'Unknown cause';\n }",
"function mcwpl_error_message() {\n\treturn 'Well, that was not it!';\n}",
"public function getFirstError()\n {\n if ($this->isValid()) {\n return null;\n }\n\n return $this->errors[0];\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the full width layout | function set_full_width_layout() {
// c is the string that tells beans to force a full width layout.
// https://www.getbeans.io/code-snippets/force-a-layout
return 'c';
} | [
"function mg_all_layout_default_full_width() {\n\tadd_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\n\n\tremove_action( 'genesis_sidebar', 'genesis_do_sidebar' );\n\n}",
"function make_full_width() {\n\tUBC_Collab_CLF::$full_width = true;\n}",
"public function layout() {}",
"public function initLayout();",
"public function setWidth($width) {}",
"public function defaultWidth()\n {\n $this->fullWidth = false;\n\n return $this;\n }",
"public function setContentWidth(): void\n {\n printf('<style>:root{ --content-width: %spx;}</style>', $this->contentWidth);\n }",
"public function fullWidth()\n {\n return true;\n }",
"public function setWidth($width);",
"protected function setupLayout(){\n\t\t\tif (!is_null($this->layout)){\n\t\t\t\t$this->layout = View::make($this->layout);\n\t\t\t}\n\t\t}",
"public function screen_layout(){\n return 1;\n }",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = $this->view->make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout() {\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif (! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"function prana_set_content_width( $width = '' ) {\n\tglobal $content_width;\n\t$content_width = absint( $width );\n}",
"function extant_is_full_width() {\n\n\treturn 'full' === extant_get_layout_type();\n}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n $this->setUp();\n\t}",
"protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n $this->layout->with('controller',$this);\n }\n\n\n }",
"function SetWidths($w) \r\n{\r\n $this->widths=$w; \r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert a JSON content to ExchangeRate[] | private function normalizeJsonContent (array $parsedContent)
{
$result = array_map(function (array $item) {
$resultItem = new ExchangeRate(new \DateTime($item['data'], $this->apiTimezone), new Decimal($item['cena']));
return $resultItem;
}, $parsedContent);
return $result;
} | [
"public function getCurrencyExchangeRates()\n {\n return $this->json($this->exchangeRatesArray);\n }",
"function getForeignExchangeRate()\n{\n $url = 'https://api.exchangeratesapi.io/latest?base=USD';\n $json_string = file_get_contents($url);\n $parsed_json = json_decode($json_string);\n return $parsed_json;\n}",
"protected function getMockResponseExchangeRateList()\n {\n return [\n 'EUR' => [\n 'rate' => 0.9146620000,\n 'currency' => $this->createCurrency('EUR'),\n ],\n 'JPY' => [\n 'rate' => 124.6600040000,\n 'currency' => $this->createCurrency('JPY'),\n ],\n 'MXN' => [\n 'rate' => 16.3209500000,\n 'currency' => $this->createCurrency('MXN'),\n ],\n ];\n }",
"private function getExchangeRates() {\n $values = array();\n\n // NOTE: We could use curl for more robust handling of remote connections\n \n // TODO: Improve error handling when calling the RESTful web service\n $exchangeRateXML = simplexml_load_file($this->webServiceURI);\n\n /**\n * Using multi-insert in one query execution instead of executing\n * mulltiple prepared statements for lower server overhead.\n */\n foreach ($exchangeRateXML->conversion as $conversion) {\n $values[] = '(\"' . (string)$conversion->currency . '\", ' . (float)$conversion->rate . ')';\n }\n\n $this->mysqli->query('INSERT INTO exchange_rates (currency, rate) VALUES ' . implode(',', $values));\n }",
"private function retrieve_exchange_rates() {\n\t\t$api_url = esc_attr( get_option( 'jcc_exchange_rates_api' ) );\n\t\t$from = esc_attr( get_option( 'jcc_exchange_rates_from' ) );\n\t\t$currencies = $this->get_currency_names( get_option( 'jcc_currency' ) );\n\t\t$currencies = join( ',', $currencies );\n\t\t$url = $api_url . '&from=' . $from . '¤cies=' . $currencies;\n\n\n\t\t$response = wp_remote_get( $url );\n\t\t$body = wp_remote_retrieve_body( $response );\n\t\t/*\n\t\t * Decode JSON response:\n\t\t */\n\t\t$exchangeRates = json_decode( $body, true );\n\n\t\tif ( ! isset( $exchangeRates['quotes'] ) ) {\n\t\t\treturn sprintf( __( 'API(key) is not valid : %s', $this->_slug ), $url );\n\t\t}\n\n\t\t$output = '';\n\t\tforeach ( $exchangeRates['quotes'] as $type => $rate ) {\n\t\t\t$output .= $type . ':' . $rate . \"\\n\";\n\t\t}\n\n\t\treturn nl2br( $output );\n\t}",
"protected function get_rates_from_response( $response, $from_currency, $to_currency ){\t\t\n\t\t$data = json_decode( $response['body'], true );\t\t\t\n\t\t$rates = $data['rates'];\t\t\n\n\t\treturn $rates;\n\t}",
"public function getRemoteRates(){\n\t\t$request_url = self::URL . self::API_KEY;\n\t\t\n\t\t$content = file_get_contents($request_url);\n\t\t$content = json_decode($content, true);\n\t\t\n\t\tif(isset($content['base']) && isset($content['rates'])){\t\t\n\t\t\t$exchange = new Application_Model_Exchange();\n\t\t\t$exchange->setBase($content['base']);\n\t\t\t\n\t\t\t$exchange_mapper = new Application_Model_ExchangeMapper();\n\t\t\t$exchange_mapper->save($exchange);\n\t\t\t\n\t\t\t$currency_mapper = new Application_Model_CurrencyMapper();\n\t\t\t$available_currencies = $currency_mapper->fetchAll();\n\t\t\t\n\t\t\t$rate_mapper = new Application_Model_RateMapper();\n\t\t\t\n\t\t\t$rates = $content['rates'];\n\t\t\t\n\t\t\tforeach($available_currencies as $currency){\n\t\t\t\tif(isset($rates[$currency->getCode()])){\n\t\t\t\t\t$rate = new Application_Model_Rate();\n\t\t\t\t\t$rate->setExchangeId($exchange->getId());\n\t\t\t\t\t$rate->setCurrencyId($currency->getId());\n\t\t\t\t\t$rate->setRate($rates[$currency->getCode()]);\n\t\t\t\t\t\n\t\t\t\t\t$rate_mapper->save($rate);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $exchange;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function getExchangeRates();",
"public function getExchangeRates(): array\n {\n return $this->exchangeRates;\n }",
"protected function get_rates_from_response( $response, $from_currency, $to_currency ){\r\n\t\t$rates = array();\r\n\r\n\t\t$data = json_decode( $response['body'] );\t\t\t\t\r\n\t\t\t\r\n\t\tforeach ( $to_currency as $currency ) {\r\n\t\t\t$currency_prop = strtolower($currency);\r\n\t\t\t\r\n\t\t\tif ( isset( $data->$currency_prop ) ) {\r\n\t\t\t\t$rates[$currency] = $data->$currency_prop->rate;\r\n\t\t\t} else {\r\n\t\t\t\t$rates[$currency] = 1;\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\r\n\t\treturn $rates;\r\n\t}",
"protected function getAvailableCurrenciesRate(): object\n {\n $currencies = $this->getAvailableCurrencies();\n $url = self::CURRENCY_RATE_URL . implode(',', $currencies) . '&' . env('CURRENCY_API_KEY');\n return collect(Http::get($url)['data'])->map(function($item, $key) {\n $exchange_currencies = str_split($key, 3);\n return [\n 'from' => $exchange_currencies[0],\n 'to' => $exchange_currencies[1],\n 'rate' => $item,\n ];\n });\n }",
"private function loadExchangeRatesFromAPI($baseCurrency, $url) {\n $res = file_get_contents($url);\n if ($res) {\n $data = json_decode($res, true);\n if (is_array($data) and @$data['rates']) {\n import('xf/db/Database.php');\n $db = new xf\\db\\Database(df_db());\n foreach ($data['rates'] as $target => $conversion) {\n $db->query(\"replace into stripe_exchange_rates (base_currency, target_currency, conversion, last_updated) VALUES (:from, :to, :conversion, NOW())\", (object)[\n 'from' => $baseCurrency,\n 'to' => $target,\n 'conversion' => $conversion\n ]);\n \n $this->exchangeRates[$baseCurrency.':'.$target] = floatval($conversion);\n }\n }\n }\n return $this->exchangeRates;\n }",
"public function getServiceExchangeRates()\n {\n static $cache = null;\n if (is_null($cache)) {\n $cache = [];\n $cache['EUR'] = 1.0;\n\n $content = $this->getXml();\n if ($content) {\n $xml = simplexml_load_string($content);\n if ($xml) {\n foreach ($xml->Cube->Cube->Cube as $entry) {\n $currency = strtoupper((string)$entry['currency']);\n $rate = (float)$entry['rate'];\n $cache[$currency] = $rate;\n }\n } else {\n $this->log(\"Failed to parse xml file\");\n }\n }\n }\n return $cache;\n }",
"function exchangeRateApi($from = null, $to = null, $apiKey = null) {\n // Fetching JSON\n $req_url = 'https://v6.exchangerate-api.com/v6/' . $apiKey . '/latest/' . $from;\n\n $response_json = file_get_contents($req_url);\n // Continuing if we got a result\n if(false !== $response_json) {\n // Decoding\n $response = json_decode($response_json, true);\n // Check for success\n if('success' === $response['result']) {\n return $response['conversion_rates'][$to];\n }\n }\n}",
"public function getCurrencies() {\n\n $currencies= array();\n $date = '';\n \n $client = \\Drupal::httpClient();\n $request = $client->get(self::LESSON3_RATES_SERVICE);\n $responseXML = $request->getBody();\n\n\n if (!empty($request) && isset($responseXML)) {\n\n $data = new \\SimpleXMLElement($responseXML);\n foreach ($data->Currency as $value) {\n $currencies[] = array(\n 'CharCode' => (string)$value->CharCode,\n 'Name' => (string)$value->Name,\n 'Rate' => (string)$value->Rate,\n );\n }\n\n foreach ($data->attributes() as $key => $val) {\n $date .= (string) $val;\n }\n \n \\Drupal::configFactory()\n ->getEditable('lesson3.settings')\n ->set('lesson3.currencies', $currencies)\n ->set('lesson3.date', $date)\n ->save();\n } \n\n return $currencies;\n }",
"public function getAllRates() {\n $rates = [];\n foreach ($this->sources as $src) {\n $json = file_get_contents($src);\n $source = json_decode($json);\n $rates = array_merge($rates, $this->prepareRates($source));\n }\n $rates = array_map(\"unserialize\", array_unique(array_map(\"serialize\", $rates)));\n\n return $rates;\n }",
"public function get_exchange_rates() {\n\t\t$this->CI->load->library('bw_curl');\n\t\t\n\t\t$source = $this->CI->bw_config->bitcoin_rate_config();\n\t\t$source_name = $this->CI->bw_config->price_index;\n\t\t\n\t\t$json_result = $this->CI->bw_curl->get_request($source['url']);\n\t\t\n\t\tif($json_result == NULL)\n\t\t\treturn FALSE;\n\t\t\t\n\t\t$array = json_decode($json_result);\n\t\tif($array !== FALSE && $array !== NULL) {\n\t\t\t$array->price_index = $source_name;\n\t\t\treturn $array;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"private function getForeignExchangeRates()\n {\n $url = $this->buildTimeSeriesEndpointURL();\n\n // Execute request\n $response = $this->client->get($this->buildTimeSeriesEndpointURL());\n\n // get the result and parse to JSON\n return json_decode($response->getBody(), true);\n }",
"public function getRatesFor(string $period): array\n {\n try {\n $url = $this->baseUrl . '/rates/' . $period;\n $response = $this->client\n ->request('get',\n $url,\n [\n 'headers' => [\n 'Content-Type' => 'application/json'\n ],\n ]);\n $data = $this->processResult($response);\n\n $activeRates = [];\n\n foreach ($data as $item) {\n $activeRates[] = Rate::createFromResponse($item);\n }\n\n return $activeRates;\n } catch (\\Throwable $throwable) {\n throw new MoneyException($throwable->getMessage(), $throwable->getCode());\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the repository with the given slug. | private function repository( $slug ) {
if ( ! isset( $this->repositories[ $slug ] ) ) {
throw new Unknown_Source( sprintf( esc_html__( 'Unknown ban source "%s".', 'it-l10n-ithemes-security-pro' ), $slug ) );
}
return $this->repositories[ $slug ];
} | [
"abstract function getRepositoryByAlias($repositorySlug);",
"public function getRepositoryByAlias($repositorySlug)\n {\n // TODO: Implement getRepositoryByAlias() method.\n }",
"private function getSlugRepository()\n {\n return $this->em->getRepository('DinecatSmartRoutingBundle:Slug');\n }",
"public function getResourceBySlug($slug)\n {\n return $this->getResources()\n ->where('slug', $slug)\n ->first();\n }",
"public function find($slug);",
"public function findOneBySlug($slug);",
"function getRepositoryByAlias($repositorySlug){\n\t\t$data = AJXP_Utils::loadSerialFile($this->aliasesIndexFile);\n\t\tif(isSet($data[$repositorySlug])){\n\t\t\treturn $this->getRepositoryById($data[$repositorySlug]);\n\t\t}\n\t\treturn null;\n\t}",
"public function findBySlug($slug)\n {\n $item = null;\n try {\n $query = $this->createQueryBuilder(\"p\")\n ->where(\"p.enabled=1\")\n ->andWhere(\"p.slug=:slug\")\n ->setParameter(\"slug\", $slug)\n ->getQuery();\n $item = $query->getSingleResult();\n } catch (\\Exception $ex) {\n }\n\n return $item;\n }",
"function getRoomBySlug($slug){\n return $this->roomRepository->findOneBySlug($slug);\n }",
"public function getProjectBySlug( $slug );",
"public function getCompanyBySlug($slug);",
"public function findBySlug($slug)\n {\n return Product::where('slug', $slug)->first();\n }",
"public function findOneBySlug($slug)\n {\n if(is_numeric($slug)) {\n // Lookup course by course_id\n return $this->repository->findOneByCourseId($slug);\n } else {\n // Lookup course by slug\n return $this->repository->findOneBySlug($slug);\n }\n }",
"public function findOne(string $slug): Product;",
"public function findBySlug($slug){\n return Link::where('slug', $slug)->first();\n }",
"public function getBySlug($slug)\n\t{\n\t\treturn $this->doll->with('DollTypes')->where('slug', $slug)->firstOrFail();\n\t}",
"public function getPinBySlug($slug);",
"public function findTagBySlug($slug)\n {\n return $this->repository->findOneBy(array('slug' => $slug));\n }",
"public function getRecord($slug){\n return $this->where(\"slug\", $slug)->first();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load an XML document from the specified URL. | function load($url = '') {
if (empty($url))
XML_DOMException::raise(XML_NO_FILE_ERR,
'No file or url specified');
if (function_exists('file_get_contents')) {
$doc = @file_get_contents($url);
if (!$doc || empty($doc))
XML_DOMException::raise(XML_FILE_NOT_FOUND_ERR,
'File not found or document is empty');
} else {
$doc = @file($url);
if (!$doc || empty($doc))
XML_DOMException::raise(XML_NOT_FOUND_ERR,
'File not found or document is empty');
$doc = implode('', $doc);
}
$this->parseXML($doc);
} | [
"public function load($url)\n {\n $xml = new DOMDocument();\n $xml->load($url);\n return $xml;\n }",
"function getXmlFromURL($url){\n\t\t$dom = null;\n\t\tif(empty($url)){\n\t\t\treturn null;\n\t\t}\n\t\telse{\n\t\t\t$xmlString = file_get_contents($url);\n\t\t\tif(!empty($xmlString)){\n\t\t\t\t$dom = new DOMDocument('1.0');\n\t\t\t\tif($dom->loadXML($xmlString)){\n\t\t\t\t\treturn $dom;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"function load_xml($url) {\n \n $ch = curl_init($url);\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n\n $data = simplexml_load_string(curl_exec($ch));\n\n curl_close($ch);\n\n return $data;\n }",
"function load_xml($url) {/*\n\t\tTODO remove and use built-in WP functions. Used by eventbrite plugin.\n\t*/\n $ch = curl_init($url);\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n\n $data = simplexml_load_string(curl_exec($ch));\n\n curl_close($ch);\n\n return $data;\n }",
"public function load($url)\n\t{\n\t\t// Load the URL\n\t\tif(!$this->dom->load($url))\n\t\t\treturn false;\n\t\t\n\t\t// Load RSS\n\t\t$rss = $this->get_xml_element($this->dom, \"rss\");\n\t\tif($rss && $this->loadRss($rss))\n\t\t\treturn true;\n\t\t\n\t\t// Load Atom\n\t\t$atom = $this->get_xml_element($this->dom, \"feed\");\n\t\tif($atom && $this->loadAtom($atom))\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}",
"function domtools_load_url($url)\n{\n $response = http_get($url);\n if ($response['error']) {\n return false;\n }\n $mime = empty($response['headers']['Content-Type'])\n ? 'text/html'\n : $response['headers']['Content-Type'];\n $is_xml = strpos($mime, 'xml') !== false;\n domtools_load($response['body'], $is_xml);\n domtools_base_url(dirname($url));\n return true;\n}",
"static private function getSimpleXMLFromUrl($url){\n $data = RDR_FileContents::get($url);\n if($data === false) return false;\n $xml = @simplexml_load_string($data, null, LIBXML_NOCDATA);\n if(!$xml){\n RDR_Event::log(RDR_Event::TYPE_SIMPLEXML_ERROR, array(\"text\" => $url));\n return false;\n }\n return $xml;\n }",
"protected static final function getXml($url) {\n\t\t// Since we must use curl, initialise its handler\n\t\t$ch = curl_init();\n\n\t\t// Setup curl with our options\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\n\t\t// Get the source with curl\n\t\t$source = curl_exec($ch);\n\n\t\tif (curl_errno($ch)) {\n\t\t\tdie(\"{\\\"error\\\":\\\"\" . curl_error($ch) . \"\\\"}\");\n\t\t} else {\n\t\t\t// Get HTTP response code to check for issues\n\t\t\t$h = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\t\tif (StatusCodes::isError($h) || !StatusCodes::canHaveBody($h)) {\n\t\t\t\t$err = StatusCodes::httpHeaderFor($h);\n\t\t\t\theader($err);\n\t\t\t\tdie(\"{\\\"error\\\":\\\"\" . $err . \"\\\"}\");\n\t\t\t}\n\t\t}\n\n\t\t// Close up curl, no longer needed\n\t\tcurl_close($ch);\n\n\t\t// Read the XML string into an object\n\t\t$xml = simpleXML_load_string($source);\n\n\t\t// Return it\n\t\treturn $xml;\n\t}",
"private function get_xml_url_contents($url)\n\t{\n\t\t$data = $this->get_url_contents($url);\n\n\t\tif($data === false)\n\t\t\treturn false;\n\n\t\treturn simplexml_load_string($data);\n\t}",
"public function loadFile()\n {\n\n if($this->_error === false)\n {\n $this->_feeds = simplexml_load_file($this->_url);\n }\n\t\t\telse {\n\t\t\t\t $this->_error = true;\n\t\t\t}\n }",
"public function loadByUrl($url);",
"function load_feed_xml($url)\r\n{\r\n\t$feed = new SimplePie();\r\n\t$feed->set_feed_url($url);\r\n\t$feed->init();\r\n\t$feed->handle_content_type();\r\n\t$feed->set_cache_location($GLOBALS['root_path'] . '/cache');\r\n\t\r\n\treturn $feed;\r\n}",
"public function updateXMLDocument() {\r\n $this->xml_document = file_get_contents($this->_source_url);\r\n }",
"function load_xml($request_url){\r\n\t\t\r\n\t\t$ch = curl_init();\r\n\t\t\r\n\t\t//Replace spaces with %20 in request URL\r\n\t\t$request_url=str_replace(' ', '%20', $request_url);\r\n\t\t\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $request_url);\r\n\t\tcurl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 60);\r\n\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);\r\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT,60);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);\r\n\t\t\t\t\r\n\t\t$data = curl_exec($ch);\r\n\t\t\r\n\t\t// Debug Code\r\n\t\tif(curl_errno($ch)){\r\n\t\t\t//echo 'Curl error: ' . curl_error($ch);\r\n\t\t\t//$info = curl_getinfo($ch);\t\t\r\n\t\t}\r\n\r\n\t\tcurl_close($ch);\r\n\t\t$data=simplexml_load_string($data);\r\n\t\t\r\n\t\treturn $data;\t\t\r\n}",
"public function loadRssFeed($url){\n\t\t\theader('content-type: application/xml');\n\t\t\tprint $this->puf->fetch($url);\n\t\t\texit;\n\t\t}",
"public function __construct($url)\n {\n $this->doc = new DOMDocument();\n $this->doc->load($url);\n $this->xpath = new DOMXPath($this->doc);\n }",
"static function read_from_dom($url = false) {\n //Check if url was provided\n if(!$url)\n return false;\n\n //get xml from URL\n $xmlstr = file_get_contents($url);\n\n //get into xml string\n $xmlstr = preg_replace(\"/(<\\/?)(\\w+):([^>]*>)/\", \"$1$2$3\", $xmlstr);\n\n //Create a DomDoc XML Array from String\n\n $xmlarr = XML2Array::createArray($xmlstr);\n\n return $xmlarr;\n }",
"function get_dom_for_url($url){\n $dom = new DomDocument(\"1.0\");\n // cache key - chop off \"http://www.thingiverse.com\" and sluggify\n $t_key = \"thingiverse-stream-\" . sanitize_title(substr($url,27));\n $dom_str = get_transient($t_key);\n if(false === $dom_str){\n @$dom->load($url); // use @ to suppress parser warnings\n $xml_data = $dom->saveXML();\n set_transient($t_key, $xml_data, 3600);\n } else {\n @$dom->loadXML($dom_str); // use @ to suppress parser warnings\n }\n return $dom;\n }",
"public function parse($url)\n\t{\n\t\t$this->url = $url;\n\t\t$URLContent = $this->getUrlContent();\n\t\t\n\t\tif($URLContent)\n\t\t{ \n\t\t\t$segments = str_split($URLContent, 4096);\n\t\t\tforeach($segments as $index=>$data)\n\t\t\t{\n\t\t\t\t$lastPiese = ((count($segments)-1) == $index)? true : false;\n\t\t\t\txml_parse($this->xmlParser, $data, $lastPiese)\n\t\t\t\t or die(sprintf(\"XML error: %s at line %d\", \n\t\t\t\t xml_error_string(xml_get_error_code($this->xmlParser)), \n\t\t\t\t xml_get_current_line_number($this->xmlParser)));\n\t\t\t}\n\t\t\txml_parser_free($this->xmlParser); \n\t\t}\n\t\telse\n\t\t{\n\t\t\tdie('Sorry! cannot load the feed url.');\t\n\t\t}\n\t\t\n\t\tif(empty($this->version))\n\t\t{\n\t\t\tdie('Sorry! cannot detect the feed version.');\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Possible callback for 'serverqueryCommandStarted' signals. === Examples === TeamSpeak3_Helper_Signal::getInstance()>subscribe("serverqueryCommandStarted", array($object, "onCommandStarted")); | public function onCommandStarted($cmd); | [
"protected function init()\n {\n \\TeamSpeak3::init();\n \\TeamSpeak3_Helper_Signal::getInstance()->subscribe(\"serverqueryConnected\", array($this, \"onConnect\"));\n \\TeamSpeak3_Helper_Signal::getInstance()->subscribe(\"notifyLogin\", array($this, \"onLogin\"));\n \\TeamSpeak3_Helper_Signal::getInstance()->subscribe(\"serverqueryWaitTimeout\", array($this, \"onTimeout\"));\n \\TeamSpeak3_Helper_Signal::getInstance()->subscribe(\"notifyEvent\", array($this, \"onEvent\"));\n }",
"public abstract function onManagerStarted($server);",
"public abstract function onMasterStarted($server);",
"protected function registerCommandLineEvents()\n {\n Events::on(UpdateEvents::PRECONSOLIDATE, [$this, 'consolidationChoice'], 1);\n Events::on(UpdateEvents::POSTCONSOLIDATE, [$this, 'conflictsChoice'], 1);\n Events::on(UpdateEvents::TERMINATE, [$this, 'preTerminationMessage'], 1);\n }",
"public function subscribe($commandName, CommandHandlerInterface $handler);",
"public static function onConnect(TeamSpeak3_Adapter_ServerQuery $adapter) {\n Log::info(self::$TAG, \"connected to TeamSpeak 3 Server on \" . $adapter->getHost());\n $version = $adapter->getHost()->version();\n Log::info(self::$TAG, \" server is running with version \" . $version[\"version\"] . \" on \" . $version[\"platform\"]);\n }",
"public function onConnection()\n {\n }",
"protected function _subscribeToEngineEvents()\n {}",
"protected function beforeServerStart()\n {\n $this->fireServerEvent(SwooleEvent::ON_BEFORE_START, [$this]);\n }",
"function onConnected()\n\t{\n\t\t$this->send(array(\n\t\t\t'action' => 'notify',\n\t\t\t'id' => $this->id,\n\t\t\t'clients' => array_values(self::$clients)\n\t\t));\n\t}",
"public function subscribe($commandName, CommandHandlerInterface $handler)\n {\n $this->localSegment->subscribe($commandName, $handler);\n }",
"public function addConsoleProfileStartedListener(callable $listener): SubscriptionInterface;",
"public function onConnect()\n\t{\n\t\t$this->Log(\"plugin has detected connection to network.\");\n\t}",
"function ts3client_requestChannelSubscribeAll($serverConnectionHandlerID) {}",
"public function serverHeartbeatSucceeded(ServerHeartbeatSucceededEvent $event): void;",
"public function on_connect()\n {\n $this->logger->log(\"Accepted connection from client at {$this->remote_address}:{$this->remote_port}\");\n }",
"abstract protected function onCommandStart($name);",
"abstract public function onSignalReceived( Streamwide_Engine_Events_Event $event );",
"static function subscribe_server($context) {\n $context->setProperty('server_data');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get platform Transports By Country Code | public function getTransportsByCountryCode(string $countryCode); | [
"function geoip_region_name_by_code($country_code, $region_code)\n{\n}",
"public static function getCountryByCode($code);",
"abstract public function countryCode();",
"public function getGenericCountry();",
"protected function loadCountryCodes() {\n\n\t\t$client = new \\GuzzleHttp\\Client();\n\t\t$response = $client->request('GET', 'https://api.hostaway.com/countries');\n\n\t\tif ($response->getStatusCode() != 200) {\n\t\t\tthrow new Exception('Country codes resourse not acessible.');\n\t\t}\n\n\t\t$rez = json_decode($response->getBody());\n\n\t\tif ($rez->status == \"success\") {\n\n\t\t\treturn $rez->result;\n\n\t\t} else throw new Exception('Country codes resourse answer not success.');\n\t}",
"function wc_get_wildcard_postcodes($postcode, $country = '')\n {\n }",
"function siptv_epg_codes ($country) {\n\t\t$result = [];\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://siptv.eu/codes/get_list.php\");\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, \"source={$country}\");\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, [\n\t\t\t\"cookie:origin=valid\",\n\t\t\t\"origin:https://siptv.eu\",\n\t\t\t\"referer:https://siptv.eu/codes/\",\n\t\t\t\"x-requested-with:XMLHttpRequest\",\n\t\t\t\"content-type:application/x-www-form-urlencoded; charset=UTF-8\"\n\t\t]);\n\t\t$html = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t// Extract countries\n\t\tif (preg_match_all('/(?<=<td align=\"center\">)(.*?)(?=<\\/td>)/i', $html, $texts) && preg_match_all('/(?<=<td align=\"center\" style=\"padding: 0 10px;\">)(.*?)(?=<\\/td>)/i', $html, $values)) {\n\t\t\tforeach ($values[0] as $index => $value) {\n\t\t\t\t$result[] = [\n\t\t\t\t\t'tvg_id' => $value,\n\t\t\t\t\t'tvg_name' => $texts[0][$index]\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}",
"public function getCountryIndustries();",
"public function getCurrencyByCountry($countryCode) {\n $map = array( '' => '',\n \"EU\" => \"EUR\", \"AD\" => \"EUR\", \"AE\" => \"AED\", \"AF\" => \"AFN\", \"AG\" => \"XCD\", \"AI\" => \"XCD\", \n \"AL\" => \"ALL\", \"AM\" => \"AMD\", \"CW\" => \"ANG\", \"AO\" => \"AOA\", \"AQ\" => \"AQD\", \"AR\" => \"ARS\", \"AS\" => \"EUR\", \n \"AT\" => \"EUR\", \"AU\" => \"AUD\", \"AW\" => \"AWG\", \"AZ\" => \"AZN\", \"BA\" => \"BAM\", \"BB\" => \"BBD\", \n \"BD\" => \"BDT\", \"BE\" => \"EUR\", \"BF\" => \"XOF\", \"BG\" => \"BGL\", \"BH\" => \"BHD\", \"BI\" => \"BIF\", \n \"BJ\" => \"XOF\", \"BM\" => \"BMD\", \"BN\" => \"BND\", \"BO\" => \"BOB\", \"BR\" => \"BRL\", \"BS\" => \"BSD\", \n \"BT\" => \"BTN\", \"BV\" => \"NOK\", \"BW\" => \"BWP\", \"BY\" => \"BYR\", \"BZ\" => \"BZD\", \"CA\" => \"CAD\", \n \"CC\" => \"AUD\", \"CD\" => \"CDF\", \"CF\" => \"XAF\", \"CG\" => \"XAF\", \"CH\" => \"CHF\", \"CI\" => \"XOF\", \n \"CK\" => \"NZD\", \"CL\" => \"CLP\", \"CM\" => \"XAF\", \"CN\" => \"CNY\", \"CO\" => \"COP\", \"CR\" => \"CRC\", \n \"CU\" => \"CUP\", \"CV\" => \"CVE\", \"CX\" => \"AUD\", \"CY\" => \"EUR\", \"CZ\" => \"CZK\", \"DE\" => \"EUR\", \n \"DJ\" => \"DJF\", \"DK\" => \"DKK\", \"DM\" => \"XCD\", \"DO\" => \"DOP\", \"DZ\" => \"DZD\", \"EC\" => \"ECS\", \n \"EE\" => \"EEK\", \"EG\" => \"EGP\", \"EH\" => \"MAD\", \"ER\" => \"ETB\", \"ES\" => \"EUR\", \"ET\" => \"ETB\", \n \"FI\" => \"EUR\", \"FJ\" => \"FJD\", \"FK\" => \"FKP\", \"FM\" => \"USD\", \"FO\" => \"DKK\", \"FR\" => \"EUR\", \"SX\" => \"ANG\",\n \"GA\" => \"XAF\", \"GB\" => \"GBP\", \"GD\" => \"XCD\", \"GE\" => \"GEL\", \"GF\" => \"EUR\", \"GH\" => \"GHS\", \n \"GI\" => \"GIP\", \"GL\" => \"DKK\", \"GM\" => \"GMD\", \"GN\" => \"GNF\", \"GP\" => \"EUR\", \"GQ\" => \"XAF\", \n \"GR\" => \"EUR\", \"GS\" => \"GBP\", \"GT\" => \"GTQ\", \"GU\" => \"USD\", \"GW\" => \"XOF\", \"GY\" => \"GYD\", \n \"HK\" => \"HKD\", \"HM\" => \"AUD\", \"HN\" => \"HNL\", \"HR\" => \"HRK\", \"HT\" => \"HTG\", \"HU\" => \"HUF\", \n \"ID\" => \"IDR\", \"IE\" => \"EUR\", \"IL\" => \"ILS\", \"IN\" => \"INR\", \"IO\" => \"USD\", \"IQ\" => \"IQD\", \n \"IR\" => \"IRR\", \"IS\" => \"ISK\", \"IT\" => \"EUR\", \"JM\" => \"JMD\", \"JO\" => \"JOD\", \"JP\" => \"JPY\", \n \"KE\" => \"KES\", \"KG\" => \"KGS\", \"KH\" => \"KHR\", \"KI\" => \"AUD\", \"KM\" => \"KMF\", \"KN\" => \"XCD\", \n \"KP\" => \"KPW\", \"KR\" => \"KRW\", \"KW\" => \"KWD\", \"KY\" => \"KYD\", \"KZ\" => \"KZT\", \"LA\" => \"LAK\", \n \"LB\" => \"LBP\", \"LC\" => \"XCD\", \"LI\" => \"CHF\", \"LK\" => \"LKR\", \"LR\" => \"LRD\", \"LS\" => \"LSL\", \n \"LT\" => \"LTL\", \"LU\" => \"EUR\", \"LV\" => \"LVL\", \"LY\" => \"LYD\", \"MA\" => \"MAD\", \"MC\" => \"EUR\", \n \"MD\" => \"MDL\", \"MG\" => \"MGF\", \"MH\" => \"USD\", \"MK\" => \"MKD\", \"ML\" => \"XOF\", \"MM\" => \"MMK\", \n \"MN\" => \"MNT\", \"MO\" => \"MOP\", \"MP\" => \"USD\", \"MQ\" => \"EUR\", \"MR\" => \"MRO\", \"MS\" => \"XCD\", \n \"MT\" => \"EUR\", \"MU\" => \"MUR\", \"MV\" => \"MVR\", \"MW\" => \"MWK\", \"MX\" => \"MXN\", \"MY\" => \"MYR\", \n \"MZ\" => \"MZN\", \"NA\" => \"NAD\", \"NC\" => \"XPF\", \"NE\" => \"XOF\", \"NF\" => \"AUD\", \"NG\" => \"NGN\", \n \"NI\" => \"NIO\", \"NL\" => \"EUR\", \"NO\" => \"NOK\", \"NP\" => \"NPR\", \"NR\" => \"AUD\", \"NU\" => \"NZD\", \n \"NZ\" => \"NZD\", \"OM\" => \"OMR\", \"PA\" => \"PAB\", \"PE\" => \"PEN\", \"PF\" => \"XPF\", \"PG\" => \"PGK\", \n \"PH\" => \"PHP\", \"PK\" => \"PKR\", \"PL\" => \"PLN\", \"PM\" => \"EUR\", \"PN\" => \"NZD\", \"PR\" => \"USD\", \"PS\" => \"ILS\", \"PT\" => \"EUR\", \n \"PW\" => \"USD\", \"PY\" => \"PYG\", \"QA\" => \"QAR\", \"RE\" => \"EUR\", \"RO\" => \"RON\", \"RU\" => \"RUB\", \n \"RW\" => \"RWF\", \"SA\" => \"SAR\", \"SB\" => \"SBD\", \"SC\" => \"SCR\", \"SD\" => \"SDD\", \"SE\" => \"SEK\", \n \"SG\" => \"SGD\", \"SH\" => \"SHP\", \"SI\" => \"EUR\", \"SJ\" => \"NOK\", \"SK\" => \"SKK\", \"SL\" => \"SLL\", \n \"SM\" => \"EUR\", \"SN\" => \"XOF\", \"SO\" => \"SOS\", \"SR\" => \"SRG\", \"ST\" => \"STD\", \"SV\" => \"SVC\", \n \"SY\" => \"SYP\", \"SZ\" => \"SZL\", \"TC\" => \"USD\", \"TD\" => \"XAF\", \"TF\" => \"EUR\", \"TG\" => \"XOF\", \n \"TH\" => \"THB\", \"TJ\" => \"TJS\", \"TK\" => \"NZD\", \"TM\" => \"TMM\", \"TN\" => \"TND\", \"TO\" => \"TOP\", \"TL\" => \"USD\",\n \"TR\" => \"TRY\", \"TT\" => \"TTD\", \"TV\" => \"AUD\", \"TW\" => \"TWD\", \"TZ\" => \"TZS\", \"UA\" => \"UAH\", \n \"UG\" => \"UGX\", \"UM\" => \"USD\", \"US\" => \"USD\", \"UY\" => \"UYU\", \"UZ\" => \"UZS\", \"VA\" => \"EUR\", \n \"VC\" => \"XCD\", \"VE\" => \"VEF\", \"VG\" => \"USD\", \"VI\" => \"USD\", \"VN\" => \"VND\", \"VU\" => \"VUV\",\n \"WF\" => \"XPF\", \"WS\" => \"EUR\", \"YE\" => \"YER\", \"YT\" => \"EUR\", \"RS\" => \"RSD\", \n \"ZA\" => \"ZAR\", \"ZM\" => \"ZMK\", \"ME\" => \"EUR\", \"ZW\" => \"ZWD\",\n \"AX\" => \"EUR\", \"GG\" => \"GBP\", \"IM\" => \"GBP\", \n \"JE\" => \"GBP\", \"BL\" => \"EUR\", \"MF\" => \"EUR\", \"BQ\" => \"USD\", \"SS\" => \"SSP\"\n );\n \n return $map[$countryCode];\n }",
"public function getCountry() {}",
"public function getCountryCodes()\n {\n return Mage::helper('satispay/phone')\n ->getCountryCodes();\n }",
"function geoip_country_code_by_name($hostname)\n {\n return 'O1';\n }",
"function tep_get_countries_with_iso_codes($countries_id) {\n\treturn tep_get_countries($countries_id, true);\n}",
"public function country();",
"function getLocale ($country_code='', $language_code='') {\r\n // list-of-all-locales-and-their-short-codes\r\n $locales = array(\r\n 'af_ZA',\r\n 'am_ET',\r\n 'ar_AE',\r\n 'ar_BH',\r\n 'ar_DZ',\r\n 'ar_EG',\r\n 'ar_IQ',\r\n 'ar_JO',\r\n 'ar_KW',\r\n 'ar_LB',\r\n 'ar_LY',\r\n 'ar_MA',\r\n 'arn-CL',\r\n 'ar_OM',\r\n 'ar_QA',\r\n 'ar_SA',\r\n 'ar_SY',\r\n 'ar_TN',\r\n 'ar_YE',\r\n 'as_IN',\r\n 'az-Cyrl-AZ',\r\n 'az-Latn-AZ',\r\n 'ba_RU',\r\n 'be_BY',\r\n 'bg_BG',\r\n 'bn_BD',\r\n 'bn_IN',\r\n 'bo_CN',\r\n 'br_FR',\r\n 'bs-Cyrl-BA',\r\n 'bs-Latn-BA',\r\n 'ca_ES',\r\n 'co_FR',\r\n 'cs_CZ',\r\n 'cy_GB',\r\n 'da_DK',\r\n 'de_AT',\r\n 'de_CH',\r\n 'de_DE',\r\n 'de_LI',\r\n 'de_LU',\r\n 'dsb-DE',\r\n 'dv_MV',\r\n 'el_GR',\r\n 'en_AU',\r\n 'en_BZ',\r\n 'en_CA',\r\n 'en_GB',\r\n 'en_IE',\r\n 'en_IN',\r\n 'en_JM',\r\n 'en_MY',\r\n 'en_NZ',\r\n 'en_PH',\r\n 'en_SG',\r\n 'en_TT',\r\n 'en_US',\r\n 'es_AR',\r\n 'es_BO',\r\n 'es_CL',\r\n 'es_CO',\r\n 'es_CR',\r\n 'es_DO',\r\n 'es_EC',\r\n 'es_ES',\r\n 'es_GT',\r\n 'es_HN',\r\n 'es_MX',\r\n 'es_NI',\r\n 'es_PA',\r\n 'es_PE',\r\n 'es_PR',\r\n 'es_PY',\r\n 'es_SV',\r\n 'es_US',\r\n 'es_UY',\r\n 'es_VE',\r\n 'et_EE',\r\n 'eu_ES',\r\n 'fa_IR',\r\n 'fi_FI',\r\n 'fil-PH',\r\n 'fo_FO',\r\n 'fr_BE',\r\n 'fr_CA',\r\n 'fr_CH',\r\n 'fr_FR',\r\n 'fr_LU',\r\n 'fr_MC',\r\n 'fy_NL',\r\n 'ga_IE',\r\n 'gd_GB',\r\n 'gl_ES',\r\n 'gsw-FR',\r\n 'gu_IN',\r\n 'ha-Latn-NG',\r\n 'he_IL',\r\n 'hi_IN',\r\n 'hr_BA',\r\n 'hr_HR',\r\n 'hsb-DE',\r\n 'hu_HU',\r\n 'hy_AM',\r\n 'id_ID',\r\n 'ig_NG',\r\n 'ii_CN',\r\n 'is_IS',\r\n 'it_CH',\r\n 'it_IT',\r\n 'iu-Cans-CA',\r\n 'iu-Latn-CA',\r\n 'ja_JP',\r\n 'ka_GE',\r\n 'kk_KZ',\r\n 'kl_GL',\r\n 'km_KH',\r\n 'kn_IN',\r\n 'kok-IN',\r\n 'ko_KR',\r\n 'ky_KG',\r\n 'lb_LU',\r\n 'lo_LA',\r\n 'lt_LT',\r\n 'lv_LV',\r\n 'mi_NZ',\r\n 'mk_MK',\r\n 'ml_IN',\r\n 'mn_MN',\r\n 'mn-Mong-CN',\r\n 'moh-CA',\r\n 'mr_IN',\r\n 'ms_BN',\r\n 'ms_MY',\r\n 'mt_MT',\r\n 'nb_NO',\r\n 'ne_NP',\r\n 'nl_BE',\r\n 'nl_NL',\r\n 'nn_NO',\r\n 'nso-ZA',\r\n 'oc_FR',\r\n 'or_IN',\r\n 'pa_IN',\r\n 'pl_PL',\r\n 'prs-AF',\r\n 'ps_AF',\r\n 'pt_BR',\r\n 'pt_PT',\r\n 'qut-GT',\r\n 'quz-BO',\r\n 'quz-EC',\r\n 'quz-PE',\r\n 'rm_CH',\r\n 'ro_RO',\r\n 'ru_RU',\r\n 'rw_RW',\r\n 'sah-RU',\r\n 'sa_IN',\r\n 'se_FI',\r\n 'se_NO',\r\n 'se_SE',\r\n 'si_LK',\r\n 'sk_SK',\r\n 'sl_SI',\r\n 'sma-NO',\r\n 'sma-SE',\r\n 'smj-NO',\r\n 'smj-SE',\r\n 'smn-FI',\r\n 'sms-FI',\r\n 'sq_AL',\r\n 'sr-Cyrl-BA',\r\n 'sr-Cyrl-CS',\r\n 'sr-Cyrl-ME',\r\n 'sr-Cyrl-RS',\r\n 'sr-Latn-BA',\r\n 'sr-Latn-CS',\r\n 'sr-Latn-ME',\r\n 'sr-Latn-RS',\r\n 'sv_FI',\r\n 'sv_SE',\r\n 'sw_KE',\r\n 'syr-SY',\r\n 'ta_IN',\r\n 'te_IN',\r\n 'tg-Cyrl-TJ',\r\n 'th_TH',\r\n 'tk_TM',\r\n 'tn_ZA',\r\n 'tr_TR',\r\n 'tt_RU',\r\n 'tzm-Latn-DZ',\r\n 'ug_CN',\r\n 'uk_UA',\r\n 'ur_PK',\r\n 'uz-Cyrl-UZ',\r\n 'uz-Latn-UZ',\r\n 'vi_VN',\r\n 'wo_SN',\r\n 'xh_ZA',\r\n 'yo_NG',\r\n 'zh_CN',\r\n 'zh_HK',\r\n 'zh_MO',\r\n 'zh_SG',\r\n 'zh_TW',\r\n 'zu-ZA'\r\n );\r\n\r\n /*\r\n foreach ($locales as $locale)\r\n {\r\n $locale_region = locale_get_region($locale);\r\n $locale_language = locale_get_primary_language($locale);\r\n $locale_array = array('language' => $locale_language,\r\n 'region' => $locale_region);\r\n\r\n if (strtoupper($country_code) == $locale_region &&\r\n $language_code == '')\r\n {\r\n return locale_compose($locale_array);\r\n }\r\n elseif (strtoupper($country_code) == $locale_region &&\r\n strtolower($language_code) == $locale_language)\r\n {\r\n return locale_compose($locale_array);\r\n }\r\n }\r\n */\r\n\r\n /*\r\n $locale = strtolower($language_code).'_'.strtoupper($country_code);\r\n echo $locale;\r\n if (in_array($locale, $locales))\r\n return $locale;\r\n else\r\n return null;\r\n */\r\n\r\n if (isset($language_code)) {\r\n $ret = '';\r\n foreach ($locales as $value) {\r\n if (strtolower(substr($value,0,strlen($language_code))) == strtolower($language_code))\r\n $ret = $value;\r\n };\r\n return $ret;\r\n }\r\n\r\n return false;\r\n\r\n}",
"function get_country() {\n\n\tglobal $post;\n\n\t// Limits API calls to product pages and portals.\n\tif ( is_plugin_active( 'lawyerist-trial-buttons/lawyerist-trial-buttons.php' ) && ( has_trial_button() || get_page_template_slug( $post->ID ) == 'product-page.php' ) ) {\n\n\t\t// Get user's geographic location by IP address.\n\t\t// Set IP address and API access key.\n\t\t$ip = $_SERVER[ 'REMOTE_ADDR' ];\n\t\t$access_key = '55e08636154002dca5b45f0920143108';\n\n\t\t// Initialize CURL.\n\t\t$ch = curl_init( 'http://api.ipstack.com/' . $ip . '?access_key=' . $access_key . '' );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\n\t\t// Store the data.\n\t\t$json = curl_exec( $ch );\n\t\tcurl_close( $ch );\n\n\t\t// Decode JSON response.\n\t\t$api_result = json_decode( $json, true );\n\n\t\t// Return the country code (i.e., \"US\" or \"CA\").\n\t\treturn $api_result[ 'country_code' ];\n\n\t}\n\n}",
"public function postalCodeCountryInfo() {\n return $this->exe->get([\n 'cmd'=>'postalCodeCountryInfo'\n ]);\n }",
"public static function getCodeCountry(){\n //Todo: Implement.\n return 'AR';\n return $_SERVER[\"HTTP_CF_IPCOUNTRY\"];\n }",
"function tep_get_countries_with_iso_codes($countries_id) {\n return tep_get_countries($countries_id, true);\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.