query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Function that set blog list type value for global blog option map | function fiorello_mikado_set_blog_masonry_gallery_type_global_option( $options ) {
$options['masonry-gallery'] = esc_html__( 'Blog: Masonry Gallery', 'fiorello' );
return $options;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function voyage_mikado_get_default_blog_list() {\n\n $blog_list = voyage_mikado_options()->getOptionValue('blog_list_type');\n\n return $blog_list;\n\n }",
"public function set_options() {\n\t\tif ( Kiwi_Social_Share_Helper::get_setting_value( 'click_to_tweet_posttypes', 'all' ) === 'all' ) {\n\t\t\t$this->post_types = 'all';\n\t\t} else {\n\t\t\t$post_types = Kiwi_Social_Share_Helper::get_setting_value( 'click_to_tweet_posttypes_list', array() );\n\t\t\t$this->post_types = array_merge( $this->post_types, $post_types );\n\t\t};\n\t}",
"function medigroup_mikado_get_default_blog_list() {\n\n $blog_list = medigroup_mikado_options()->getOptionValue('blog_list_type');\n\n return $blog_list;\n\n }",
"function my_et_builder_post_types( $post_types ) {\n $post_types[] = 'listing';\n\n return $post_types;\n}",
"function process_type(&$list)\n{\n\tforeach ($list as $index => $row) {\n\t\tif ($row['climb_type'] == 'Lead')\n\t\t\t$list[$index]['climb_type'] = 'L';\n\t\telse\n\t\t\t$list[$index]['climb_type'] = '';\n\t}\n}",
"function set_post_type($post_id = 0, $post_type = 'post')\n {\n }",
"function voyage_mikado_get_blog_type($type) {\n\n $blog_query = voyage_mikado_get_blog_query();\n\n $paged = voyage_mikado_paged();\n $blog_classes = '';\n\n if(voyage_mikado_options()->getOptionValue('blog_page_range') != \"\") {\n $blog_page_range = esc_attr(voyage_mikado_options()->getOptionValue('blog_page_range'));\n } else {\n $blog_page_range = $blog_query->max_num_pages;\n }\n $show_load_more = voyage_mikado_enable_load_more();\n\n if($show_load_more) {\n $blog_classes .= ' mkdf-blog-load-more';\n }\n\n $params = array(\n 'blog_query' => $blog_query,\n 'paged' => $paged,\n 'blog_page_range' => $blog_page_range,\n 'blog_type' => $type,\n 'blog_classes' => $blog_classes\n );\n\n voyage_mikado_get_module_template_part('templates/lists/'.$type, 'blog', '', $params);\n }",
"function medigroup_mikado_get_blog_type($type) {\n\n $blog_query = medigroup_mikado_get_blog_query();\n\n $paged = medigroup_mikado_paged();\n $blog_classes = '';\n\n if(medigroup_mikado_options()->getOptionValue('blog_page_range') != \"\") {\n $blog_page_range = esc_attr(medigroup_mikado_options()->getOptionValue('blog_page_range'));\n } else {\n $blog_page_range = $blog_query->max_num_pages;\n }\n $show_load_more = medigroup_mikado_enable_load_more();\n\n if($show_load_more) {\n $blog_classes .= ' mkd-blog-load-more';\n }\n\n $params = array(\n 'blog_query' => $blog_query,\n 'paged' => $paged,\n 'blog_page_range' => $blog_page_range,\n 'blog_type' => $type,\n 'blog_classes' => $blog_classes\n );\n\n medigroup_mikado_get_module_template_part('templates/lists/'.$type, 'blog', '', $params);\n }",
"function bs_configure_custom_post_types($args)\n{\n function bs_custom_post_types()\n {\n global $bs_config;\n\n foreach ($bs_config[\"custom-post-types\"] as $key => $type) {\n $type = bs_defaults($type, [\n \"public\" => true,\n ]);\n\n if (isset($type[\"name\"])) {\n $type[\"labels\"][\"name\"] = $type[\"name\"];\n }\n\n if (isset($type[\"slug\"])) {\n $type[\"rewrite\"][\"slug\"] = $type[\"slug\"];\n }\n\n if (isset($type[\"admin_only\"]) && $type[\"admin_only\"]) {\n $type[\"public\"] = false;\n $type[\"show_ui\"] = true;\n }\n\n register_post_type($key, bs_array_omit($type, [\"slug\", \"name\", \"admin_only\"]));\n }\n }\n add_action(\"init\", \"bs_custom_post_types\");\n}",
"function add_blog_option($id, $option, $value)\n {\n }",
"public function set_post_types() {\n\t\tadd_filter(\n\t\t\t'slack_event_transition_post_status_post_types',\n\t\t\tfunction( $post_types ) {\n\t\t\t\t$set_post_types = get_option( 'slack-post-types' );\n\t\t\t\tforeach( $set_post_types as $post_type => $on ) {\n\t\t\t\t\t$post_types[] = $post_type;\n\t\t\t\t}\n\n\t\t\t\treturn $post_types;\n\t\t\t}\n\t\t);\n\t}",
"private function post_types() {\n\t\t$this->section_data['general_post_types'] = array(\n\t\t\t'name' \t\t\t\t\t=> 'general_post_types',\n\t\t\t'label' \t\t\t\t=> __( 'Post types', 'fixedtoc' ),\n\t\t\t'default' \t\t\t=> array( 'post', 'page' ),\n\t\t\t'type' \t\t\t\t\t=> 'multi_checkbox',\n\t\t\t'choices'\t\t\t\t=> $this->obj_field_data->get_posttype_choices(),\n\t\t\t'des'\t\t\t\t\t\t=> __( 'Check the post types to be applied. Multiple choice.', 'fixedtoc' )\n\t\t);\n\t}",
"function ctools_term_list_content_type_edit_form_submit(&$form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n}",
"function types_rename_build_in_post_types() {\n global $wp_post_types;\n $custom_types = get_option( WPCF_OPTION_NAME_CUSTOM_TYPES, array() );\n\n if ( !empty( $custom_types ) ) {\n foreach ( $custom_types as $post_type => $data ) {\n // only for build_in\n if (\n isset( $data['_builtin'] )\n && $data['_builtin']\n && isset( $data['slug'] )\n && isset( $data['labels']['name'] )\n ) {\n // check if slug (post/page) exists\n if( isset( $wp_post_types[$data['slug']] ) ) {\n // refer $l to post labels\n $l = &$wp_post_types[$data['slug']]->labels;\n\n // change name\n $l->name = isset( $data['labels']['name'] ) ? $data['labels']['name'] : $l->name;\n\n // change singular name\n $l->singular_name = isset( $data['labels']['singular_name'] ) ? $data['labels']['singular_name'] : $l->singular_name;\n\n // change labels\n $l->add_new_item = 'Add New';\n $l->add_new = 'Add New ' . $l->singular_name;\n $l->edit_item = 'Edit ' . $l->singular_name;\n $l->new_item = 'New ' . $l->name ;\n $l->view_item = 'View ' . $l->name;\n $l->search_items = 'Search '. $l->name;\n $l->not_found = 'No ' . $l->name . ' found';\n $l->not_found_in_trash = 'No ' . $l->name . ' found in Trash';\n $l->parent_item_colon = 'Parent '. $l->name;\n $l->all_items = 'All ' . $l->name;\n $l->menu_name = $l->name;\n $l->name_admin_bar = $l->name;\n\n }\n }\n }\n }\n}",
"public function set_options()\n {\n // Attempt to retrieve our feature default settings so that we can compare against our post types query\n $defaults = get_option(self::FEATURE_DEFAULTS);\n\n // Retrieve all post types for the given instance and filter down to only publicly accessible types\n $types = get_post_types([\n 'public' => true,\n 'show_in_menu' => true,\n 'exclude_from_search' => false\n ]);\n\n // Remove all post types that we don't want to support duplication for\n $post_types = array_keys(\n array_filter(\n $types,\n function ($key) {\n return !in_array($key, ['attachment']);\n },\n ARRAY_FILTER_USE_KEY\n )\n );\n\n $this->defaults = [\n 'post_types' => $post_types\n ];\n\n // We don't want to ALWAYS update our feature defaults option unless\n // we know that new post types have been added/deleted\n if (isset($defaults) && $post_types === $defaults['post_types']) {\n return;\n }\n\n update_option(self::FEATURE_DEFAULTS, $this->defaults);\n }",
"function wph_post_types() { ?>\n\t<ul>\n\t\t<li><strong><a href=\"/\">Home</a></strong></li>\n\t\t<li><strong><a href=\"/sites/\">Sites</a></strong></li>\n\t\t<li><strong><a href=\"/plugins/\">Plugins</a></strong></li>\n\t\t<li><strong><a href=\"/themes/\">Themes</a></strong></li>\n\t\t<li><strong><a href=\"/personalities/\">Personalities</a></strong></li>\n\t\t<li><strong><a href=\"/sponsors/\">Sponsors</a></strong></li>\n\t\t<li><strong><a href=\"/blog/\">Blog</a></strong></li>\n\t\t<li><strong><a href=\"/contact/\">Contact</a></strong></li>\n\t</ul>\n<?php\n}",
"function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }",
"function choose_primary_blog()\n {\n }",
"function wp_getPostTypes( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n\n if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_types = get_post_types( '','objects' );\n\n $struct = array();\n\n foreach( $post_types as $post_type ) {\n\n // capability check for post_types\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n continue;\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n $struct[ $post_type['name'] ] = $post_type_data;\n\n }\n\n return $struct;\n \n}",
"function voyage_mikado_blog_types() {\n\n $types = array_merge(voyage_mikado_blog_grid_types(), voyage_mikado_blog_full_width_types());\n\n return $types;\n\n }",
"protected function addPostTypeConfigs()\n {\n // TODO: add post type configs\n }",
"public function bamobile_mobiconnector_add_show_in_rest_to_post_type() {\r\n global $wp_post_types;\r\n $listoptionscheckbox = get_option('mobiconnector_settings-post_type');\r\n $listoptionscheckbox = unserialize($listoptionscheckbox);\r\n if(!empty($listoptionscheckbox)){\r\n $post_type = '';\r\n foreach($listoptionscheckbox as $posttype => $value){ \r\n $name = str_replace('mobi-','',$posttype); \r\n if($value == 1){\r\n if( isset( $wp_post_types[$name] ) ) {\r\n $wp_post_types[$name]->show_in_rest = true;\r\n }\r\n }\r\n }\r\n }\r\n }",
"public function kong_filter_sites( $post_type, $which ) {\n\n // Apply this only on a specific post type\n if ( 'ticket' !== $post_type )\n return;\n\n // A list of taxonomy slugs to filter by\n $sites = get_sites();\n $currentblog = get_current_blog_id();\n\n echo '<select name=\"kong_ticket_sites\" id=\"kong_ticket_sites\" class=\"postform\">';\n foreach ( $sites as $i => $site ) { \n switch_to_blog( $site->blog_id );\n $current_blog_details = get_blog_details( array( 'blog_id' => $site->blog_id ) );\n\n if(isset($_GET['kong_ticket_sites'])){\n $currentblog = $_GET['kong_ticket_sites'];\n }?>\n\n <option value=\"<?php echo $site->blog_id;?>\" <?php echo (isset($_GET['kong_ticket_sites']) && $_GET['kong_ticket_sites'] == $site->blog_id) ? 'selected=\"true\"': ''?>><?php echo $current_blog_details->blogname;?></option>\n <?php restore_current_blog();\n }\n echo '</select>';\n\n }",
"public function setCustomPostTypes() {\n $args = array(\n // ## Badges ##\n array(\n 'post_type' => self::POST_TYPE_BADGES,\n 'args' => array(\n 'labels' => array(\n 'name' => 'Badges',\n 'singular_name' => 'Badge',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Badge',\n 'edit' => 'Edit',\n 'edit_item' => 'Edit Badge',\n 'new_item' => 'New Badge',\n 'view' => 'View',\n 'view_item' => 'View Badge',\n 'search_items' => 'Search Badges',\n 'not_found' => 'No Badges found',\n 'not_found_in_trash' => 'No Badges found in Trash',\n 'parent' => 'Parent Badges'\n ),\n 'public' => true,\n 'has_archive' => true,\n 'show_in_admin_bar' => true,\n 'show_ui' => true,\n 'show_in_menu' => false, // adding to custom menu manually\n 'supports' => array('title', 'editor', 'author', 'thumbnail',),\n // Capabilities that are debilitated waiting a solution\n // already explained in the User class.\n /*\n 'capabilities' => array(\n 'edit_post' => User::CAP_EDIT_BADGE,\n 'edit_posts' => User::CAP_EDIT_BADGES,\n 'edit_others_posts' => User::CAP_EDIT_OTHER_BADGES,\n 'edit_published_posts' => User::CAP_EDIT_PUBLISHED_BADGES,\n 'publish_posts' => User::CAP_PUBLISHED_BADGES,\n 'read_post' => User::CAP_READ_BADGE,\n 'read_posts' => User::CAP_READ_BADGES,\n 'read_private_posts' => User::CAP_READ_BADGES,\n 'delete_post' => User::CAP_DELETE_BADGE,\n 'delete_posts' => User::CAP_DELETE_BADGES,\n )*/\n )\n ),\n );\n\n $this->settings->loadCustomPostTypes($args);\n }",
"function ctools_term_list_content_type_edit_form(&$form, &$form_state) {\n $conf = $form_state['conf'];\n\n $form['type'] = array(\n '#type' => 'radios',\n '#title' => t('Which terms'),\n '#options' => ctools_admin_term_list_options(),\n '#default_value' => $conf['type'],\n '#prefix' => '<div class=\"clear-block no-float\">',\n '#suffix' => '</div>',\n );\n\n $form['list_type'] = array(\n '#type' => 'select',\n '#title' => t('List type'),\n '#options' => array('ul' => t('Unordered'), 'ol' => t('Ordered')),\n '#default_value' => $conf['list_type'],\n );\n}",
"function db099_lifterlms_init() {\r\n\tadd_filter('et_builder_post_types', 'db099_lifterlms_add_post_types');\r\n\tadd_action('admin_head', 'db099_lifterlms_admin_head', 11); // Run after main booster feature\r\n}",
"function get_blog_option($id, $option, $default_value = \\false)\n {\n }",
"function jobstar_job_type_set_defaults() {\r\n\r\n if ( get_option( 'jobstar_set_default_job_types', false ) ) {\r\n return;\r\n }\r\n $defaults = array(\r\n 'full-time' => '#90da36',\r\n 'part-time' => '#f08d3c',\r\n 'temporary' => '#d93674',\r\n 'freelance' => '#0073aa',\r\n 'internship'=> '#6033cc'\r\n );\r\n $types = get_terms( array(\r\n 'taxonomy' => 'job_listing_type',\r\n 'hide_empty' => false,\r\n 'fields' => 'id=>slug'\r\n ) );\r\n foreach ( $types as $type_id => $type ) {\r\n if ( array_key_exists( $type, $defaults ) ) {\r\n add_term_meta( $type_id, '_color', $defaults[ $type ], true );\r\n }\r\n }\r\n update_option( 'jobstar_set_default_job_types', true );\r\n}",
"function wp_getPostType( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape( $args );\n\n $blog_ID = (int) $args[0];\n $username = $args[1];\n $password = $args[2];\n $post_type_name = $args[3];\n\n if ( !$user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n\n $post_type_names = get_post_types('', 'names');\n\n if( ! in_array( $post_type_name, $post_type_names ) )\n return new IXR_Error( 403, __( 'The post type specified is not valid' ) );\n\n $post_type = get_post_type_object( $post_type_name );\n\n //capability check\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type' ) );\n\n $post_type = (array)$post_type;\n\n $post_type_data = array(\n 'labels' => $post_type['labels'],\n 'description' => $post_type['description'],\n 'capability_type' => $post_type['capability_type'],\n 'cap' => $post_type['cap'],\n 'map_meta_cap' => $post_type['map_meta_cap'],\n 'hierarchical' => $post_type['hierarchical'],\n 'menu_position' => $post_type['menu_position'],\n 'taxonomies' => get_object_taxonomies( $post_type['name'] ),\n );\n\n return $post_type_data;\n \n}",
"public function post_type( $key ) {\n\t\t$this->data['post_type'] = $key;\n\t\t$this->post_type_key = $key;\n\t}",
"function inkpro_add_blog_display_options( $options ) {\r\n\r\n\t$new_options = array(\r\n\t\t'standard' => esc_html__( 'Standard', 'inkpro' ),\r\n\t\t'grid' => esc_html__( 'Square grid', 'inkpro' ),\r\n\t\t'grid3' => esc_html__( 'Portrait grid', 'inkpro' ),\r\n\t\t'column' => esc_html__( 'Columns', 'inkpro' ),\r\n\t\t'masonry' => esc_html__( 'Masonry', 'inkpro' ),\r\n\t\t'metro' => esc_html__( 'Metro', 'inkpro' ),\r\n\t\t'medium-image' => esc_html__( 'Medium image', 'inkpro' ),\r\n\t\t'photo' => esc_html__( 'Photo', 'inkpro' ),\r\n\t);\r\n\r\n\t$options = array_merge( $new_options, $options );\r\n\t\r\n\treturn $options;\r\n}",
"function omfg_mobile_pro_create_site_posttypes() {\n\tdo_action('omfg_mobile_pro_create_site_posttypes');\n}",
"public static function post_type(){}",
"function medigroup_mikado_blog_types() {\n\n $types = array_merge(medigroup_mikado_blog_grid_types(), medigroup_mikado_blog_full_width_types());\n\n return $types;\n\n }",
"public function bamobile_mobiconnector_add_type_to_posts_rest_api($query){\r\n $qv =& $query->query_vars;\r\n $listoptionscheckbox = get_option('mobiconnector_settings-post_type');\r\n $listoptionscheckbox = unserialize($listoptionscheckbox);\r\n if(!empty($listoptionscheckbox)){\r\n $post_type = '';\r\n foreach($listoptionscheckbox as $posttype => $value){ \r\n $name = str_replace('mobi-','',$posttype); \r\n if($value == 1){\r\n $post_type .= $name.',';\r\n }\r\n }\r\n $post_type = trim($post_type,',');\r\n $post_type = explode(',',$post_type);\r\n if(bamobile_mobiconnector_is_rest_posts() || bamobile_mobiconnector_is_rest_posts_detail()){\r\n $qv['post_type'] = $post_type;\r\n }\r\n }\r\n }",
"private function setOptions()\n\t{\n\t\t$this->site = ( isset($_POST['site']) ) ? sanitize_text_field($_POST['site']) : null;\n\t\t$this->feed_type = ( isset($_POST['type']) && $_POST['type'] !== 'search' ) ? sanitize_text_field($_POST['type']) : 'search';\n\t\t$this->post_id = ( isset($_POST['id']) ) ? sanitize_text_field($_POST['id']) : null;\n\t\t$this->feed_format = ( isset($_POST['format']) && $_POST['format'] !== 'unformatted' ) ? sanitize_text_field($_POST['format']) : 'unformatted';\n\t}",
"function hook_acquia_contenthub_field_type_mapping_alter(array &$mapping) {\n $mapping['my_custom_field'] = 'array<string>';\n}",
"function install_blog_defaults($blog_id, $user_id)\n {\n }",
"function changeDefaultPostLabel() {\n\t\tglobal $menu;\n\t\tglobal $submenu;\n\t\t$menu[5][0] = 'Stories';\n\t\t$submenu['edit.php'][5][0] = 'Stories';\n\t\t$submenu['edit.php'][10][0] = 'Add Stories';\n\t\t$submenu['edit.php'][16][0] = 'Stories Tags';\n\t}",
"function changeSettingsType()\n\t{\n\t\tinclude_once(\"./Services/Administration/classes/class.ilSetting.php\");\n\t\t$old_type = ilSetting::_getValueType();\n\n\t\tif ($old_type == \"clob\")\n\t\t{\n\t\t\t$longer_settings = ilSetting::_getLongerSettings();\n\t\t\tif (count($longer_settings))\n\t\t\t{\n\t $this->longer_settings = $longer_settings;\n ilUtil::sendFailure($this->lng->txt(\"settings_too_long\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t \t$changed = ilSetting::_changeValueType('text');\n\t }\n\t }\n\t\telse\n\t\t{\n\t $changed = ilSetting::_changeValueType('clob');\n\t }\n\n\t\tif ($changed)\n\t\t{\n\t\t\tilUtil::sendInfo($this->lng->txt(\"settings_type_changed\"));\n\t\t}\n\n\t\t$this->displayTools();\n\t}",
"public function addPostTypeSuport( $posttype=array()){\n\t\tif( is_array($posttype) ){\n\t\t\t$this->posttype = $posttype;\n\t\t}\n\t}",
"function dynamic_select_for_custom_blogs($choices, $args=array()) {\n\n\t// Here we grab the blogs using the arguments originated from the shortcode\n\t$get_custom_blogs = get_sites($args);\n\n\t// If we have blogs, proceed\n\tif ($get_custom_blogs) {\n //insert a blank option - this is a required field\n $choices['---'] = '';\n\t\t// Foreach found custom blog, we build the option using the [key] => [value] fashion\n\t\tforeach ($get_custom_blogs as $custom_blog) {\n\t\t\t\t$choices[$custom_blog->blogname] = $custom_blog->blogname;\n\t\t\t}\n\n\t// If we don't have blogs, halt! Lets use a generic not found option\n\t} else {\n\n\t\t// Just a generic option to inform nothing was found\n\t\t$choices['No blogs found'] = 'No blogs found';\n\n\t}\n\treturn $choices;\n}",
"public function register_settings(){\n\n\t\t// Register our option\n\t\tregister_setting( 'slack-post-types', 'slack-post-types', array( $this, 'sanitize' ) );\n\n\t\t// Add post post-type as default\n\t\tadd_option( 'slack-post-types', array( 'post' => 1 ) );\n\t}",
"function add_config_post_type() {\n\t\t\n\t\t$labels = array(\n 'name' => _x( 'Công trình', 'Post Type General Name'),\n 'singular_name' => _x( 'Công trình', 'Post Type Singular Name'),\n 'menu_name' => __( 'Công trình'),\n 'name_admin_bar' => __( 'Công trình'),\n 'archives' => __( 'Item Archives'),\n 'attributes' => __( 'Item Attributes'),\n 'parent_item_colon' => __( 'Parent Item:'),\n 'all_items' => __( 'Tất cả công trình'),\n 'add_new_item' => __( 'Add công trình'),\n 'add_new' => __( 'Thêm công trình'),\n 'new_item' => __( 'Thêm mới'),\n 'edit_item' => __( 'Chỉnh sửa'),\n 'update_item' => __( 'Cập nhật'),\n 'view_item' => __( 'View Item'),\n 'view_items' => __( 'View Items'),\n 'search_items' => __( 'Search Item'),\n 'not_found' => __( 'Not found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n 'featured_image' => __( 'Featured Image'),\n 'set_featured_image' => __( 'Set featured image'),\n 'remove_featured_image' => __( 'Remove featured image'),\n 'use_featured_image' => __( 'Use as featured image'),\n 'insert_into_item' => __( 'Insert into item'),\n 'uploaded_to_this_item' => __( 'Uploaded to this item'),\n 'items_list' => __( 'Bản ghi'),\n 'items_list_navigation' => __( 'Items list navigation'),\n 'filter_items_list' => __( 'Filter items list'),\n );\n $args = array(\n 'label' => __( 'Công trình'),\n 'description' => __( 'Công trình'),\n 'labels' => $labels,\n 'supports' => array( 'title','editor','revisions','thumbnail','author'),\n 'taxonomies' => array('category'),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'post',\n // 'rewrite' => array( 'slug' => 'danhsach' ),\n 'query_var' => true,\n 'menu_icon' => 'dashicons-admin-home'\n );\n register_post_type( 'estate', $args );\n \n }",
"function types_rename_build_in_post_types_menu() {\n\n $custom_types = get_option( WPCF_OPTION_NAME_CUSTOM_TYPES, array() );\n\n if ( !empty( $custom_types ) ) {\n global $menu, $submenu;\n\n foreach( $custom_types as $post_type => $data ) {\n if(\n isset( $data['_builtin'] )\n && $data['_builtin']\n && isset( $data['slug'] )\n && isset( $data['labels']['name'] )\n ) {\n // post\n if( $data['slug'] == 'post' ) {\n $post_edit_page = 'edit.php';\n $post_new_page = 'post-new.php';\n // page\n } elseif( $data['slug'] == 'page' ) {\n $post_edit_page = 'edit.php?post_type=page';\n $post_new_page = 'post-new.php?post_type=page';\n // attachment (Media)\n } elseif( $data['slug'] == 'attachment' ) {\n $post_edit_page = 'upload.php';\n $post_new_page = 'media-new.php';\n // abort\n } else {\n continue;\n }\n\n $post_menu_key = false;\n\n // find menu key\n $post_menu_key = types_get_array_key_search_in_sub( $menu, $post_edit_page );\n\n if( !$post_menu_key )\n continue;\n\n // change menu name\n $menu[$post_menu_key][0] = $data['labels']['name'];\n\n\n if( isset( $submenu[$post_edit_page] ) && $post_edit_page != 'upload.php' ) {\n $submenu_overview_key = $submenu_new_key = false;\n\n // post/page rename overview\n $submenu_overview_key = types_get_array_key_search_in_sub( $submenu[$post_edit_page], $post_edit_page );\n\n if( $submenu_overview_key )\n $submenu[$post_edit_page][$submenu_overview_key][0] = $data['labels']['name'];\n\n // post/page rename add new\n $submenu_new_key = types_get_array_key_search_in_sub( $submenu[$post_edit_page], $post_new_page );\n\n if( $submenu_new_key )\n $submenu[$post_edit_page][$submenu_new_key][0] = isset( $data['labels']['singular_name'] )\n ? 'Add ' . $data['labels']['singular_name']\n : 'Add ' . $data['labels']['name'];\n\n }\n }\n }\n }\n}",
"function post_options()\n\t{\n\t\tglobal $auth;\n\n\t\t$this->auth_bbcode = ($auth->acl_get('u_blogbbcode')) ? true : false;\n\t\t$this->auth_smilies = ($auth->acl_get('u_blogsmilies')) ? true : false;\n\t\t$this->auth_img = ($auth->acl_get('u_blogimg')) ? true : false;\n\t\t$this->auth_url = ($auth->acl_get('u_blogurl')) ? true : false;\n\t\t$this->auth_flash = ($auth->acl_get('u_blogflash')) ? true : false;\n\n\t\tblog_plugins::plugin_do('post_options');\n\t}",
"function jmt_category_and_tag_archives( $wp_query ) {\n\n$my_post_array = array('post','page');\n\nif ( $wp_query->get( 'category_name' ) || $wp_query->get( 'cat' ) )\n $wp_query->set( 'post_type', $my_post_array );\n\n if ( $wp_query->get( 'tag' ) )\n $wp_query->set( 'post_type', $my_post_array );\n\n}",
"function home_page_feature_listing( &$query){\r\n\tif(isset($_REQUEST['post_type']) && $_REQUEST['post_type'] !=''):\r\n\t\t$post_type= @$query->query_vars['post_type'];\r\n\telse:\r\n\t\t$post_type='';\r\n\tendif;\r\n\tif(is_home() || @is_front_page() || (get_option('show_on_front') == 'posts' && (!is_archive() && !is_single() && !is_page() && !is_tax()) )){\r\n\t\t$tmpdata = get_option('templatic_settings');\r\n\t\t$home_listing_type_value = @$tmpdata['home_listing_type_value'];\r\n\t\tif(!empty($home_listing_type_value)){\r\n\t\t\t$attach = array('attachment');\r\n\t\t\tif(is_array($home_listing_type_value))\r\n\t\t\t\t$merge = array_merge($home_listing_type_value,$attach);\r\n\t\t\t\t\r\n\t\t\tif($post_type=='booking_custom_field'):\r\n\t\t\t\t$query->set('post_type',$post_type); /* set custom field post type*/\r\n\t\t\telse:\r\n\t\t\t\t$query->set('post_type', @$merge); /* set post type events */\r\n\t\t\tendif;\r\n\t\t}\r\n\t\t$query->set('post_status',array('publish')); /* set post type events */\r\n\t}else{\r\n\t\tremove_action('pre_get_posts', 'home_page_feature_listing');\r\n\t}\r\n}",
"function tower_custom_post_types() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n register_post_type($key, $custom_type['config']);\n }\n}",
"function register_post_types(){\n }",
"protected function AssignPageTypeFields() {\n $this->AddField('showmap', self::DT_BOOLEAN, true);\n $this->AddField('mapaddress', self::DT_STRING);\n }",
"function jeherve_add_cpt_sitemaps( $post_types )\n{\n $post_types[] = 'pressreleases';\n return $post_types;\n}",
"protected function setPostType($model = null) {\n if (isset($model))\n $model->post_type = Posting::POST_TYPE_UNKNOWN;\n }",
"function sec_site_options(){\n\t\t$options_array = array(\n\t\t\tarray(\n\t\t\t\t'type' \t=> \t'multi',\n\t\t\t\t'col'\t=> 1,\n\t\t\t\t'title' => __( 'Post Type Settings', 'pagelines' ),\n\t\t\t\t'opts'\t=> array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key'\t=>\t'disable_public_pt',\n\t\t\t\t\t\t'type'\t=> 'check',\n\t\t\t\t\t\t'label'\t=> __( 'Set Projects Post Type to Private.', 'pagelines' ),\n\t\t\t\t\t\t'help'\t=> __( 'Disable Single Project Post view.', 'pagelines' ),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\treturn $options_array;\n\t}",
"function my_module_post_update_subtype_field() {\n $eq = \\Drupal::entityQuery('node');\n $nids = $eq->condition('type', 'org_page')->execute();\n /** @var Drupal\\node\\Entity\\Node[] $nodes */\n $nodes = Node::loadMultiple($nids);\n foreach ($nodes as $node) {\n $node->field_new->setValue('A Default Value');\n $node->save();\n }\n}",
"function farmhouse_post_type_support() {\n\n $post_type_supports = genesis_get_config( 'post-type-supports' );\n\n foreach ( $post_type_supports as $post_type => $args ) {\n add_post_type_support( $post_type, $args );\n }\n\n}",
"public function setDefaultTypeData(){\n if(\n is_object($this->source) &&\n is_object($this->target)\n ){\n if(\n $this->source->isAbyss() ||\n $this->target->isAbyss()\n ){\n $this->scope = 'abyssal';\n $this->type = ['abyssal'];\n }else{\n $routeController = new Route();\n $route = $routeController->searchRoute($this->source->systemId, $this->target->systemId, 1);\n\n if($route['routePossible']){\n $this->scope = 'stargate';\n $this->type = ['stargate'];\n }else{\n $this->scope = 'wh';\n $this->type = ['wh_fresh'];\n }\n }\n }\n }",
"public function generate_post_type() {\n\t\t$doc_types = get_option( 'ibx_docs_type' );\n\t\t$doc_types = maybe_unserialize( $doc_types );\n\n\t\tif ( empty( $doc_types ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$count = 1;\n\n\t\tforeach ( $doc_types as $option ) {\n\t\t\t$labels = array(\n\t\t\t\t'name' => _x( $option['title'], 'Post type general name', 'plugintest' ),\n\t\t\t\t'singular_name' => _x( $option['title'], 'Post type singular name', 'plugintest' ),\n\t\t\t);\n\n\t\t\t$args = array(\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'public' => true,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'query_var' => true,\n\t\t\t\t'rewrite' => array( 'slug' => $option['slug'] ),\n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'has_archive' => true,\n\t\t\t);\n\n\t\t\tregister_post_type( $option['slug'], $args );\n\t\t\t// add_rewrite_rule( '^docs/' . $option['slug'] . '/([^/]+)/?$', 'index.php?post_type=' . $option['slug'] . '&name=$matches[1]', 'top' );\n\t\t\t//add_rewrite_rule( '^docs/' . $option['slug'], 'index.php?post_type=' . $option['slug'], 'top' );\n\t\t\tadd_rewrite_rule( 'ibx/' . $option['slug'] . '/(.*)/?$', 'index.php?' . $option['slug'] . '=$matches[1]', 'top' );\n\t\t\tadd_rewrite_rule( 'ibx/' . $option['slug'], 'index.php?post_type=' . $option['slug'], 'top' );\n\n\t\t\t$category_labels = array(\n\t\t\t\t'name' => esc_html__( 'Categories', 'plugintest' ),\n\t\t\t\t'singular_name' => esc_html__( 'Category', 'plugintest' ),\n\t\t\t);\n\n\t\t\t$category_args = array(\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'public' => true,\n\t\t\t\t'labels' => $category_labels,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_admin_column' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'rewrite' => array( 'slug' => 'category-' . $count ),\n\t\t\t);\n\n\t\t\tregister_taxonomy( 'cat-' . $option['slug'], $option['slug'], $category_args );\n\t\t\tadd_rewrite_rule( 'ibx/cat-' . $option['slug'] . '/(.*)/?$', 'index.php?cat-' . $option['slug'] . '=$matches[1]', 'top' );\n\n\t\t\t$count++;\n\t\t}\n\t\tflush_rewrite_rules();\n\t}",
"function register_post_types(){\n }",
"function carbon_register_post_types(){\n\n // carbon_register_post_type(array(\n // 'singular' => 'Type', // required\n // 'plural' => 'Types', // required\n // 'type' => 'type', // required\n // 'slug' => 'types/type',\n // 'menu_icon' => 'dashicons-admin-post',\n // 'has_archive' => true,\n // 'exclude_from_search' => true,\n // ));\n }",
"public static function register_post_types() {}",
"function admin_bar_change_type_label() {\n global $wp_admin_bar;\n global $post;\n\n // Removes Options that aren't needed anymore\n $wp_admin_bar->remove_menu('customize');\n $wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('comments');\n\n // Remove WordPress Menu Items.\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('wp-logo-external');\n $wp_admin_bar->remove_menu('about');\n $wp_admin_bar->remove_menu('wporg');\n $wp_admin_bar->remove_menu('documentation');\n $wp_admin_bar->remove_menu('support-forums');\n $wp_admin_bar->remove_menu('feedback');\n\n if (!isset($post->post_type)) {\n return;\n }\n\n $type = str_replace('-', ' ', $post->post_type);\n $change_edit = $wp_admin_bar->get_node('edit');\n $change_view = $wp_admin_bar->get_node('view');\n if ($change_edit !== NULL) {\n $change_edit->title = __('Edit ' . ucwords($type), 'bramble');\n $wp_admin_bar->add_node($change_edit);\n }\n elseif ($change_view !== NULL) {\n $change_view->title = __('View ' . ucwords($type), 'bramble');\n $wp_admin_bar->add_node($change_view);\n }\n\n}",
"function mfn_news_post_type()\n{\n mfn_register_types();\n}",
"function blog() {\n\n\t$labels = array(\n\t\t'name' => _x( 'blogs', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'blog', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'blog', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Item', 'text_domain' ),\n\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t'featured_image' => __( 'Featured Image', 'text_domain' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'blog', 'text_domain' ),\n\t\t'description' => __( 'Post Type Description', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'blog', $args );\n\n}",
"function edc_campos_blog() {\n $prefix = 'edc_blog_';\n \n\t$id_blog = get_option('page_for_posts');\n\t\n\t$edc_campos_blog = new_cmb2_box( array(\n\t\t'id' => $prefix . 'blog',\n\t\t'title' => esc_html__( 'Campos Blog', 'cmb2' ),\n\t\t'object_types' => array( 'page' ), // Post type\n\t\t'context' => 'normal',\n\t\t'priority' => 'high',\n\t\t'show_names' => true, // Show field names on the left\n\t\t'show_on' => array(\n\t\t\t'id' => array( $id_blog ),\n\t\t), // Specific post IDs to display this metabox\n\t) );\n\t\n\t$edc_campos_blog->add_field( array(\n\t\t'name' => esc_html__( 'Slogan Blog', 'cmb2' ),\n\t\t'desc' => esc_html__( 'Añada una descripción a la página web', 'cmb2' ),\n\t\t'id' => $prefix . 'slogan_blog',\n\t\t'type' => 'text',\n\t) );\n}",
"function db099_lifterlms_add_post_types($post_types) {\r\n\tif (in_array('course', get_post_types())) {\r\n\t\t$post_types[] = 'course';\r\n\t} \r\n\treturn $post_types;\r\n}",
"function ntp_blogpost_dynamic_class($c) {\n if ( is_single() && get_post_type() !== 'ntp_project' ) {\n $c[] = 'blog-post';\n }\n return $c;\n}",
"function thirdtheme_blog_slider()\n {\n add_theme_support('post-thumbnails');\n add_image_size('small',102,102);\n $args = array(\n 'labels' => array('name' =>__('blog slider'),\n 'add_new' =>__('add new blog')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-buddicons-buddypress-logo',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor','thumbnail',)); \n register_post_type('blogslider',$args);\n }",
"function voyage_mikado_post_info($config, $blog_type = '') {\n $default_config = array(\n 'date' => '',\n 'category' => '',\n 'author' => '',\n 'comments' => '',\n 'like' => '',\n 'share' => '',\n 'show_comments_label' => false\n );\n\n extract(shortcode_atts($default_config, $config));\n $params['blog_type'] = $blog_type;\n\n if($date == 'yes') {\n voyage_mikado_get_module_template_part('templates/parts/post-info-date', 'blog');\n }\n\n if($like == 'yes') {\n voyage_mikado_get_module_template_part('templates/parts/post-info-like', 'blog');\n }\n\n if($comments == 'yes') {\n voyage_mikado_get_module_template_part('templates/parts/post-info-comments', 'blog', '', array('show_comments_label' => $show_comments_label));\n }\n\n if($category == 'yes') {\n voyage_mikado_get_module_template_part('templates/parts/post-info-category', 'blog');\n }\n if($author == 'yes') {\n voyage_mikado_get_module_template_part('templates/parts/post-info-author', 'blog');\n }\n\n if($share == 'yes') {\n voyage_mikado_get_module_template_part('templates/parts/post-info-share', 'blog');\n }\n }",
"public function static_content_settings( $position, $form_id ) {\n if ( $position == 250 ) {\n ?>\n <li class=\"post_type_setting field_setting\">\n <label for=\"post_type_setting\" class=\"section_label\">\n <?php esc_html_e( 'Post Type', 'gfstaticcontentaddon' ); ?>\n <?php gform_tooltip( 'post_type_setting' ) ?>\n </label>\n <select id=\"post_type_setting\" class=\"fieldwidth-3\" onchange=\"SetPostTypeSetting(jQuery(this).val());\">\n <option value=\"\"></option>\n <option value=\"page\">Page</option>\n <?php\n/* $args = [\n 'public' => true,\n ];\n\n $post_types = get_post_types( $args, 'objects' );\n foreach ( $post_types as $post_type_obj ):\n $labels = get_post_type_labels( $post_type_obj );\n */?><!--\n <option value=\"<?php /*echo esc_attr( $post_type_obj->name ); */?>\"><?php /*echo esc_html( $labels->name ); */?></option>\n --><?php /*endforeach; */?>\n </select>\n </li>\n <li class=\"post_id_setting field_setting\">\n <label for=\"post_id_setting\" class=\"section_label\">\n <?php esc_html_e( 'Post ID', 'gfstaticcontentaddon' ); ?>\n <?php gform_tooltip( 'post_id_setting' ) ?>\n </label>\n <select id=\"post_id_setting\" class=\"fieldwidth-3\" onchange=\"SetPostIdSetting(jQuery(this).val());\">\n <option value=\"\"></option>\n <?php\n $pages = get_pages();\n foreach ( $pages as $page ) {\n $option = '<option value=\"' . $page->ID . '\">';\n $option .= $page->post_title;\n $option .= '</option>';\n echo $option;\n }\n ?>\n </select>\n </li>\n <?php\n }\n }",
"function medigroup_mikado_get_blog($type) {\n\n $sidebar = medigroup_mikado_sidebar_layout();\n\n $params = array(\n \"blog_type\" => $type,\n \"sidebar\" => $sidebar\n );\n medigroup_mikado_get_module_template_part('templates/lists/holder', 'blog', '', $params);\n }",
"function voyage_mikado_get_blog($type) {\n\n $sidebar = voyage_mikado_sidebar_layout();\n\n $params = array(\n \"blog_type\" => $type,\n \"sidebar\" => $sidebar\n );\n voyage_mikado_get_module_template_part('templates/lists/holder', 'blog', '', $params);\n }",
"function alter_types_menu_location($args, $post_type) {\n $skip = [\n 'acf-field',\n 'acf-field-group',\n 'attachment',\n 'custom_css',\n 'customize_changeset',\n 'elementor_library',\n 'media',\n 'nav_menu_item',\n 'oembed_cache',\n 'product',\n 'product_variation',\n 'revision',\n 'scheduled-action',\n 'shop_coupon',\n 'shop_order',\n 'shop_order_refund',\n 'user_request',\n 'wp_block',\n ];\n\n // Skip this as we don't want them in our menu.\n if (in_array($post_type, $skip)) {\n return $args;\n }\n\n // Changes the titles as it will render the secondary all items.\n if (isset($args[\"labels\"]) && is_array($args[\"labels\"])) {\n $name = isset($args[\"labels\"][\"name\"]) ? $args[\"labels\"][\"name\"] : $args[\"labels\"][\"name_admin_bar\"];\n $menu[\"labels\"][\"name\"] = $name;\n }\n\n // Change which menu.\n $menu['show_in_menu'] = 'content';\n\n // Slap it together.\n return array_merge($args, $menu);\n\n}",
"public static function cpt_init() {\n\t\tforeach ( self::$types as $type ) {\n\t\t\tself::evo_custom_post_type( $type['type'] );\n\t\t}\n\t}",
"function add_custom_post_type_to_the_loop( $query ) {\n\tif ($query->is_home() && $query->is_main_query() ) {\n //$query->set('post_type', array('post', 'kopparpannan-whisky', 'kopparpannan-event'));\n $query->set('post_type', array('post', 'kopparpannan-event'));\n\t}\n}",
"protected function comment_type_dropdown($comment_type)\n {\n }",
"function change_post_menu_label() {\n global $menu;\n $menu[5][0] = 'Blog';\n echo '';\n}",
"function update_blog_option($id, $option, $value, $deprecated = \\null)\n {\n }",
"function register_post_types() {\n\t}",
"function register_post_types() {\n\t}",
"private static function _initializeTypes()\n {\n\n $db = DataAccess::getInstance();\n $category = self::getActiveCategory();\n\n $fields = geoFields::getInstance(0, $category);\n\n $sql = \"SELECT * FROM \" . geoTables::browsing_filters_settings . \" WHERE `category` = ? AND `enabled` = 1\";\n $settings = $db->Execute($sql, array($category));\n\n while ($settings && $target = $settings->FetchRow()) {\n $name = $target['field'];\n $type = 0; //be sure to reset $type to 0 each time, to prevent bleeding\n if (strpos($name, 'optional_field_') === 0) {\n //this is an optional field\n\n if (!$fields->$name->is_enabled) {\n //field not enabled. do not set!\n continue;\n }\n $optional_type = $fields->$name->field_type;\n if ($optional_type === 'number' || $optional_type === 'cost') {\n $type = self::RANGE;\n } elseif ($optional_type === 'textarea' || $optional_type === 'text') {\n $type = self::SCALAR;\n } elseif ($optional_type === 'date') {\n $type = self::DATE_RANGE;\n } elseif ($optional_type === 'dropdown') {\n $type = self::PICKABLE;\n }\n } elseif (strpos($name, 'cs_') === 0) {\n //this is a cat-spec question\n $question_id = substr($name, 3);\n $cs_type = $db->GetOne(\"SELECT `choices` FROM \" . geoTables::questions_table . \" WHERE `question_id` = ?\", array($question_id));\n if (is_numeric($cs_type) || $cs_type === 'none') {\n $type = self::PICKABLE;\n } elseif ($cs_type === 'check') {\n $type = self::BOOL;\n } elseif ($cs_type === 'number') {\n $type = self::RANGE;\n } elseif ($cs_type === 'date') {\n $type = self::DATE_RANGE;\n } else {\n //not a valid question, or no longer active? do not set.\n continue;\n }\n } elseif (strpos($name, 'leveled_') === 0) {\n //leveled field\n $type = self::PICKABLE;\n }\n if ($type) {\n self::$_types[$name] = $type;\n } else {\n //These aren't the droids you're looking for. You can go about your business. Move along.\n //(Didn't find a dynamic type, which means this field is either statically-typed in the declaration of self::$_types or doesn't exist)\n }\n }\n\n self::$_typesInitialized = true;\n }",
"public static function meta_box_enhance_list_post($posttype) {\n $optionpost = null;\n $optionpost[-1] = \"[ empty field here ]\";\n $items = get_posts(array('post_type' => $posttype, 'posts_per_page' => -1, 'post_status' => 'publish'));\n foreach ($items as $item) {\n $optionpost[$item -> ID] = $item -> ID . \" - \" . $item -> post_title;\n }\n return $optionpost;\n }",
"public function add_options() {\n\t\t$types = get_option( 'ibx_docs_type' );\n\t\tif ( ! empty( $types ) ) {\n\t\t\t$docs_option = maybe_unserialize( $types );\n\t\t} else {\n\t\t\t$docs_option = array();\n\t\t}\n\n\t\tif (\n\t\t\t! isset( $_POST['docs_generate_nonce'] )\n\t\t\t|| ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['docs_generate_nonce'] ) ), 'docs__form_save' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_title = '';\n\t\t$post_slug = '';\n\t\t// process form data.\n\t\tif ( isset( $_POST['title'] ) ) {\n\t\t\t$post_title = sanitize_text_field( wp_unslash( $_POST['title'] ) );\n\t\t\tif ( isset( $_POST['slug'] ) && ! empty( $_POST['slug'] ) ) {\n\t\t\t\t$post_slug = sanitize_text_field( wp_unslash( $_POST['slug'] ) );\n\t\t\t} else {\n\t\t\t\t$post_slug = sanitize_title_with_dashes( $post_title );\n\t\t\t}\n\t\t}\n\n\t\t$docs_option[ $post_slug ] = array(\n\t\t\t'title' => $post_title,\n\t\t\t'slug' => $post_slug,\n\t\t);\n\n\t\tupdate_option( 'ibx_docs_type', maybe_serialize( $docs_option ) );\n\t}",
"function TS_VCSC_RemoveMetaBoxesPostTypeGlobal() {\r\n\t\t\tforeach ($this->TS_VCSC_PostTypeMenuNames_Default as $key => $value) {\r\n\t\t\t\tif (post_type_exists($key)) {\r\n\t\t\t\t\t$this->TS_VCSC_RemoveMetaBoxesPostTypeSingle($key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public function create_post_types() {\n }",
"function medigroup_mikado_post_info($config, $blog_type = '') {\n $default_config = array(\n 'date' => '',\n 'category' => '',\n 'author' => '',\n 'comments' => '',\n 'like' => '',\n 'share' => ''\n );\n\n extract(shortcode_atts($default_config, $config));\n $params['blog_type'] = $blog_type;\n\n if($author == 'yes') {\n medigroup_mikado_get_module_template_part('templates/parts/post-info-author', 'blog');\n }\n if($date == 'yes') {\n medigroup_mikado_get_module_template_part('templates/parts/post-info-date', 'blog');\n }\n\n if($like == 'yes') {\n medigroup_mikado_get_module_template_part('templates/parts/post-info-like', 'blog');\n }\n\n if($comments == 'yes' && comments_open()) {\n medigroup_mikado_get_module_template_part('templates/parts/post-info-comments', 'blog');\n }\n\n if($category == 'yes') {\n medigroup_mikado_get_module_template_part('templates/parts/post-info-category', 'blog');\n }\n\n if($share == 'yes') {\n medigroup_mikado_get_module_template_part('templates/parts/post-info-share', 'blog');\n }\n }",
"function jeg_post_columns($columns)\n{\n\t$columns['posttype'] = 'Blog Post Type';\n\treturn $columns;\n}",
"function siteorigin_panels_options_field_post_types( $panels_post_types ){\n\t$all_post_types = array_values( array_merge( array( 'page' => 'page', 'post' => 'post' ), get_post_types( array( '_builtin' => false ) ) ) );\n\n\t// These are post types we know we don't want to show\n\t$all_post_types = array_diff($all_post_types, array(\n\t\t// Meta Slider\n\t\t'ml-slider'\n\t) );\n\n\tforeach($all_post_types as $type){\n\t\t$info = get_post_type_object($type);\n\t\tif(empty($info->labels->name)) continue;\n\t\t$checked = in_array(\n\t\t\t$type,\n\t\t\t$panels_post_types\n\t\t);\n\n\t\t?>\n\t\t<label>\n\t\t\t<input type=\"checkbox\" name=\"siteorigin_panels_post_types[<?php echo esc_attr($type) ?>]\" <?php checked($checked) ?> />\n\t\t\t<?php echo esc_html($info->labels->name) ?>\n\t\t</label><br/>\n\t\t<?php\n\t}\n\n\t?><p class=\"description\">Post types that will have the page builder available</p><?php\n}",
"function maker_4ym_change_post_object_label() {\n global $wp_post_types;\n\n $labels = &$wp_post_types['post']->labels;\n $labels->name = 'Blog';\n $labels->singular_name = 'Artículos del Blog';\n $labels->add_new = 'Agregar un nuevo artículo';\n $labels->add_new_item = 'Escribir un nuevo artículo';\n $labels->edit_item = 'Editar un artículo';\n $labels->new_item = 'Nuevo artículo';\n $labels->view_item = 'Ver artículo';\n $labels->search_items = 'Buscar artículos';\n $labels->not_found = 'ningún artículo coincide con tu búsqueda';\n $labels->not_found_in_trash = 'ningún artículo en la papelera coincide con la búsqueda';\n}",
"public function add_blog_option() {\n global $json_api;\n\n $this->_verify_admin();\n $this->_verify_nonce('add_blog_option');\n\n extract($_REQUEST);\n\n if(!isset($blog_id))\n $json_api->error(__(\"You must send the 'blog_id' parameter.\"));\n\n if(!isset($key))\n $json_api->error(__(\"You must send the 'key' parameter.\"));\n\n if(!isset($value))\n $json_api->error(__(\"You must send the 'value' parameter.\"));\n\n add_blog_option( $blog_id, $key, $value );\n\n return array( \"message\" => __(\"You successfully added a blog option.\") );\n }",
"function update_options() {\n\t\tif ( get_current_blog_id() !== $this->options_blog_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tupdate_option( $this->option_name, $this->options );\n\t}",
"public function set_type( $type ) {\n\t\t$this->set_prop( 'type', sanitize_title( $type ) ) ;\n\t}",
"function register_post_types()\n {\n }",
"function get_post_types() {\n\tglobal $rf_custom_posts;\n\n\t$post = new PostType();\n\t$cpts = $post->get_admin_post_pages();\n\n\t$cpts = array_merge($cpts, $rf_custom_posts);\n\t$cpts = apply_filters(\"admin/post_types\", $cpts);\n\n\treturn $cpts;\n}",
"function myfeed_request_2($qv) {\r\n\tif (isset($qv['feed']))\r\n\t\t$qv['post_type'] = get_post_types();\r\n\treturn $qv;\r\n}",
"function myfeed_request_2($qv) {\r\n\tif (isset($qv['feed']))\r\n\t\t$qv['post_type'] = get_post_types();\r\n\treturn $qv;\r\n}",
"public function init_post_type_options() {\n\t\t// Grab the $_POST and append to it as needed\n\t\tif ( isset($_POST['data']) && ! isset($this->params['data']) ) {\n\t\t\t$this->params['data'] = $_POST['data'];\n\t\t}\n\n\t\t$post_type = $this->params['post_type'];\n\t\tif ( empty($post_type) || is_array($post_type) )\n\t\t\treturn false;\n\n\t\t$post_type_name = str_replace(array('%20',' ','-'), \"_\", $post_type);\n\t\t$prefix = '_kickpress_'.$post_type_name.'_';\n\n\t\t//$admin_options = kickpress_get_admin_options();\n\t\t$post_type_options = $this->get_post_type_options();\n\t\t$post_type_options = $this->set_post_type_options($post_type_options);\n\n\t\t$validateFirst = 0;\n\n\t\t// Set the defualt params for crud if params are null\n\t\tif ( ! isset($this->params['id']) )\n\t\t\t$post_id = 0;\n\t\telse\n\t\t\t$post_id = $this->params['id'];\n\n\t\t// Check that data is not a JSON string, a la import-comments\n\t\tif ( !empty( $this->params['data'] ) && is_array( $this->params['data'] ) ) {\n\t\t\t$custom_fields = $this->get_custom_fields();\n\t\t\tforeach ( $custom_fields as $field_name => $custom_fields ) {\n\t\t\t\t// TODO: add incoming data values to the tables array\n\t\t\t\t// Shortcut the complex data array from incoming forms and pass it into the universal params array\n\n\t\t\t\tif ( isset( $this->params['data'][$post_type][$post_id] ) ) {\n\t\t\t\t\t$formdata = $this->params['data'][$post_type][$post_id];\n\t\t\t\t\t$this->params = array_merge($formdata, $this->params);\n\t\t\t\t}\n\n\t\t\t\tif ( ! $validateFirst++ ) {\n\t\t\t\t\tif ( ! isset($this->params['categories_toolbar']) )\n\t\t\t\t\t\t$this->params['categories_toolbar'] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( isset($post_type) ) {\n\t\t\trequire_once(WP_PLUGIN_DIR.'/kickpress/kickpress-validation.php');\n\t\t\t$this->validation = new validation($this->params, $post_id);\n\t\t}\n\n\t\t$post_type = $this->params['post_type'];\n\t\t$taxonomies = get_object_taxonomies( $post_type, 'objects' );\n\n\t\tforeach ( $taxonomies as $taxonomy ) {\n\t\t\tif ( ! $taxonomy->_builtin ) {\n\t\t\t\t$this->add_view_alias( 'tax', $taxonomy->name );\n\t\t\t}\n\t\t}\n\t}",
"function wp_set_post_cats($blogid = '1', $post_id = 0, $post_categories = array())\n {\n }",
"function tfuse_set_page_option($option_name, $value, $post_id = null) {\r\n global $post, $tfuse_options;\r\n $max_cache_size = 100;\r\n \r\n if (!isset($post_id) && isset($post))\r\n $post_id = $post->ID;\r\n if (!isset($post_id))\r\n return;\r\n \r\n // optiunile sunt slavate cu PREFIX in fata, dar extragem scrim fara PREFIX\r\n // pentru a obtine PREFIX_logo vom folosi tfuse_page_options('logo')\r\n $option_name = TF_THEME_PREFIX .'_'. $option_name;\r\n \r\n if (!isset($tfuse_options['post'][$post_id])) {\r\n if (!empty($tfuse_options['post']) && count($tfuse_options['post']) > $max_cache_size) // if cache limit exceeded, remove first element from cache\r\n array_shift($tfuse_options['post']);\r\n \r\n $tfuse_options['post'][$post_id] = decode_tfuse_options( get_post_meta($post_id, TF_THEME_PREFIX .'_tfuse_post_options', true) );\r\n }\r\n \r\n $tfuse_options['post'][$post_id][$option_name] = $value;\r\n \r\n tf_update_post_meta($post_id, TF_THEME_PREFIX .'_tfuse_post_options', encode_tfuse_options($tfuse_options['post'][$post_id]));\r\n }",
"function any_ptype_on_tag($request) {\n if ( isset($request['tag']) )\n $request['post_type'] = 'any';\n\n return $request;\n}",
"function nxt_posts_p_add_options(){\n\n\tadd_option( 'nxt_post_option_template_select', 'themes/theme_1.php');\n\tadd_option( 'nxt_post_plugin_enable');\n}"
] | [
"0.6528503",
"0.64273787",
"0.63894147",
"0.6312209",
"0.6174946",
"0.60502565",
"0.60122246",
"0.5982524",
"0.59763217",
"0.59639895",
"0.59012985",
"0.5872082",
"0.58705795",
"0.58605427",
"0.57956904",
"0.5679251",
"0.5645632",
"0.56443226",
"0.5592031",
"0.55707026",
"0.5558981",
"0.55412817",
"0.5533957",
"0.55334955",
"0.5532299",
"0.5523497",
"0.5519033",
"0.5514237",
"0.5506318",
"0.54803056",
"0.5467626",
"0.5458067",
"0.5456708",
"0.5430931",
"0.54231083",
"0.53930426",
"0.53484565",
"0.53468585",
"0.53320545",
"0.53294",
"0.5320952",
"0.5319594",
"0.53076786",
"0.52961576",
"0.5294996",
"0.5273554",
"0.5266703",
"0.5263142",
"0.5262133",
"0.52609926",
"0.5259413",
"0.5255999",
"0.5252888",
"0.52498996",
"0.5249513",
"0.5247895",
"0.523841",
"0.52381283",
"0.5234268",
"0.5233672",
"0.5221423",
"0.52203685",
"0.52186614",
"0.52163756",
"0.5212813",
"0.519593",
"0.5191968",
"0.51897687",
"0.51777387",
"0.5177085",
"0.5172016",
"0.516916",
"0.5164577",
"0.51626384",
"0.51615334",
"0.51564187",
"0.5154311",
"0.5152267",
"0.5151113",
"0.5151113",
"0.51488453",
"0.5142676",
"0.5140783",
"0.5135619",
"0.5129872",
"0.5129237",
"0.5127505",
"0.5125588",
"0.5123356",
"0.512205",
"0.51103586",
"0.5107123",
"0.5097193",
"0.5096522",
"0.50961655",
"0.50961655",
"0.5095779",
"0.50926816",
"0.50924385",
"0.5091519",
"0.5090765"
] | 0.0 | -1 |
abcd1234...4321dcba // Colorize: green Colorize: green Colorize: green Colorize: green | function db_connect() // Colorize: green
{ // Colorize: green
$link = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // Colorize: green
// Colorize: green
if ($link->connect_error) // Colorize: green
{ // Colorize: green
error_log("Failed to connect to MariaDB server. Error: " . $link->connect_error); // Colorize: green
// Colorize: green
return null; // Colorize: green
} // Colorize: green
// Colorize: green
return $link; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public static function hash()\r\n {\r\n return sprintf(\"%s[#]%s \", Color::GRN, Color::END);\r\n }",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function green($text): string;",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"public function getColor(): string;",
"public function colour();",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"function randColor() {\n $chars = 'ABCDEF0123456789';\n $color = '#';\n \n //this will loop through the characters 6 times, creating a 6 character length variable\n for ( $i = 0; $i < 6; $i++ ) {\n $color .= $chars[rand(0, strlen($chars) - 1)];\n }\n //variable that returns a hex color code\n return $color;\n }",
"function vColor( $color )\r\n\t\t{\r\n\t\t\t#CCC\r\n\t\t\t#CCCCC\r\n\t\t\t#FFFFF\r\n\t\t\treturn preg_match( '/^#(?:(?:[a-f0-9]{3}){1,2})$/i', $color );\r\n\t\t\t\r\n\t\t}",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function random_string($length, $keyspace = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") // Colorize: green\n { // Colorize: green\n $res = \"\"; // Colorize: green\n // Colorize: green\n $max = strlen($keyspace) - 1; // Colorize: green\n // Colorize: green\n for ($i = 0; $i < $length; ++$i) // Colorize: green\n { // Colorize: green\n $res .= $keyspace[random_int(0, $max)]; // Colorize: green\n } // Colorize: green\n // Colorize: green\n return $res; // Colorize: green\n }",
"public function yellow($text): string;",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function color(array $color);",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function colors(int $key = 6):string\n{\n\n $colors = [\n 'success', 'warning', 'primary', 'info', 'brand', 'danger'\n ];\n if (!isset($colors[$key])) {\n $key = $key % count($colors);\n }\n return $colors[$key];\n}",
"public function color()\n {\n }",
"function maybe_hash_hex_color($color)\n {\n }",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function random_color_part() {\n return str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT);\n}",
"public function getColor(): string\n {\n }",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function testToHexWithSpaceSeparatedParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toHex('iv o ry') == 'FFFFF0');\n unset($colors);\n }",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"function getColor($color_count){\n //again\n $color_array = array(\"#4B0082\", \"#3F6826\", \"#38B0DE\", \"#330000\", \"#55141C\", \"#5EDA9E\", \"#660000\", \"#6959CD\", \"#7B3F00\", \"#800000\");\n $new_count = $color_count % 10 ;\n return $color_array[$new_count];\n}",
"public function blue($text): string;",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"private static function getYellowString($string)\n {\n return \"\\e[1;33m \".$string.\"\\e[0m \";\n }",
"function carton_hex_lighter( $color, $factor = 30 ) {\n\t\t$base = carton_rgb_from_hex( $color );\n\t\t$color = '#';\n\n\t foreach ($base as $k => $v) :\n\t $amount = 255 - $v;\n\t $amount = $amount / 100;\n\t $amount = round($amount * $factor);\n\t $new_decimal = $v + $amount;\n\n\t $new_hex_component = dechex($new_decimal);\n\t if(strlen($new_hex_component) < 2) :\n\t \t$new_hex_component = \"0\".$new_hex_component;\n\t endif;\n\t $color .= $new_hex_component;\n\t \tendforeach;\n\n\t \treturn $color;\n\t}",
"function sanitize_hex_color($color)\n {\n }",
"function carton_hex_darker( $color, $factor = 30 ) {\n\t\t$base = carton_rgb_from_hex( $color );\n\t\t$color = '#';\n\n\t\tforeach ($base as $k => $v) :\n\t $amount = $v / 100;\n\t $amount = round($amount * $factor);\n\t $new_decimal = $v - $amount;\n\n\t $new_hex_component = dechex($new_decimal);\n\t if(strlen($new_hex_component) < 2) :\n\t \t$new_hex_component = \"0\".$new_hex_component;\n\t endif;\n\t $color .= $new_hex_component;\n\t\tendforeach;\n\n\t\treturn $color;\n\t}",
"protected function replaceColors($str): string {\n return preg_replace('@#([A-F0-9]{6}|[A-F0-9]{3})@ui', '#\\\\1<span class=\"color\" style=\"background:\\\\0\"></span>', $str);\n }",
"public function howToColor($color)\n {\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"function random_color_part() {\n\t\treturn str_pad( dechex( mt_rand( 0, 255 ) ), 2, '0', STR_PAD_LEFT);\n\t}",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"public function red($text): string;",
"public static function random_color()\n {\n mt_srand((double) microtime()*1000000);\n $c = '';\n while (strlen($c)<6) {\n $c .= sprintf(\"%02X\", mt_rand(0, 255));\n }\n return $c;\n }",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"public function green($str)\n {\n return \"\\033[0;32m$str\\033[0m\";\n }",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function callback_color($args)\n {\n }",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function random_color() {\n\t\treturn random_color_part() . random_color_part() . random_color_part();\n\t}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"function trafficLightColor($string, $value, $lo, $hi) {\n $fvalue = floatval($value);\n $cmp = verifyTest($fvalue, $lo, $hi);\n if ($cmp == 0) { #(!$lo or $fvalue >= $lo) and (!$hi or $fvalue <=$hi)) {\n $colorout = \"<font color=\\\"#999900\\\">$string</font>\";\n } elseif ($cmp < 0) { #$lo and $fvalue < $lo) {\n $colorout = \"<font color=\\\"#00aa00\\\">$string</font>\";\n } elseif ($cmp > 0) { #$hi and $fvalue > $hi) {\n $colorout = \"<font color=\\\"#880000\\\">$string</font>\";\n } else {\n $colorout = \"$string\";\n }\n return $colorout;\n}",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColor() {\n\t}",
"public function color()\n {\n $color = $this->customer->color;\n\n $r = substr($color, 1, 2);\n $g = substr($color, 3, 2);\n $b = substr($color, 5, 2);\n $luma = (float)0.2126 * hexdec($r)\n + 0.7152 * hexdec($g)\n + 0.0722 * hexdec($b);\n\n return ['color' => $this->customer->color, 'luma' => $luma];\n }",
"function rest_parse_hex_color($color)\n {\n }",
"function sanitize_hex_color_no_hash($color)\n {\n }",
"function randColorCode() {\n return '#' . str_pad(dechex(mt_rand(0, 0xFFFFFF)), 6, '0', STR_PAD_LEFT);\n}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"private function getColorFullHexValue(string $color): string\n {\n if(strlen($color) == 3) {\n $color = sprintf('%s%s%s%s%s%s', $color[0], $color[0], $color[1], $color[1], $color[2], $color[2]);\n }\n return $color;\n }",
"function NO2Color($val) {\n\n /**\n * a short function used to tell if an integer is in range\n * @param int $val value to check against\n * @param int $min minimum value boundary\n * @param int $max maximum value boundary\n * @return boolean true if the value was in range, false if not\n */\n $inRange = function ($val, $min, $max) { return $min <= $val && $val <= $max;};\n\n //wish there was a shorthand if statement...\n if($inRange($val, 0, 67)): return \"#9FFF8E\"; endif;\n if($inRange($val, 68, 134)): return \"#55FF00\"; endif;\n if($inRange($val, 135, 200)): return \"#48C900\"; endif;\n if($inRange($val, 201, 267)): return \"#FEFE00\"; endif;\n if($inRange($val, 268, 334)): return \"#FAC900\"; endif;\n if($inRange($val, 335, 400)): return \"#F45958\"; endif;\n if($inRange($val, 401, 467)): return \"#F30000\"; endif;\n if($inRange($val, 468, 534)): return \"#890000\"; endif;\n if($inRange($val, 535, 600)): return \"#C12EFF\"; endif;\n if($val >= 601): return \"#55FF00\"; endif;\n}",
"function stringrgb($arr){\r\n\treturn \"RGB(\".$arr[0].\",\".$arr[1].\",\".$arr[2].\")\";\r\n}",
"function image_hex_color($color)\n{\n $c = strtoupper($color);\n if (strpos($c, '#') !== 0) {\n $c = '#'.$c;\n }\n if (!preg_match('/^#([A-F0-9]{3}){1,2}$/', $c)) {\n err('invalid hex color '.$color);\n }\n return $c;\n\n}",
"private function getColoredNum($str, $num, $r, $c, $bgc = null)\n {\n if ($this->puzzle[$r][$c] == ' ') {\n if ($this->isBlankRepeat($num, $c, $r, $this->player, $this->playerCols))\n echo ShellColors::getColoredString($str, 'red', $bgc ?? 'light_gray');\n else\n echo ShellColors::getColoredString($str, 'blue', $bgc ?? 'light_gray');\n }\n else\n echo ShellColors::getColoredString($str, 'black', $bgc ?? '');\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"public function testToHexWithUnuniformCaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toHex('mOccASin') == 'FFE4B5');\n unset($colors);\n }"
] | [
"0.63541615",
"0.6212889",
"0.61202675",
"0.61165047",
"0.5972459",
"0.5945584",
"0.5936147",
"0.5851305",
"0.5805399",
"0.5768269",
"0.57282466",
"0.5678284",
"0.5671367",
"0.5664674",
"0.56436515",
"0.5623387",
"0.56159604",
"0.56011194",
"0.5572944",
"0.556644",
"0.55425245",
"0.5523156",
"0.5522613",
"0.5522595",
"0.5522595",
"0.5522595",
"0.5522595",
"0.5522595",
"0.5522595",
"0.550724",
"0.55048126",
"0.5499745",
"0.5488961",
"0.54883456",
"0.54857624",
"0.54598826",
"0.5445791",
"0.54385525",
"0.5433507",
"0.54203075",
"0.5419719",
"0.54181993",
"0.54181993",
"0.54181993",
"0.54181993",
"0.5412295",
"0.5398388",
"0.5398388",
"0.5389988",
"0.5388051",
"0.5379268",
"0.5359583",
"0.5359524",
"0.5356969",
"0.53513134",
"0.5349844",
"0.5342358",
"0.53395164",
"0.53393793",
"0.5338322",
"0.5325726",
"0.5319693",
"0.5303355",
"0.5290293",
"0.5290293",
"0.52889925",
"0.5288445",
"0.52864426",
"0.5278277",
"0.52709216",
"0.52706707",
"0.5254734",
"0.5251836",
"0.5239711",
"0.5233648",
"0.5230908",
"0.5229283",
"0.5228884",
"0.5221376",
"0.5197607",
"0.5195717",
"0.5187366",
"0.5174063",
"0.5169802",
"0.5164614",
"0.51645774",
"0.5162094",
"0.5156188",
"0.51560074",
"0.5155577",
"0.5147605",
"0.5136305",
"0.5121795",
"0.51198244",
"0.51062137",
"0.51036346",
"0.50990814",
"0.50949234",
"0.5086759",
"0.50854087",
"0.50832987"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function db_disconnect($link) // Colorize: green
{ // Colorize: green
$link->close(); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function die_if_sql_failed($result, $link, $data, $sql) // Colorize: green
{ // Colorize: green
if (!$result) // Colorize: green
{ // Colorize: green
$error_details = "SQL Failed: " . $sql . " Error: " . $link->error; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Database error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function get_property_value($link, $data, $name) // Colorize: green
{ // Colorize: green
$res = ""; // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " value" // Colorize: green
. " FROM " . DB_TABLE_PROPERTIES // Colorize: green
. " WHERE name = '" . $link->real_escape_string($name) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($result->num_rows == 1) // Colorize: green
{ // Colorize: green
$res = $result->fetch_row()[0]; // Colorize: green
$result->close(); // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$error_details = "Invalid server state"; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Internal error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
return $res; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function set_property_value($link, $data, $name, $value) // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " value" // Colorize: green
. " FROM " . DB_TABLE_PROPERTIES // Colorize: green
. " WHERE name = '" . $link->real_escape_string($name) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($result->num_rows == 1) // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "UPDATE " . DB_TABLE_PROPERTIES // Colorize: green
. " SET value = '" . $link->real_escape_string($value) . "'" // Colorize: green
. " WHERE name = '" . $link->real_escape_string($name) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "INSERT INTO " . DB_TABLE_PROPERTIES // Colorize: green
. " (name, value)" // Colorize: green
. " VALUES(" // Colorize: green
. " '" . $link->real_escape_string($name) . "'," // Colorize: green
. " '" . $link->real_escape_string($value) . "'" // Colorize: green
. ")"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
} // Colorize: green
// Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function get_server_name($link, $data) // Colorize: green
{ // Colorize: green
return get_property_value($link, $data, "server_name"); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function get_secret_key($link, $data) // Colorize: green
{ // Colorize: green
return get_property_value($link, $data, "secret_key"); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function get_region_id($link, $data) // Colorize: green
{ // Colorize: green
return get_property_value($link, $data, "region_id"); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function set_region_id($link, $data, $value) // Colorize: green
{ // Colorize: green
return set_property_value($link, $data, "region_id", $value); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function get_app_id_for_codename($link, &$data, $codename) // Colorize: green
{ // Colorize: green
$res = 0; // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " id" // Colorize: green
. " FROM " . DB_TABLE_APPS // Colorize: green
. " WHERE codename = '" . $link->real_escape_string($codename) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($result->num_rows == 1) // Colorize: green
{ // Colorize: green
$res = $result->fetch_row()[0]; // Colorize: green
$result->close(); // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Application not found"; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
return $res; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function get_server_secret_key($link, $data, $address) // Colorize: green
{ // Colorize: green
$res = ""; // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " secret_key" // Colorize: green
. " FROM " . DB_TABLE_SERVERS // Colorize: green
. " WHERE address = '" . $link->real_escape_string($address) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($result->num_rows == 1) // Colorize: green
{ // Colorize: green
$res = $result->fetch_row()[0]; // Colorize: green
$result->close(); // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$error_details = "Access violation"; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Access error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
return $res; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function validate_server($link, $data, $address, $secret_key) // Colorize: green
{ // Colorize: green
if (get_server_secret_key($link, $data, $address) != $secret_key) // Colorize: green
{ // Colorize: green
$error_details = "Access violation"; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Access error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function validate_this_server($link, $data, $secret_key) // Colorize: green
{ // Colorize: green
if (get_secret_key($link, $data) != $secret_key) // Colorize: green
{ // Colorize: green
$error_details = "Access violation"; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Access error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function validate_access($link, $data, $my_address, $my_secret_key, $your_secret_key) // Colorize: green
{ // Colorize: green
validate_server($link, $data, $my_address, $my_secret_key); // Colorize: green
validate_this_server($link, $data, $your_secret_key); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function validate_server_with_ping($link, $data, $my_address, $my_secret_key, $address, $secret_key) // Colorize: green
{ // Colorize: green
$server_url = "https://" . $address . "/rest/ping.php"; // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$request_data = [ // Colorize: green
"my_address" => $my_address, // Colorize: green
"my_secret_key" => $my_secret_key, // Colorize: green
"your_secret_key" => $secret_key // Colorize: green
]; // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$curl_session = curl_init($server_url); // Colorize: green
// Colorize: green
curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, 10); // Colorize: green
curl_setopt($curl_session, CURLOPT_HEADER, false); // Colorize: green
curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true); // Colorize: green
curl_setopt($curl_session, CURLOPT_SSL_VERIFYHOST, 0); // Colorize: green
curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); // Colorize: green
curl_setopt($curl_session, CURLOPT_CUSTOMREQUEST, "POST"); // Colorize: green
curl_setopt($curl_session, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); // Colorize: green
curl_setopt($curl_session, CURLOPT_POSTFIELDS, json_encode($request_data)); // Colorize: green
// Colorize: green
$response = curl_exec($curl_session); // Colorize: green
curl_close($curl_session); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($response) // Colorize: green
{ // Colorize: green
$response = json_decode($response, true); // Colorize: green
// Colorize: green
if ($response["status"] != "OK") // Colorize: green
{ // Colorize: green
$error_details = "Invalid response from server " . $server_url . " : " . json_encode($response); // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Request error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
$error_details = "Failed to get response from server " . $server_url; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Request error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function validate_app_secret_key($link, $data, $app_id, $secret_key) // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " secret_key" // Colorize: green
. " FROM " . DB_TABLE_APPS // Colorize: green
. " WHERE id = '" . $link->real_escape_string($app_id) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($result->num_rows == 1) // Colorize: green
{ // Colorize: green
$app_secret_key = $result->fetch_row()[0]; // Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($secret_key != $app_secret_key) // Colorize: green
{ // Colorize: green
$error_details = "Access violation"; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Access error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$error_details = "Access violation"; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Access error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function validate_app_version($link, $data, $app_version_id) // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " completed" // Colorize: green
. " FROM " . DB_TABLE_APP_VERSIONS // Colorize: green
. " WHERE id = '" . $link->real_escape_string($app_version_id) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($result->num_rows == 1) // Colorize: green
{ // Colorize: green
$completed = $result->fetch_row()[0]; // Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($completed != 0) // Colorize: green
{ // Colorize: green
$error_details = "Invalid version state"; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Internal error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$error_details = "Invalid server state"; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Internal error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function avoid_duplicate_version($link, $data, $app_id, $app_version_id, $hash) // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " hash" // Colorize: green
. " FROM " . DB_TABLE_APP_VERSIONS // Colorize: green
. " WHERE app_id = '" . $link->real_escape_string($app_id) . "'" // Colorize: green
. " AND completed = '1'" // Colorize: green
. " ORDER BY version DESC" // Colorize: green
. " LIMIT 1"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($result->num_rows == 1) // Colorize: green
{ // Colorize: green
$version_hash = $result->fetch_row()[0]; // Colorize: green
$result->close(); // Colorize: green
// Colorize: green
if ($version_hash == $hash) // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "DELETE FROM " . DB_TABLE_APP_FILES // Colorize: green
. " WHERE app_version_id = '" . $link->real_escape_string($app_version_id) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "DELETE FROM " . DB_TABLE_APP_VERSIONS // Colorize: green
. " WHERE id = '" . $link->real_escape_string($app_version_id) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
return false; // Colorize: green
} // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
return true; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function get_delay_to_server($link, $data, $address) // Colorize: green
{ // Colorize: green
$server_url = "https://" . $address . "/rest/ping.php"; // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$curl_multi = curl_multi_init(); // Colorize: green
$curl_sessions = []; // Colorize: green
// Colorize: green
for ($i = 0; $i < 10; ++$i) // Colorize: green
{ // Colorize: green
$curl_session = curl_init($server_url); // Colorize: green
// Colorize: green
curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, 10); // Colorize: green
curl_setopt($curl_session, CURLOPT_HEADER, false); // Colorize: green
curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true); // Colorize: green
curl_setopt($curl_session, CURLOPT_SSL_VERIFYHOST, 0); // Colorize: green
curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); // Colorize: green
// Colorize: green
curl_multi_add_handle($curl_multi, $curl_session); // Colorize: green
array_push($curl_sessions, $curl_session); // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$active = false; // Colorize: green
// Colorize: green
do // Colorize: green
{ // Colorize: green
$status = curl_multi_exec($curl_multi, $active); // Colorize: green
// Colorize: green
if ($active) // Colorize: green
{ // Colorize: green
curl_multi_select($curl_multi); // Colorize: green
} // Colorize: green
} while($active && $status == CURLM_OK); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$responses = []; // Colorize: green
$ping_total = 0; // Colorize: green
// Colorize: green
foreach ($curl_sessions as $curl_session) // Colorize: green
{ // Colorize: green
array_push($responses, curl_multi_getcontent($curl_session)); // Colorize: green
$ping_total += curl_getinfo($curl_session, CURLINFO_TOTAL_TIME); // Colorize: green
// Colorize: green
curl_multi_remove_handle($curl_multi, $curl_session); // Colorize: green
curl_close($curl_session); // Colorize: green
} // Colorize: green
// Colorize: green
curl_multi_close($curl_multi); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
foreach ($responses as $response) // Colorize: green
{ // Colorize: green
if ($response) // Colorize: green
{ // Colorize: green
$response = json_decode($response, true); // Colorize: green
// Colorize: green
if ($response["status"] != "OK") // Colorize: green
{ // Colorize: green
$error_details = "Invalid response from server " . $server_url . " : " . json_encode($response); // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Request error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
$error_details = "Failed to get response from server " . $server_url; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Request error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
return round($ping_total * 100000); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function replicate_to_regions($link, $data, $replicate_data, $path, $region_id) // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " region_id," // Colorize: green
. " address," // Colorize: green
. " delay," // Colorize: green
. " secret_key" // Colorize: green
. " FROM " . DB_TABLE_SERVERS // Colorize: green
. " WHERE region_id != '" . $link->real_escape_string($region_id) . "'" // Colorize: green
. " ORDER BY region_id"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$last_region_id = -1; // Colorize: green
$min_delay = 0; // Colorize: green
$preferable_servers = []; // Colorize: green
// Colorize: green
while ($row = $result->fetch_assoc()) // Colorize: green
{ // Colorize: green
$cur_region_id = $row["region_id"]; // Colorize: green
$delay = $row["delay"]; // Colorize: green
// Colorize: green
if ($last_region_id != $cur_region_id) // Colorize: green
{ // Colorize: green
$last_region_id = $cur_region_id; // Colorize: green
$min_delay = $delay; // Colorize: green
$preferable_servers[$cur_region_id] = $row; // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
if ($delay < $min_delay) // Colorize: green
{ // Colorize: green
$min_delay = $delay; // Colorize: green
$preferable_servers[$cur_region_id] = $row; // Colorize: green
} // Colorize: green
} // Colorize: green
} // Colorize: green
// Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$curl_multi = curl_multi_init(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$replicate_data["level"] = 0; // Colorize: green
// Colorize: green
foreach ($preferable_servers as &$server) // Colorize: green
{ // Colorize: green
$replicate_data["your_secret_key"] = $server["secret_key"]; // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$curl_session = curl_init("https://" . $server["address"] . $path); // Colorize: green
// Colorize: green
curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, 10); // Colorize: green
curl_setopt($curl_session, CURLOPT_HEADER, false); // Colorize: green
curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true); // Colorize: green
curl_setopt($curl_session, CURLOPT_SSL_VERIFYHOST, 0); // Colorize: green
curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); // Colorize: green
curl_setopt($curl_session, CURLOPT_CUSTOMREQUEST, "POST"); // Colorize: green
curl_setopt($curl_session, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); // Colorize: green
curl_setopt($curl_session, CURLOPT_POSTFIELDS, json_encode($replicate_data)); // Colorize: green
// Colorize: green
curl_multi_add_handle($curl_multi, $curl_session); // Colorize: green
$server["curl_session"] = $curl_session; // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$active = false; // Colorize: green
// Colorize: green
do // Colorize: green
{ // Colorize: green
$status = curl_multi_exec($curl_multi, $active); // Colorize: green
// Colorize: green
if ($active) // Colorize: green
{ // Colorize: green
curl_multi_select($curl_multi); // Colorize: green
} // Colorize: green
} while($active && $status == CURLM_OK); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
foreach ($preferable_servers as &$server) // Colorize: green
{ // Colorize: green
$curl_session = $server["curl_session"]; // Colorize: green
// Colorize: green
$server["response"] = curl_multi_getcontent($curl_session); // Colorize: green
// Colorize: green
curl_multi_remove_handle($curl_multi, $curl_session); // Colorize: green
curl_close($curl_session); // Colorize: green
} // Colorize: green
// Colorize: green
curl_multi_close($curl_multi); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
foreach ($preferable_servers as $server) // Colorize: green
{ // Colorize: green
$response = $server["response"]; // Colorize: green
// Colorize: green
if ($response) // Colorize: green
{ // Colorize: green
$response = json_decode($response, true); // Colorize: green
// Colorize: green
if ($response["status"] != "OK") // Colorize: green
{ // Colorize: green
$error_details = "Invalid response from server https://" . $server["address"] . $path . " : " . json_encode($response); // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Request error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
$error_details = "Failed to get response from server https://" . $server["address"] . $path; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Request error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function replicate_by_region($link, $data, $replicate_data, $path, $region_id, $my_address) // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " address," // Colorize: green
. " secret_key" // Colorize: green
. " FROM " . DB_TABLE_SERVERS // Colorize: green
. " WHERE" // Colorize: green
. " region_id = '" . $link->real_escape_string($region_id) . "'" // Colorize: green
. " AND" // Colorize: green
. " address != '" . $link->real_escape_string($my_address) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$servers = []; // Colorize: green
// Colorize: green
while ($row = $result->fetch_assoc()) // Colorize: green
{ // Colorize: green
array_push($servers, $row); // Colorize: green
} // Colorize: green
// Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if (count($servers) > 0) // Colorize: green
{ // Colorize: green
$curl_multi = curl_multi_init(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$replicate_data["level"] = 1; // Colorize: green
// Colorize: green
foreach ($servers as &$server) // Colorize: green
{ // Colorize: green
$replicate_data["your_secret_key"] = $server["secret_key"]; // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$curl_session = curl_init("https://" . $server["address"] . $path); // Colorize: green
// Colorize: green
curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, 10); // Colorize: green
curl_setopt($curl_session, CURLOPT_HEADER, false); // Colorize: green
curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true); // Colorize: green
curl_setopt($curl_session, CURLOPT_SSL_VERIFYHOST, 0); // Colorize: green
curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); // Colorize: green
curl_setopt($curl_session, CURLOPT_CUSTOMREQUEST, "POST"); // Colorize: green
curl_setopt($curl_session, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); // Colorize: green
curl_setopt($curl_session, CURLOPT_POSTFIELDS, json_encode($replicate_data)); // Colorize: green
// Colorize: green
curl_multi_add_handle($curl_multi, $curl_session); // Colorize: green
$server["curl_session"] = $curl_session; // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$active = false; // Colorize: green
// Colorize: green
do // Colorize: green
{ // Colorize: green
$status = curl_multi_exec($curl_multi, $active); // Colorize: green
// Colorize: green
if ($active) // Colorize: green
{ // Colorize: green
curl_multi_select($curl_multi); // Colorize: green
} // Colorize: green
} while($active && $status == CURLM_OK); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
foreach ($servers as &$server) // Colorize: green
{ // Colorize: green
$curl_session = $server["curl_session"]; // Colorize: green
// Colorize: green
$server["response"] = curl_multi_getcontent($curl_session); // Colorize: green
// Colorize: green
curl_multi_remove_handle($curl_multi, $curl_session); // Colorize: green
curl_close($curl_session); // Colorize: green
} // Colorize: green
// Colorize: green
curl_multi_close($curl_multi); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
foreach ($servers as $server) // Colorize: green
{ // Colorize: green
$response = $server["response"]; // Colorize: green
// Colorize: green
if ($response) // Colorize: green
{ // Colorize: green
$response = json_decode($response, true); // Colorize: green
// Colorize: green
if ($response["status"] != "OK") // Colorize: green
{ // Colorize: green
$error_details = "Invalid response from server https://" . $server["address"] . $path . " : " . json_encode($response); // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Request error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} // Colorize: green
else // Colorize: green
{ // Colorize: green
$error_details = "Failed to get response from server https://" . $server["address"] . $path; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Request error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
} // Colorize: green
} // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function replicate($link, $data, $replicate_data, $path) // Colorize: green
{ // Colorize: green
$my_address = get_server_name($link, $data); // Colorize: green
$my_secret_key = get_secret_key($link, $data); // Colorize: green
$region_id = get_region_id($link, $data); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$replicate_data["my_address"] = $my_address; // Colorize: green
$replicate_data["my_secret_key"] = $my_secret_key; // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
replicate_to_regions($link, $data, $replicate_data, $path, $region_id); // Colorize: green
replicate_by_region($link, $data, $replicate_data, $path, $region_id, $my_address); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function endsWith($haystack, $needle) // Colorize: green
{ // Colorize: green
$length = strlen($needle); // Colorize: green
// Colorize: green
if ($length == 0) // Colorize: green
{ // Colorize: green
return true; // Colorize: green
} // Colorize: green
// Colorize: green
return substr($haystack, -$length) === $needle; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function random_string($length, $keyspace = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") // Colorize: green
{ // Colorize: green
$res = ""; // Colorize: green
// Colorize: green
$max = strlen($keyspace) - 1; // Colorize: green
// Colorize: green
for ($i = 0; $i < $length; ++$i) // Colorize: green
{ // Colorize: green
$res .= $keyspace[random_int(0, $max)]; // Colorize: green
} // Colorize: green
// Colorize: green
return $res; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function generate_download_name($compression_method) // Colorize: green
{ // Colorize: green
do // Colorize: green
{ // Colorize: green
$res = random_string(249); // Colorize: green
// Colorize: green
switch ($compression_method) // Colorize: green
{ // Colorize: green
case 0: // Colorize: green
{ // Colorize: green
$res .= ".0.raw"; // Colorize: green
} // Colorize: green
break; // Colorize: green
// Colorize: green
case 1: // Colorize: green
{ // Colorize: green
$res .= ".0.xz"; // Colorize: green
} // Colorize: green
break; // Colorize: green
// Colorize: green
default: // Colorize: green
{ // Colorize: green
die("Unknown compression method"); // Colorize: green
} // Colorize: green
break; // Colorize: green
} // Colorize: green
// Colorize: green
if (!file_exists("../downloads/" . $res)) // Colorize: green
{ // Colorize: green
return $res; // Colorize: green
} // Colorize: green
} while(true); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function calculate_download_file_hash($path) // Colorize: green
{ // Colorize: green
if (endsWith($path, ".raw")) // Colorize: green
{ // Colorize: green
return exec("md5sum " . $path . " | awk '{ print $1 }'"); // Colorize: green
} // Colorize: green
else // Colorize: green
if (endsWith($path, ".xz")) // Colorize: green
{ // Colorize: green
return exec("cat " . $path . " | unxz | md5sum | awk '{ print $1 }'"); // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
return ""; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function calculate_app_version_hash($link, $data, $app_version_id) // Colorize: green
{ // Colorize: green
// Ignore PhpAlignmentVerifier [BEGIN] // Colorize: green
$sql = "SELECT" // Colorize: green
. " hash" // Colorize: green
. " FROM " . DB_TABLE_APP_FILES // Colorize: green
. " WHERE app_version_id = '" . $link->real_escape_string($app_version_id) . "'"; // Colorize: green
// Ignore PhpAlignmentVerifier [END] // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$result = $link->query($sql); // Colorize: green
die_if_sql_failed($result, $link, $data, $sql); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
if ($result->num_rows == 0) // Colorize: green
{ // Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$error_details = "Version is empty"; // Colorize: green
error_log($error_details); // Colorize: green
// Colorize: green
db_disconnect($link); // Colorize: green
// Colorize: green
$data["message"] = "Internal error"; // Colorize: green
$data["details"] = $error_details; // Colorize: green
// Colorize: green
die(json_encode($data)); // Colorize: green
} // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
$res = pack("H*", "00000000000000000000000000000000"); // Colorize: green
// Colorize: green
while ($row = $result->fetch_row()) // Colorize: green
{ // Colorize: green
$res ^= pack("H*", $row[0]); // Colorize: green
} // Colorize: green
// Colorize: green
$result->close(); // Colorize: green
// Colorize: green
// Colorize: green
// Colorize: green
return bin2hex($res); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_address($address) // Colorize: green
{ // Colorize: green
return isset($address) // Colorize: green
&& // Colorize: green
is_string($address) // Colorize: green
&& // Colorize: green
( // Colorize: green
filter_var($address, FILTER_VALIDATE_IP) // Colorize: green
|| // Colorize: green
filter_var($address, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) // Colorize: green
); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_app_id($app_id) // Colorize: green
{ // Colorize: green
return isset($app_id) // Colorize: green
&& // Colorize: green
is_int($app_id) // Colorize: green
&& // Colorize: green
$app_id > 0; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_app_file_id($app_file_id) // Colorize: green
{ // Colorize: green
return isset($app_file_id) // Colorize: green
&& // Colorize: green
is_int($app_file_id) // Colorize: green
&& // Colorize: green
$app_file_id > 0; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_app_version_id($app_version_id) // Colorize: green
{ // Colorize: green
return isset($app_version_id) // Colorize: green
&& // Colorize: green
is_int($app_version_id) // Colorize: green
&& // Colorize: green
$app_version_id > 0; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_codename($codename) // Colorize: green
{ // Colorize: green
return isset($codename) // Colorize: green
&& // Colorize: green
is_string($codename) // Colorize: green
&& // Colorize: green
preg_match(CODENAME_REGEXP, $codename); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_compression_method($compression_method) // Colorize: green
{ // Colorize: green
return isset($compression_method) // Colorize: green
&& // Colorize: green
is_int($compression_method) // Colorize: green
&& // Colorize: green
$compression_method >= 0 // Colorize: green
&& // Colorize: green
$compression_method <= 1; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_content($content) // Colorize: green
{ // Colorize: green
return isset($content) // Colorize: green
&& // Colorize: green
is_string($content) // Colorize: green
&& // Colorize: green
$content != ""; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_download_name($download_name) // Colorize: green
{ // Colorize: green
return isset($download_name) // Colorize: green
&& // Colorize: green
is_string($download_name) // Colorize: green
&& // Colorize: green
preg_match(DOWNLOAD_NAME_REGEXP, $download_name); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_email($email) // Colorize: green
{ // Colorize: green
return isset($email) // Colorize: green
&& // Colorize: green
is_string($email) // Colorize: green
&& // Colorize: green
filter_var($email, FILTER_VALIDATE_EMAIL); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_filename($filename) // Colorize: green
{ // Colorize: green
return isset($filename) // Colorize: green
&& // Colorize: green
is_string($filename) // Colorize: green
&& // Colorize: green
$filename != ""; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_hash($hash) // Colorize: green
{ // Colorize: green
return isset($hash) // Colorize: green
&& // Colorize: green
is_string($hash) // Colorize: green
&& // Colorize: green
preg_match(MD5_HASH_REGEXP, $hash); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_level($level) // Colorize: green
{ // Colorize: green
return isset($level) // Colorize: green
&& // Colorize: green
is_int($level) // Colorize: green
&& // Colorize: green
$level >= 0 // Colorize: green
&& // Colorize: green
$level <= 1; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_name($name) // Colorize: green
{ // Colorize: green
return isset($name) // Colorize: green
&& // Colorize: green
is_string($name) // Colorize: green
&& // Colorize: green
$name != ""; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_region_id($region_id) // Colorize: green
{ // Colorize: green
return isset($region_id) // Colorize: green
&& // Colorize: green
is_int($region_id) // Colorize: green
&& // Colorize: green
$region_id > 0; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_secret_key($secret_key) // Colorize: green
{ // Colorize: green
return isset($secret_key) // Colorize: green
&& // Colorize: green
is_string($secret_key) // Colorize: green
&& // Colorize: green
preg_match(SECRET_KEY_REGEXP, $secret_key); // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_vendor_id($vendor_id) // Colorize: green
{ // Colorize: green
return isset($vendor_id) // Colorize: green
&& // Colorize: green
is_int($vendor_id) // Colorize: green
&& // Colorize: green
$vendor_id > 0; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_version($version) // Colorize: green
{ // Colorize: green
return isset($version) // Colorize: green
&& // Colorize: green
is_int($version) // Colorize: green
&& // Colorize: green
$version >= 20190101000000 // Colorize: green
&& // Colorize: green
$version <= 99999999999999; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7137396",
"0.66215855",
"0.63515484",
"0.6261399",
"0.6232191",
"0.6069502",
"0.5956803",
"0.5953466",
"0.5879444",
"0.58689076",
"0.5860924",
"0.58554953",
"0.58298475",
"0.5798921",
"0.57774603",
"0.574557",
"0.574557",
"0.574557",
"0.574557",
"0.574203",
"0.574203",
"0.5736967",
"0.5703528",
"0.5694842",
"0.5682074",
"0.5678425",
"0.5636958",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.56369126",
"0.5589102",
"0.5582859",
"0.5579961",
"0.55690134",
"0.5563796",
"0.5561035",
"0.55275315",
"0.54956275",
"0.54712844",
"0.54425377",
"0.54215574",
"0.54175156",
"0.54124457",
"0.5406131",
"0.5405192",
"0.5401971",
"0.5389291",
"0.53787285",
"0.53753734",
"0.53499854",
"0.53476965",
"0.53454864",
"0.5331055",
"0.5316815",
"0.5302317",
"0.5301571",
"0.5294123",
"0.5284149",
"0.5281741",
"0.5277991",
"0.52776474",
"0.52711356",
"0.5270649",
"0.52687216",
"0.526327",
"0.5262753",
"0.52603877",
"0.52603877",
"0.5250316",
"0.5241049",
"0.52360487",
"0.5235755",
"0.5221451",
"0.52205944",
"0.5218148",
"0.5210594",
"0.518511",
"0.5173912",
"0.5169921",
"0.51624846",
"0.5134465",
"0.5134348",
"0.51308256",
"0.51292807",
"0.5128311",
"0.5126955",
"0.5122831",
"0.5122831",
"0.51213026",
"0.5114306",
"0.50973964",
"0.5095798",
"0.5095548",
"0.50930166",
"0.5080491",
"0.5076878",
"0.50761783",
"0.5075574"
] | 0.0 | -1 |
Colorize: green Colorize: green Colorize: green Colorize: green | function verify_version_for_user($version) // Colorize: green
{ // Colorize: green
return isset($version) // Colorize: green
&& // Colorize: green
is_int($version) // Colorize: green
&& // Colorize: green
$version >= 20190101 // Colorize: green
&& // Colorize: green
$version <= 99999999; // Colorize: green
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function colorize() {\n\t\tself::$colorize = true;\n\t}",
"function onStandard($str) {\n return colorize($str)->onStandard();\n}",
"function colorize($string) {\n $colorize = true;\n if (Terminus::getConfig('colorize') == 'auto') {\n $colorize = !\\cli\\Shell::isPiped();\n }\n $colorized_string = \\cli\\Colors::colorize(\n $string,\n $colorize\n );\n return $colorized_string;\n}",
"function standard($str) {\n return colorize($str)->standard();\n}",
"public function colour();",
"public function color()\n {\n }",
"public function green($text): string;",
"function verify_color($verified) {\n\t\tif($verified == 0){\n\t\t\treturn \"grey\";\n\t\t}\n\t\telse {\n\t\t\treturn \"green\";\n\t\t}\n\t}",
"private function colorizeAttribute($string)\n\t{\n\t\t\n\t\treturn $string;\n\t\t\n//\t\treturn lime_colorizer::colorize($parts[0], array('fg' => 'magenta'))\n//\t\t\t\t. lime_colorizer::colorize('=', array('fg' => 'cyan'))\n//\t\t\t\t. lime_colorizer::colorize($parts[1], array('fg' => 'blue'));\n\t}",
"public function howToColor($color)\n {\n }",
"public function testToRGBStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN', true) == '(85,107,47)');\n unset($colors);\n }",
"function callback_color($args)\n {\n }",
"function setColor($percent, $invert = false)\n{\n //Amount under 100% determines red tint\n $R = min((2.0 * (1.0-$percent)), 1.0) * 255.0;\n //Green by default, 100%\n $G = min((2.0 * $percent), 1.0) * 255.0;\n //No blue here\n $B = 0.0;\n //Return the hexadecimal conversion of the RGB\n return (($invert) ? \nsprintf(\"%02X%02X%02X\",$R,$G,$B) \n: sprintf(\"%02X%02X%02X\",$R,$G,$B)); \n}",
"public function green($text) {\n return $this->begin() . $this->formats['green'] . $text . $this->end();\n }",
"public static function readable_color_mixin() {\n\t\treturn \"\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) >= @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: darken( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when ( iscolor( @bgcolor ) ) and ( lightness( @bgcolor ) < @treshold ) and ( iscolor( @bgcolor ) ) {\n\t\t\t\tcolor: lighten( @bgcolor, @diff );\n\t\t\t}\n\n\t\t\t.readable-color( @bgcolor:#FFF, @treshold:70, @diff:50% ) when not ( iscolor( @bgcolor ) ) {}\n\t\t\";\n\t}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor() {}",
"public function getColor() {}",
"public function getColor(): string;",
"public function color(array $color);",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"public function actionColors()\n {\n \t$this->stdout(\"Waiting on important things to happen...\\n\", Console::BOLD);\n \t$yay = $this->ansiFormat('Yay!', Console::FG_CYAN);\n \techo \"$yay! We're done!\\n\";\n \treturn 0;\n }",
"public function colorize()\n\t {\n\t\t $div = array();\n\t\t if($this->_divSurround !== null)\n\t\t {\n\t\t\t $div = $this->makeDivSurround();\n\t\t } \n\t\t \n\t\t for($i=0;$i<count($this->_aCodeFragments);$i++)\n\t\t {\n\t\t\t $this->_aCodeColorizedFragments[$i] = \"<h2>\".$this->_aCodeTitles[$i].\"</h2>\";\n\t\t\t if($this->_divSurround[\"EVERY\"] === true)\n\t\t\t {\t\t\t\t\n\t\t\t\t$this->_aCodeColorizedFragments[$i] .= $div[\"OPENTAG\"].highlight_string($this->_aCodeFragments[$i], true).$div[\"CLOSETAG\"];\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t $this->_aCodeColorizedFragments[$i] .= highlight_string($this->_aCodeFragments[$i], true);\n\t\t\t }\t\t\t \n\t\t }\t\t \t\t\n\t }",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColorComponents() {}",
"public function getColor()\n {\n return\"Yellow\";\n }",
"public function testToRGBNonStringWithUppercaseParameter()\n {\n $colors = new Jervenclark\\Colors\\Colors;\n $this->assertTrue($colors->toRGB('DARK OLIVE GREEN') == [85,107,47]);\n unset($colors);\n }",
"public function colorize($text, $style) {\n return $this->stdout()->colorize($text, $style);\n }",
"public function getColor(): string\n {\n }",
"private function green(string $string): string\n {\n $color = new Color();\n return $color->ok($string);\n }",
"public function getColor() {\n\t}",
"public function blue($text): string;",
"public function red($text): string;",
"public function getColor()\n {\n }",
"public function yellow($text): string;",
"public static function merge_colors_for_dots($colors)\n\t{\n\t\t//check if we're dealing with just one color\n\t\tif(count($colors)==1)\n\t\t{\n\t\t\tforeach($colors as $color)\n\t\t\t{\n\t\t\t\treturn $color;\n\t\t\t}\n\t\t}\n\t\t//now for each color break it into RGB, add them up, then normalize\n\t\t$red = 0;\n\t\t$green = 0;\n\t\t$blue = 0;\n\t\tforeach($colors as $color)\n\t\t{\n\t\t\t$numeric_colors = self::_hex2RGB($color);\n\t\t\t$red = $red + $numeric_colors['red'];\n\t\t\t$green = $green + $numeric_colors['green'];\n\t\t\t$blue = $blue + $numeric_colors['blue'];\n\t\t}\n\t\t//now normalize\n\t\t$color_length = sqrt( ($red*$red) + ($green*$green) + ($blue*$blue));\n\t\n\t\t//make sure there's no divide by zero\n\t\tif($color_length == 0)\n\t\t{\n\t\t\t$color_length = 255;\n\t\t}\n\t\t$red = ($red / $color_length) * 255;\n\t\t$green = ($green / $color_length) * 255;\n\t\t$blue = ($blue / $color_length) * 255;\n\t\n\t\t\n\t\t//pad with zeros if there's too much space\n\t\t$red = dechex($red);\n\t\tif(strlen($red) < 2)\n\t\t{\n\t\t\t$red = \"0\".$red;\n\t\t}\n\t\t$green = dechex($green);\n\t\tif(strlen($green) < 2)\n\t\t{\n\t\t\t$green = \"0\".$green;\n\t\t}\n\t\t$blue = dechex($blue);\n\t\tif(strlen($blue) < 2)\n\t\t{\n\t\t\t$blue = \"0\".$blue;\n\t\t}\n\t\t//now put the color back together and return it\n\t\treturn $red.$green.$blue;\n\t\t\n\t}",
"static function red($text) {\n\t\techo (self::$colorize) ? \"\\033[31m\".$text.\"\\033[0m\" : $text;\n\t}",
"public function Colorcase(){\n\t\t$this->__construct();\n\t}",
"function cli_style($string, $color = null, $highlight = null, $format = null) {\n return cli_highlight(\n cli_color(\n cli_format($string, $format), $color\n ), $highlight\n );\n }",
"function cli_color($string, $color = null) {\n $colors = [\n 'default' => '39',\n 'black' => '30',\n 'red' => '31',\n 'green' => '32',\n 'yellow' => '33',\n 'blue' => '34',\n 'magenta' => '35',\n 'cyan' => '36',\n 'light_gray' => '37',\n 'dark_gray' => '90',\n 'light_red' => '91',\n 'light_green' => '92',\n 'light_yellow' => '93',\n 'light_blue' => '94',\n 'light_magenta' => '95',\n 'light_cyan' => '96',\n 'white' => '97',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function andersen_color_sync($key = '', $lum = 2){\n\t\t$r = hexdec(substr($key,0,2));\n\t\t$g = hexdec(substr($key,2,2));\n\t\t$b = hexdec(substr($key,4,2));\n\n\t\t$yiq = (($r*299)+($g*587)+($b*114))/1000;\n\n\t\tif ($yiq >= 128){\n\t\t $out = andersen_darken($key, $lum);\n\t\t}else{\n\t\t //dark color, use bright font\n\t\t $out = andersen_lighten($key, $lum);\n\t\t}\n\n\t\treturn $out;\n\t}",
"function red($text){\r\n return \"<b><font color=red>\".$text.\"</font></b>\";\r\n}",
"public function actionColors()\n {\n $this->stdout(\"Waiting on important thing to happen...\\n\", Console::BOLD);\n\n $yay = $this->ansiFormat('Yay', Console::FG_CYAN);\n echo \"$yay! We're done!\\n\";\n return Controller::EXIT_CODE_NORMAL;\n }",
"public function backgroundColor(array $color);",
"protected function parameterizeColors() : void\n {\n $colors = $this->fetchColorsFromACF();\n $this->injectStyles($colors);\n }",
"public function test_it_replaces_colour_variants() {\n\n $substitutions = array(\n 'linkcolor' => '#123123',\n );\n $linkcolor = $substitutions['linkcolor'];\n $linkcolor_lighter = totara_brightness_linear($linkcolor, 15);\n $linkcolor_darker = totara_brightness_linear($linkcolor, -15);\n $linkcolor_light = totara_brightness_linear($linkcolor, 25);\n $linkcolor_dark = totara_brightness_linear($linkcolor, -25);\n $linkcolor_lighter_perc = totara_brightness($linkcolor, 15);\n $linkcolor_darker_perc = totara_brightness($linkcolor, -15);\n $linkcolor_light_perc = totara_brightness($linkcolor, 25);\n $linkcolor_dark_perc = totara_brightness($linkcolor, -25);\n $linkcolor_readable_text = totara_readable_text($linkcolor);\n\n $css =<<<EOF\nbody {\n color: [[setting:linkcolor]];\n color: [[setting:linkcolor-lighter]];\n color: [[setting:linkcolor-darker]];\n color: [[setting:linkcolor-light]];\n color: [[setting:linkcolor-dark]];\n color: [[setting:linkcolor-lighter-perc]];\n color: [[setting:linkcolor-darker-perc]];\n color: [[setting:linkcolor-light-perc]];\n color: [[setting:linkcolor-dark-perc]];\n color: [[setting:linkcolor-readable-text]];\n}\nEOF;\n\n $expected = <<<EOF\nbody {\n color: {$linkcolor};\n color: {$linkcolor_lighter};\n color: {$linkcolor_darker};\n color: {$linkcolor_light};\n color: {$linkcolor_dark};\n color: {$linkcolor_lighter_perc};\n color: {$linkcolor_darker_perc};\n color: {$linkcolor_light_perc};\n color: {$linkcolor_dark_perc};\n color: {$linkcolor_readable_text};\n}\nEOF;\n $actual = (new css_processor())->replace_colours($substitutions, $css);\n\n $this->assertEquals($expected, $actual);\n }",
"function statusColors($statusC)\n{\n\tif ($statusC == 0) return \"#CCC\"; //inactiv\n\tif ($statusC == 1) return \"green\"; //activ\n\tif ($statusC == 2) return \"rgb(245, 160, 3)\"; //waiting\n\tif ($statusC == 3) return \"rgb(221, 36, 3);\"; //not paid\n\t//else return \"\";\n}",
"function color($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\r\n\t\t\techo \"<div class='inline-rel'>\";\r\n\t\t\techo \"<span style='background:\" . (!empty($args['value']) ? $args['value'] : \"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzIwM0UzNzZEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzIwM0UzNzdEODc2MTFFMDgyM0RFQUJEOEU1NEI2NjkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDMjAzRTM3NEQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDMjAzRTM3NUQ4NzYxMUUwODIzREVBQkQ4RTU0QjY2OSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ps3q5KgAAAKOSURBVHjaXJRZTypBEIWZYVPgKsgeSAgQCUvgBeP//wGQyBaBRCFACKIgO7L7zdS94439MFTXqa5zqroapVqtXi6XdDpts9leXl4+Pz8jkUg4HN7tds/Pz4qiZLNZq9Xa6/XG47HX643H4wJZWIfDwWQyEcT3dDqxPZ/PJn0dj0dFX9g4f0FQKsvlEtf7+/t+vw8EAna7Hc9sNsPw+/3EQcixu7u76+vrr6+vj48PgUiqulyum5ubxWIxmUyurq7Y4sVerVZ/9DWfz9miEZtjBqRFkhgB0KIZTFVVDLZms5kuwGxAJCWSggVia+l2u0QUi0WONZtN9CcSiVgshtRyuUzE4+Mj306nMxgMQqHQ/f29QFrD0Ew+lJCP9G63m9D1ek1Lbm9vsYHISyQQhAZEvKYE5kqlgrdQKFDJaDR6fX2lqnw+D/T09ESfUqkUPaP+RqNhQBbqodskhvakL7zYeLBJjQEhMRJpQNoF1+t1IqhTJoHcwWCQO6Mx1ElEMpkEGg6H0+kU5dFoVCBkW7bbrVCxoRObzYYt0WTEplrujy+c1IVgA4Jf4dJlA8wY0CEkyX2wJZFApMADRP0CaUPCuPp8PlKgmcQIxouNSJ++uLx+vy9T5XA4DIiDP8xcgNPpRCEGtaCKrUAQQgWhiBdIGxJuhYiHhweO8VbgoUP0jxSlUun/IYGf18aQCPQzJOQjMYVxmVInzQOSITHry+Px0C0D+jskiOHqkZrJZCibIaEwhOVyOdBarUaTkEORvLZ2uy0QHKo8Zklh+rewZfIEEvsXpKGtVosfBgMZNA9VTAKqKOzt7Q2IOmkH/zC8czjhFwiniloO4GWq8RIBGzbt3ehLIAiBaLsBcfBbgAEArCsu6B0YK4AAAAAASUVORK5CYII=);\") .\"' class='swatch'></span><input id='$id' class=\\\"picker\\\" type='text' data-tooltip='\" .$args['tooltip'] . \"' size='57'\" . $this->placeholder('None') . \"' name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\r\n\t\t\techo \"<div id='\" . $id . \"_picker' class='picker' style=''></div>\";\r\n\t\t\t$this->description($args['description']); // print a description if there is one\r\n\t\t\techo \"</div>\";\r\n\t\t}",
"public function process_colors( $string ){\n\t\t$string = self::utils()->replace_commented_style_with_variable( $string );\n\t\treturn $this->convert_variables_to_color( $string );\n\t}",
"public function testCompareColors()\n {\n $this->assertTrue(Colors::compareColors('#FFFFFF', '#ffffff'));\n $this->assertTrue(Colors::compareColors('#FF0000', 'red'));\n $this->assertTrue(Colors::compareColors('#00FF00', 'green'));\n $this->assertTrue(Colors::compareColors('#0000FF', 'blue'));\n $this->assertTrue(Colors::compareColors('#ffff00', 'yellow'));\n $this->assertTrue(Colors::compareColors('#ff00ff', 'magenta'));\n $this->assertTrue(Colors::compareColors('#00ffff', 'cyan'));\n $this->assertTrue(Colors::compareColors('#ffffff', 'white'));\n $this->assertTrue(Colors::compareColors('white', 'white'));\n $this->assertTrue(!Colors::compareColors('white', '#000000'));\n }",
"public function apply(string $colorName, $text) : string;",
"public function useColor($name);",
"function render($text)\n{\n $styles = Config::styles();\n $names = implode('|', array_keys($styles));\n preg_match_all(\"#(\\[({$names})\\])#i\", $text, $matches);\n\n $replacements = $matches[1];\n $selections = $matches[2];\n\n if(!empty($replacements) && !empty($selections))\n {\n $replacements = array_unique($replacements);\n $selections = array_unique($selections);\n\n foreach($replacements as $index => $replacement)\n {\n $color = strtolower($selections[$index]);\n if(array_key_exists($color, $styles))\n $text = str_ireplace($replacement, $styles[$color], $text);\n }\n }\n echo $text;\n}",
"public function red($text) {\n return $this->begin() . $this->formats['red'] . $text . $this->end();\n }",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"function pintaln($str, $color = 'blanco')\n{\n $c = array('verde' => \"\\033[32m\",\n 'verdeclaro' => \"\\033[1;32m\",\n 'rojo' => \"\\033[31m\",\n 'azul' => \"\\033[34m\",\n 'cyan' => \"\\033[36m\",\n 'amarillo' => \"\\033[0;33m\",\n 'gris' => \"\\033[1;30m\",\n 'blanco' => \"\\033[0;37m\",\n 'fin' => \"\\033[0;37m\" );\n // echo \"\\033[35mAviso:\\033[37m \";\n // echo \"\\033[133mDebug:\\033[37m \";\n if (!array_key_exists($color,$c)){\n $color='rojo';\n }\n echo $c[$color] . $str . $c['fin'] . \"\\n\";\n}",
"function percent2Color($value, $brightness = 255, $max = 100, $min = 0, $thirdColorHex = '00') {\n\t$first = (1-($value/$max))*$brightness;\n\t$second = ($value/$max)*$brightness;\n\n\t// Find the influence of the middle color (yellow if 1st and 2nd are red and green)\n\t$diff = abs($first-$second);\n\t$influence = ($brightness-$diff)/2; \n\t$first = intval($first + $influence);\n\t$second = intval($second + $influence);\n\n\t// Convert to HEX, format and return\n\t$firstHex = str_pad(dechex($first),2,0,STR_PAD_LEFT);\n\t$secondHex = str_pad(dechex($second),2,0,STR_PAD_LEFT);\n\t$thirdColorHex = str_pad(dechex($thirdColorHex),2,0,STR_PAD_LEFT);\n\t\n\tif (($value % 3) == 0) { // three\n\t\treturn '#' . $firstHex . $secondHex . $thirdColorHex;\n\t} else if (($value % 3) == 1) { // two\n\t\treturn '#' . $thirdColorHex . $firstHex . $secondHex;\n\t} else if (($value % 3) == 2) { // one\n\t\treturn '#' . $secondHex . $thirdColorHex . $firstHex;\n\t}\n\n// alternatives:\n// return $thirdColorHex . $firstHex . $secondHex;\n// return $firstHex . $thirdColorHex . $secondHex;\n}",
"private function _getColorTable() {}",
"function toColor($n){\n\t\t\treturn(\"#\".substr(\"000000\".dechex($n),-6));\n\t\t}",
"function set_color_high($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value < $yellow_limit)\n\t\treturn \"class=green\";\n\tif ($value < $red_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=red\";\n}",
"public function mainColour() {\n\t\t$images = $this->ShopImage->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ShopImage.colour_1 IS NULL'\n\t\t\t)\n\t\t));\n\n\t\t$count = count($images);\n\t\tforeach ($images as $k => $image) {\n\t\t\t$this->out(sprintf('%s of %d: %s', str_pad($k+1, strlen($count), ' ', STR_PAD_LEFT), $count, $image['ShopImage']['image_full']));\n\t\t\t$colours = $this->_colour(APP . 'webroot/' . $image['ShopImage']['image_full']);\n\t\t\t$image['ShopImage']['colour_1'] = $colours[0];\n\t\t\t$image['ShopImage']['colour_2'] = $colours[1];\n\t\t\t$this->ShopImage->save($image['ShopImage']);\n\t\t}\n\t}",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function renderColor($element)\n {\n return '<span style=\"color:' . $element[2] . '\">' . $this->renderAbsy($element[1]) . '</span>';\n }",
"protected function _cliGreen($message)\n {\n return sprintf(\"\\033[32m%s\\033[37m\", $message) . PHP_EOL;\n ;\n }",
"function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}",
"function mc_shift_color( $color ) {\n\t$color = str_replace( '#', '', $color );\n\t$rgb = '';\n\t$percent = ( mc_inverse_color( $color ) == '#ffffff' ) ? - 20 : 20;\n\t$per = $percent / 100 * 255;\n\t// Percentage to work with. Change middle figure to control color temperature.\n\tif ( $per < 0 ) {\n\t\t// DARKER.\n\t\t$per = abs( $per ); // Turns Neg Number to Pos Number.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) - $per;\n\t\t\t$c = ( $c < 0 ) ? 0 : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t} else {\n\t\t// LIGHTER.\n\t\tfor ( $x = 0; $x < 3; $x ++ ) {\n\t\t\t$c = hexdec( substr( $color, ( 2 * $x ), 2 ) ) + $per;\n\t\t\t$c = ( $c > 255 ) ? 'ff' : dechex( $c );\n\t\t\t$rgb .= ( strlen( $c ) < 2 ) ? '0' . $c : $c;\n\t\t}\n\t}\n\n\treturn '#' . $rgb;\n}",
"private function get_colored($string = \" [ info ] \", $cix = 6) {\n return (Validator::equals($this->color,true) && Validator::isa($cix,\"integer\")\n ? hex2bin(\"1b\").$this->colors[$cix].$string.\n hex2bin(\"1b\").$this->colors[count($this->colors)-1]\n : $string);\n }",
"public function colorImage() {}",
"function cli_highlight($string, $color = null) {\n $colors = [\n 'default' => '49',\n 'black' => '40',\n 'red' => '41',\n 'green' => '42',\n 'yellow' => '43',\n 'blue' => '44',\n 'magenta' => '45',\n 'cyan' => '46',\n 'light_gray' => '47',\n 'dark_gray' => '100',\n 'light_red' => '101',\n 'light_green' => '102',\n 'light_yellow' => '103',\n 'light_blue' => '104',\n 'light_magenta' => '105',\n 'light_cyan' => '106',\n 'white' => '107',\n ];\n\n if ($color === null or ! array_has($colors, $color)) {\n return $string;\n } else {\n $color = $colors[$color];\n }\n\n return s(\"\\033[%sm%s\\033[0m\", $color, $string);\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=3;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),2) + $minColor[$i];\r\n }\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function debug_colorize_string($string)\r\r\n{\r\r\n\t/* turn array indexes to red */\r\r\n\r\r\n\t$string = str_replace('[','[<font color=\"red\">',$string);\r\r\n\t$string = str_replace(']','</font>]',$string);\r\r\n\r\r\n\t/* turn the word Array blue */\r\r\n\t$string = str_replace('Array','<font color=\"blue\">Array</font>',$string);\r\r\n\t/* turn arrows graygreen */\r\r\n\t$string = str_replace('=>','<font color=\"#556F55\">=></font>',$string);\r\r\n\t$string = str_replace(\"'\", \"\\'\", $string);\r\r\n\t$string = str_replace(\"/\", \"\\/\", $string);\r\r\n\t$string = str_replace('\"', '\\\"', $string);\r\r\n\treturn $string;\r\r\n}",
"function c_back($str){\n $str = \"<font color=$str[1]>$str[2]</font>\";\n return $str;\n}",
"function echoColors($pallet)\n{ // OUTPUT COLORSBAR\n foreach ($pallet as $key => $val) {\n echo '<div style=\"display:inline-block;width:50px;height:20px;background:#' . $val . '\"> </div>';\n }\n}",
"public static function Stresscolor($stress) {\r\n\t\tif ($stress > 100)\r\n\t\t\t$stress = 100;\r\n\t\tif ($stress < 0)\r\n\t\t\t$stress = 0;\r\n\r\n\t\t$gb = dechex(200 - 2*$stress);\r\n\r\n\t\tif ((200 - 2*$stress) < 16)\r\n\t\t\t$gb = '0'.$gb;\r\n\r\n\t\treturn 'C8'.$gb.$gb;\r\n\t}",
"public static function makeColor(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return 'red';\n case self::SKIPPED:\n case self::INCOMPLETE:\n case self::RISKY:\n case self::WARN:\n case self::RUNS:\n return 'yellow';\n default:\n return 'green';\n }\n }",
"function eo_event_color($post_id=0){\n\n\t$post_id = (int) ( empty($post_id) ? get_the_ID() : $post_id);\n\n\tif( empty($post_id) )\n\t\treturn false;\n\n\t$color='';\n\t$terms = get_the_terms( $post_id, 'event-category' );\n\n\tif($terms){\n\t\tforeach ($terms as $term):\t\n\t\t\tif( ! empty($term->color) ){\n\t\t\t\t$colorCode = ltrim($term->color, '#');\n\t\t\t\tif ( ctype_xdigit($colorCode) && (strlen($colorCode) == 6 || strlen($colorCode) == 3)){\n\t\t\t\t\t$color = '#'.$colorCode;\n\t\t\t\t\tbreak;\n \t}\n\t\t\t}\n\t\tendforeach;\n\t}\n\n\treturn esc_attr($color);\n}",
"public function colorList() {}",
"function pl_hashify( $color ){\n\t\n\t$clean_hex = str_replace('#', '', $color);\n\t\n\treturn sprintf('#%s', $clean_hex);\n}",
"function _wp_tinycolor_bound_alpha($n)\n {\n }",
"public function getGreen()\n {\n return (0.5 + $this->green) | 0;\n }",
"function colorFormat($v) {\r\n //$o = round(sqrt(abs($v)),1);\r\n if ($v <= 0) $maxColor = [0,0,255,1];\r\n else $maxColor = [255,0,0,1];\r\n $minColor = [251,250,182,0];\r\n\r\n for($i=0;$i<=2;$i++) {\r\n $rgba[$i] = round(($maxColor[$i] - $minColor[$i]) * abs($v),0) + $minColor[$i];\r\n }\r\n $rgba[3] = round(($maxColor[3] - $minColor[3]) * abs($v),2) + $minColor[3];\r\n\r\n \r\n return 'rgba('.implode(',',$rgba).')';\r\n}",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"function GetAllColors () {\n $colors = array (\"#00FFFF\",\"#000000\",\"#0000FF\",\"#8A2BE2\",\"#A52A2A\",\"#DEB887\",\"#5F9EA0\",\"#7FFF00\",\"#D2691E\",\"#FF7F50\",\"#6495ED\",\"#00FFFF\",\"#00008B\",\"#008B8B\",\"#B8860B\",\"#A9A9A9\",\"#006400\",\"#BDB76B\",\"#8B008B\",\"#556B2F\",\"#FF8C00\",\"#9932CC\",\"#8B0000\",\"#E9967A\",\"#8FBC8F\",\"#483D8B\",\"#2F4F4F\",\"#2F4F4F\",\"#00CED1\",\"#9400D3\",\"#FF1493\",\"#00BFFF\",\"#696969\",\"#696969\",\"#1E90FF\",\"#B22222\",\"#228B22\",\"#FF00FF\",\"#FFD700\",\"#DAA520\",\"#808080\",\"#808080\",\"#008000\",\"#ADFF2F\",\"#FF69B4\",\"#CD5C5C\",\"#4B0082\",\"#7CFC00\",\"#ADD8E6\",\"#F08080\",\"#E0FFFF\",\"#D3D3D3\",\"#90EE90\",\"#FFB6C1\",\"#FFA07A\",\"#20B2AA\",\"#87CEFA\",\"#778899\",\"#778899\",\"#B0C4DE\",\"#00FF00\",\"#32CD32\",\"#FF00FF\",\"#800000\",\"#66CDAA\",\"#0000CD\",\"#BA55D3\",\"#9370D8\",\"#3CB371\",\"#7B68EE\",\"#00FA9A\",\"#48D1CC\",\"#C71585\",\"#191970\",\"#FFE4E1\",\"#FFE4B5\",\"#000080\",\"#808000\",\"#6B8E23\",\"#FFA500\",\"#FF4500\",\"#DA70D6\",\"#EEE8AA\",\"#98FB98\",\"#AFEEEE\",\"#D87093\",\"#FFDAB9\",\"#CD853F\",\"#FFC0CB\",\"#DDA0DD\",\"#B0E0E6\",\"#800080\",\"#FF0000\",\"#BC8F8F\",\"#4169E1\",\"#8B4513\",\"#FA8072\",\"#F4A460\",\"#2E8B57\",\"#A0522D\",\"#C0C0C0\",\"#87CEEB\",\"#6A5ACD\",\"#708090\",\"#708090\",\"#00FF7F\",\"#4682B4\",\"#D2B48C\",\"#008080\",\"#D8BFD8\",\"#FF6347\",\"#40E0D0\",\"#EE82EE\",\"#F5DEB3\",\"#FFFFFF\",\"#F5F5F5\",\"#FFFF00\",\"#9ACD32\");\n return($colors);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"function get_primary_colors() {\n $colors = array(\n 'ff0000' => 'Red',\n '00ff00' => 'Green',\n '0000ff' => 'Blue',\n );\n $temp = array();\n foreach($colors as $k => $v) {\n $temp[] = '\"'.$k.'\", '.'\"'.$v.'\"';\n }\n return join(', ', $temp);\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function hilight_yellow( $atts, $content = null ) {\r\n return '<span class=\"hilight-yellow\">' . $content . '</span>';}",
"public function colorMatrix() {}",
"public function WorkSpaceColor($red, $green, $blue){\r\n $this->whitepaper_color=[$red,$green,$blue];\r\n }",
"function getColor() { return $this->_color; }",
"function verify_color( $input ) {\n\t\t\t$input = trim( $color, '#' );\n\t\t\t//make hex-like for is_numeric test\n\t\t\t$test = \"0x$input\";\n\t\t\tif ( ! is_numeric( $test ) )\n\t\t\t\treturn 'transparent';\n\t\t\treturn \"#$input\";\n\t\t}",
"function set_color_low($value, $yellow_limit, $red_limit)\n{\n settype ($value , \"float\");\n settype ($yellow_limit , \"float\");\n settype ($red_limit , \"float\");\n\n\tif ($value == -1)\n\t return null;\n\tif ($value <= $red_limit)\n\t\treturn \"class=red\";\n\tif ($value <= $yellow_limit)\n\t\treturn \"class=yellow\";\n\telse\n\t\treturn \"class=green\";\n}"
] | [
"0.7136888",
"0.6622235",
"0.63520926",
"0.62617975",
"0.6232242",
"0.6069731",
"0.59585845",
"0.5954361",
"0.58800024",
"0.58694065",
"0.58624536",
"0.58557904",
"0.58307487",
"0.5800812",
"0.5778475",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57459646",
"0.57424426",
"0.57424426",
"0.57377595",
"0.57039696",
"0.5695352",
"0.56825835",
"0.56777906",
"0.5636989",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.5636945",
"0.55901283",
"0.558436",
"0.55801606",
"0.5569634",
"0.55657136",
"0.5561339",
"0.5529164",
"0.5497189",
"0.54716736",
"0.5443772",
"0.5421894",
"0.54189116",
"0.5412091",
"0.54069865",
"0.5406589",
"0.54031056",
"0.53904",
"0.5379252",
"0.5375695",
"0.5348484",
"0.5347673",
"0.5346228",
"0.53318363",
"0.5317239",
"0.5303456",
"0.53023",
"0.52939",
"0.5284239",
"0.5283536",
"0.5278639",
"0.5278566",
"0.5271939",
"0.52696663",
"0.52690095",
"0.5264454",
"0.52626556",
"0.5260929",
"0.5260929",
"0.5251707",
"0.52410257",
"0.5237153",
"0.5236862",
"0.52219707",
"0.5221822",
"0.5218626",
"0.52117497",
"0.518523",
"0.51737314",
"0.5170454",
"0.5163356",
"0.5135344",
"0.51342803",
"0.51310617",
"0.51302874",
"0.51293164",
"0.51287264",
"0.51238096",
"0.51238096",
"0.512113",
"0.5115395",
"0.5097277",
"0.50966126",
"0.5096468",
"0.5092934",
"0.50823104",
"0.50778425",
"0.50773156",
"0.5076809"
] | 0.0 | -1 |
Create instance, load current info based on session info | public function __construct($db, $sessionID, $userID) {
$this->db = $db;
$this->sessionID = $sessionID;
$this->auth = new \auth($db);
$this->userID = $this->auth->getUserID();
$this->calendar = new \CAL\calendar($this->db);
$this->lists = new \lists($this->db);
error_log("CAL/Event controller built\n\n");
// $this->dflt($params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function instantiate() {\n\n // Checking if a user session already exists.\n if ($this->session->userData('loggedIn') === true) {\n\n // Set the identity\n $this->setIdentity($this->session->userData('id'));\n\n // Set isGuest to false.\n $this->isGuest = false;\n }\n }",
"public static function Create()\n\t{\n\t\t# create unique session identifier\n\t\t$key = self::generate_sid();\n\t\t\t\t\t\n\t\tself::setcookie($key);\n\t\tself::Store($key);\n\t\tself::$sid = $key;\n\t\t\n\t\t# Yes - try to retrieve the session from the DB\n\t\t$session = database()->start_query('sessions')\n\t\t\t->where(array('key' => self::$sid))\n\t\t\t->limit(1)\n\t\t\t\t->run()\n\t\t\t\t->row();\n\t\t\n\t\tself::$data = (object) $session;\n\t\tself::$data->_data = (unserialize(self::$data->_data) !== FALSE)? unserialize(self::$data->_data) : array();\n\t}",
"public function instantiateSession()\n {\n session_start();\n\n if (isset($_SESSION['instanceID']) === false && defined('DOING_CRON') === false) {\n $this->generateDemoInstance();\n } else {\n $this->instanceID = $_SESSION['instanceID'];\n }\n }",
"public function sess_create()\r\r\n\t{\r\r\n\t\tif(session_id() == '') {\r\r\n\t\t\tsession_start();\r\r\n\t\t}\r\r\n\r\r\n\t\t$_SESSION['session_id']\t\t= session_id();\r\r\n\t\t$_SESSION['ip_address']\t\t= $this->CI->input->ip_address();\r\r\n\t\t$_SESSION['user_agent']\t\t= substr($this->CI->input->user_agent(), 0, 120);\r\r\n\t\t$_SESSION['last_activity']\t= $this->parent->now;\r\r\n\r\r\n\t\t$this->parent->userdata = $_SESSION;\r\r\n\t}",
"public function __construct()\n {\n // Construct session place\n if(!array_key_exists(self::SESSION_KEY, $_SESSION)) {\n $_SESSION[self::SESSION_KEY] = array();\n }\n }",
"protected function init_session () {\n\t\t$Request = Request::instance();\n\t\t/**\n\t\t * If session exists\n\t\t */\n\t\tif ($Request->cookie('session')) {\n\t\t\t$this->user_id = $this->load();\n\t\t}\n\t\t$this->update_user_is();\n\t}",
"protected function getSession()\n {\n $session = Session::getInstance();\n\n $this->settings = $session->get('member-import-settings');\n $this->importData = $session->get('member-import-data');\n }",
"private function createSession()\n {\n session_regenerate_id(TRUE);\n $this->session = array();\n $this->session['legit'] = $this->sessionHash();\n $this->session['id'] = $this->userId;\n if (!$this->userId) {\n $this->voidCookie();\n }\n }",
"private function _createSession(){\n return $this->_session = new Session();\n }",
"public function __construct() {\n $this->session = new Session();\n }",
"function __construct()\n {\n // session()->put('basic', Basic::find(1));\n // view()->share($data);\n }",
"private function __construct(){\n // 1800 seconds = 30 minutes\n session_set_cookie_params(1800, \"/\");\n\n session_start();\n\n if(!empty($_SESSION[\"username\"])){\n self::$is_logged_in = true;\n self::$logged_user = array(\n \"user_id\" => $_SESSION[\"user_id\"],\n \"username\" => $_SESSION[\"username\"],\n );\n }\n }",
"public function __construct()\n {\n $this->session = Kazinduzi::session();\n }",
"function __construct(){\r\n if(isset($_SESSION['login']) && $_SESSION['login'] == 'true' && isset($_SESSION['username'])){\r\n $this->username = $_SESSION['username'];\r\n $this->login = $_SESSION['login'];\r\n $this->email = $_SESSION['email'];\r\n $this->credential = $_SESSION['credential'];\r\n $this->picture = $_SESSION['picture'];\r\n $this->academy = $_SESSION['fullname'];\r\n }\r\n }",
"public function newSession();",
"function __construct() {\n\t\t$this->time = time();\n\t\t$this->startSession();\n\t}",
"public function __construct() {\n \n parent::__construct();\n \n $this->sessionUser = Zf_SessionHandler::zf_getSessionVariable(\"ttv_identificationCode\");\n \n \n }",
"protected function _init() {\n parent::_init();\n\n $session = $this->_config['classes']['session'];\n $this->_session = new $session();\n\n $this->_http_get = $this->sanitize($this->_config['http_get']);\n $this->_http_post = $this->sanitize($this->_config['http_post']);\n\n if ( !$this->_is_valid_request($this->_http_get)\n || !$this->_is_valid_request($this->_http_post) ) {\n $this->handle_CSRF();\n $this->_token = null;\n }\n\n if ( is_null($this->_token) ) {\n $this->_token = Auth::create_token();\n }\n\n if ( $this->_session->is_logged_in() ) {\n $user = $this->_config['classes']['user'];\n $this->_user = new $user(array('id' => $this->_session->get_user_id()));\n $this->_template = $this->_user->get_template();\n }\n }",
"protected function manageSession()\n {\n $this->session = new WebsiteSession();\n foreach ($this->eventRequest->getSession() as $key => $value) {\n\n if ($key == 'createdAt') {\n $value = time();\n }\n\n $method = 'set' . ucwords($key);\n if (method_exists($this->session, $method)) {\n $this->session->$method($value);\n }\n }\n }",
"function load(){\n\t\t$this->ctrl = (int)$_SESSION['ctrl'];\n\t\t$this->id = (int)$_SESSION['USid'];\n\t\t$this->name = (string)$_SESSION['USname'];\n\t\t$this->email = (string)$_SESSION['USemail'];\n\t\t$this->lastlogin = (string)$_SESSION['USlastlogin'];\n\t\t$this->priv = (int)$_SESSION['priv'];\n\t\t$this->logontries = (int)$_SESSION['logontries'];\n\t\t$this->agentid = @(int)$_SESSION['USagentid'];\n\t}",
"private function __construct()\n\t{\n $registry = Zend_Registry::getInstance();\n $config = $registry->get('config');\n \n\t\t$this->_lifetime = (isset($config->sessionLifetime))\n\t\t\t\t\t\t\t? $config->sessionLifetime\n\t\t\t\t\t\t\t: (int) ini_get('session.gc_maxlifetime');\n\t\t$this->_objSession = new Model_Session();\n\t\t\n\t}",
"function __construct() {\n if (!isset($_SESSION)) {\n session_start(); // Inicia a sessão caso não exista sessao\n }\n }",
"function create() \n\t{\n\t\t//If this was called to destroy a session (only works after session started)\n\t\t$this->clear();\n\n\t\t//If there is a class to handle CRUD of the sessions\n\t\tif($this->session_database) \n\t\t{\n if (is_php('5.4'))\n {\n // -- User for php > 5.4 --\n session_set_save_handler($this, TRUE);\n }\n else\n {\n session_set_save_handler(\n array($this, 'open'),\n array($this, 'close'),\n array($this, 'read'),\n array($this, 'write'),\n array($this, 'destroy'),\n array($this, 'gc')\n );\n register_shutdown_function('session_write_close');\n }\n // Create connect to database\n $this->_conn = DbConnection::getInstance();\n\t\t}\n\n\t\t// Start the session!\n\t\tsession_start();\n\n\t\t//Check the session to make sure it is valid\n\t\tif(!$this->check())\n\t\t{\n\t\t\t//Destroy invalid session and create a new one\n\t\t\treturn $this->create();\n\t\t}\n\t}",
"public static function instance(){\n\t\t\tif(!Session::session_started()){\n\t\t\t\tSession::session_start();\n\t\t\t}\n\t\t}",
"function loadSession() {}",
"public function __construct() {\n\t\tif (Session::started()) {\n\t\t\t$this->token = Session::get($this->token());\n\t\t}\n\n\t\t// If a token did not exist in the session for the user, we will attempt\n\t\t// to load the value of a \"remember me\" cookie for the driver, which\n\t\t// serves as a long-lived client side authenticator for the user.\n\t\tif (is_null($this->token)) {\n\t\t\t$this->token = $this->recall();\n\t\t}\n\t}",
"private function __construct () {\n // start the session\n session_start();\n }",
"public function __construct() {\n session_start();\n $this->check_stored_login();\n }",
"public function __construct()\n {\n session_start();\n $this->id = session_id();\n }",
"public function __construct() {\r\n $this->session = ci('load')->library('session')->session;\r\n $this->authentication = ci('load')->model('social/authentication_m')->authentication_m;\r\n }",
"function requestSessionInfo()\n {\n //para pasarselo al aside;\n\n $sessionLevel = $this->loginController->GetSessionAuthLevel();\n $this->view->setSessionLevel($sessionLevel);\n\n $sessionName = $this->loginController->GetSessionUsername();\n $this->view->setSessionName($sessionName);\n }",
"protected function initializeSession() {}",
"protected function _loadCurrent()\n\t{\n\t\t// load username\n\t\t$current = array();\n\t\t$current['username'] = null;\n\t\tif ($this->auth->hasIdentity())\n\t\t{\n\t\t\t$current['username'] = $this->auth->getIdentity();\n\t\t}\n\t\t\n\t\t// load ip address\n\t\t$current['ipAddress'] = $this->getIpAddress();\n\t\t$current['userAgent'] = $this->getUserAgent();\n\t\t$current['timestamp'] = time();\n\t\t\n\t\t// save to session\n\t\tforeach ($this->_keys as $key)\n\t\t{\n\t\t\t$this->_current[$key] = $current[$key];\n\t\t\t$this->session->$key = $current[$key];\n\t\t}\n\t}",
"public function createSession()\n {\n session_start();\n }",
"public function __construct()\n {\n $this->auth_model = new authModel();\n session();\n }",
"public function __construct($input = null)\n {\n $resetSession = true;\n if ((null === $input) && isset($_SESSION)) {\n $input = $_SESSION;\n if (is_object($input) && $_SESSION instanceof \\ArrayAccess) {\n $resetSession = false;\n } else if (is_object($input) && !($_SESSION instanceof \\ArrayAccess)) {\n $input = (array) $input;\n }\n } else if (null === $input) {\n $input = array();\n }\n\n $this->sessionData = $input;\n \n // create (or update) metadata.\n if (null !== $this->getMetadata('created')) {\n // set last used equal to previously 'updated' time stamp.\n $this->setLastUsed($this->getMetadata('updated'));\n $this->setMetadata('updated', current_time('timestamp'));\n } else {\n $timeStamp = current_time('timestamp');\n $this->setMetadata('created', $timeStamp);\n $this->setMetadata('updated', $timeStamp);\n $this->setMetadata('lifetime', ini_get('session.cookie_lifetime'));\n \n // set last used equal to 'created' time stamp.\n $this->setLastUsed($timeStamp);\n }\n \n if ($resetSession) {\n $_SESSION = $this;\n }\n }",
"private function __construct()\n {\n $app = Application::getInstance();\n $this->_client = $app->session();\n }",
"function __construct(){\n $this->startSession();\n }",
"function initSession(){\n\n\t\t//load resource files\n\t\t$this->refreshDataSet();\n\n\t\tif($this->isFatal())return;\n\n\t\t//check the state\n\t\t$this->checkInput();\n\n\t\t\n\t\tif($this->isFatal())return;\n\n\t\t//construct the table from the data\n\t\t$this->buildTable($this->schedule, $this->users);\n\n\t\tif($this->isFatal())return;\t\n\n\t}",
"public function __construct()\n {\n if (!self::$_started) {\n session_start();\n self::$_started = true;\n if (!isset($_SESSION['__DEFAULT__'])) {\n $_SESSION['__DEFAULT__'] = array();\n }\n }\n }",
"public function __construct()\n {\n ini_set('session.use_cookies', 1);\n ini_set('session.use_only_cookies', 1);\n ini_set('session.use_trans_sid', 0);\n ini_set('session.save_handler', 'files');\n ini_set('session.gc_maxlifetime', 3600);\n\n session_name($this->sessionName);\n session_set_cookie_params(\n $this->sessionMaxLifeTime,\n $this->sessionPath,\n $this->sessionDomain,\n $this->sessionSSL,\n $this->sessionHTTPOnly\n );\n session_save_path($this->sessionSavePath);\n\n /*\n * very important : so read, write \n * can use them form my class not from SessionHandler\n * */\n session_set_save_handler($this, true);\n }",
"private function __construct()\r\n {\r\n // session_set_save_handler(\r\n // array(&$this, \"sessionOpen\"),\r\n // array(&$this, \"sessionClose\"),\r\n // array(&$this, \"sessionRead\"),\r\n // array(&$this, \"sessionWrite\"),\r\n // array(&$this, \"sessionDestroy\"),\r\n // array(&$this, \"sessionGarbageCollector\")\r\n // );\r\n \r\n session_name(SESSION_NAME);\r\n session_start();\r\n }",
"protected abstract function loadSessionData();",
"function __construct() {\n // Create a new instance of the corresponding view.\n $this->view = new View();\n // $this->session = new Session(); // Sessions still not working.\n }",
"protected function _initialize_session()\n\t{\n\t\t$this->sdata = array(\n\t\t\t'session_id' \t\t=> 0,\n\t\t\t'fingerprint'\t\t=>\t0,\n\t\t\t'member_id' \t\t=> 0,\n\t\t\t'admin_sess' \t\t=> 0,\n\t\t\t'ip_address' \t\t=> ee()->input->ip_address(),\n\t\t\t'user_agent' \t\t=> substr(ee()->input->user_agent(), 0, 120),\n\t\t\t'last_activity'\t\t=> 0,\n\t\t\t'sess_start'\t\t=>\t0\n\t\t);\n\t}",
"public function __construct(){\n\t\tsession_start();\n\t\tif(!self::$_singleton instanceof self){\n\t\t\t$this->setInstance();\n\t\t}\n\t}",
"static public function createSession()\n {\n global $prefs, $session;\n\n $session->remove('ingo');\n if ($session->exists('ingo', 'script_generate')) {\n return;\n }\n\n /* getBackend() and loadIngoScript() will both throw Exceptions, so\n * do these first as errors are fatal. */\n foreach (self::getBackend() as $key => $val) {\n if ($val) {\n $session->set('ingo', 'backend/' . $key, $val);\n }\n }\n\n $ingo_script = self::loadIngoScript();\n $session->set('ingo', 'script_generate', $ingo_script->generateAvailable());\n\n /* Disable categories as specified in preferences */\n $categories = array_flip(\n array_merge($ingo_script->availableActions(),\n $ingo_script->availableCategories()));\n if ($prefs->isLocked('blacklist')) {\n unset($categories[Ingo_Storage::ACTION_BLACKLIST]);\n }\n if ($prefs->isLocked('whitelist')) {\n unset($categories[Ingo_Storage::ACTION_WHITELIST]);\n }\n if ($prefs->isLocked('vacation')) {\n unset($categories[Ingo_Storage::ACTION_VACATION]);\n }\n if ($prefs->isLocked('forward')) {\n unset($categories[Ingo_Storage::ACTION_FORWARD]);\n }\n if ($prefs->isLocked('spam')) {\n unset($categories[Ingo_Storage::ACTION_SPAM]);\n }\n $categories = array_flip($categories);\n\n /* Set the list of categories this driver supports. */\n $session->set('ingo', 'script_categories', $categories);\n }",
"public function __construct()\n {\n if (session_status() !== PHP_SESSION_ACTIVE) {\n session_start();\n }\n// $_SESSION['register_type'] = 'owner';\n $this->middleware('guest');\n }",
"public function __construct()\n {\t\n @include(SHIN_Core::isConfigExists('auth.php'));\n\t\t\n $this->_config_mapper($auth);\n\t\t\n\t\tif($auth['keeping_logic'] == 'db')\n\t\t{\n\t\t\t// db style\n\t\t\tSHIN_Core::loadModel(array('sys_session_model', 'session_model'));\n\t\t\t$this->sessionModel = SHIN_Core::$_models['session_model']->get_instance();\n\t\t\t$this->sessionModel->init($this->sh_Options['sess_expiration']/60, $this->sh_Options['sess_time_to_update']/60);\n\t\t}\n\t\t\n\t\tConsole::logSpeed('SHIN_Auth begin work, Time taken to get to line: '.__FILE__.'::'.__LINE__);\n\t\tConsole::logMemory($this, 'SHIN_Auth. Size of class: ');\t\t \n }",
"public function __construct() {\n\t\tsession_start();\n\t}",
"function __construct()\n {\n session_start();\n if(isset($_SESSION[\"usuario\"])) $this->usuario=$_SESSION[\"usuario\"];\n }",
"public static function init() {\n\t\t\t\n\t\t\t/* Run session */\n\t\t\tsession_start();\n\t\t\t\n\t\t}",
"protected function _loadFromSession()\n {\n if (isset($this->sessionData['_options']))\n {\n $this->_options = $this->sessionData['_options'];\n }\n else\n {\n $this->initDefaultOptions();\n }\n\n if (isset($this->sessionData['_selectedIndex'])) $this->_selectedIndex = $this->sessionData['_selectedIndex'];\n if (isset($this->sessionData['safeMode'])) $this->safeMode = $this->sessionData['safeMode'];\n }",
"public function __construct($uid = null) {\r\n // unless the current session is logged in of course\r\n if($uid == null) {\r\n $this->sess = new Session();\r\n\r\n // If this session is already logged in, populate this object\r\n if ($this->sess->isLoggedIn()) {\r\n $this->sessionLogin();\r\n }\r\n } else {\r\n // Get information based on the UID given for the member object\r\n $this->load($uid);\r\n }\r\n }",
"private function __construct()\n {\n // suppress notice that session has already started\n $e = error_reporting('E_NONE');\n session_start();\n error_reporting($e);\n\n // initialize storage\n if (! isset($_SESSION[self::KEY])) $_SESSION[self::KEY] = array();\n if (! isset($_SESSION[self::ERRORS])) $_SESSION[self::ERRORS] = array();\n if (! isset($_SESSION[self::NOTICE])) $_SESSION[self::NOTICE] = self::EMPTY_STRING;\n }",
"public function __construct() {\n global $DB;\n $this->DB = $DB;\n $this->currentUserID = isset($_SESSION[SESS_KEY]['login'])?$_SESSION[SESS_KEY]['login']:false;\n }",
"public function __construct()\n {\n if(isset($_SESSION['user_login'])){\n $this->user_login = $_SESSION['user_login'];\n $this->access_level = $_SESSION['access_level'];\n $this->logged_in = true;\n }\n else{\n $this->user_login = null;\n $this->access_level=self::ACCESS_LEVEL_NONE;\n $this->logged_in=false;\n }\n }",
"function __construct(){\r\n\t\tif( $_SESSION['expiresTime'] && $_SESSION['expiresTime'] <= time() ){\r\n\t\t\t$_SESSION = array();\r\n\t\t}\r\n\t\tif(isset($_GET['tokenString'])){\r\n\t\t\t$tokenString=explode(\".\", $_GET['tokenString']);\r\n\t\t\t$token= json_decode(base64_decode($tokenString[1]) , true );\r\n\t\t}\r\n\t\tif($token['oauth_token']){\r\n\t\t\tWeibo::init( c('akey') , c('skey') ,$tokenInfo['oauth_token'] );\r\n\t\t\tWeibo::setIp('202.110.0.5');\r\n\t\t\t$res = Weibo::show_user_by_id( $tokenInfo['user_id'] );\r\n\t\t\tif( $res && !isset( $res['error_code'] ) ){\r\n\t\t\t\tforeach ($res as $key => $value) {\r\n\t\t\t\t\t$_SESSION[$key] = $value;\r\n\t\t\t\t}\r\n\t\t\t\t$_SESSION['__SINA']['TOKEN'] = $tokenInfo['oauth_token'];\r\n\t\t\t\t$_SESSION['expiresTime'] = $tokenInfo['expires'] + time();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tWeibo::init( c('akey') , c('skey') ,$_SESSION['__SINA']['TOKEN'] );\r\n\t\t\tWeibo::setIp('202.110.0.5');\r\n\t\t}\r\n\t\t//init weibo Class\r\n\t}",
"public function __construct()\n {\n if (session_id() == '') {\n session_start();\n }\n\n if (!isset($_SESSION[self::ITEMS_IDENTIFIER])) {\n $_SESSION[self::ITEMS_IDENTIFIER] = array();\n }\n\n $this->items = & $_SESSION[self::ITEMS_IDENTIFIER];\n }",
"public function __construct()\n {\n $this->view = new \\stdClass();\n $this->auth = new AuthUser();\n\n // Variável que recebe as configurações padrões da aplicação\n $this->config = self::findDataSettings();\n\n // Inicializando flash mensagem da aplicação\n\n // Mensagem padrão para operações de sucesso\n if (Session::getSession('success')) {\n $this->success = Session::getSession('success');\n Session::destroySession('success');\n }//end if\n // Mensagem padrão para operações de erros\n if (Session::getSession('errors')) {\n $this->errors = Session::getSession('errors');\n Session::destroySession('errors');\n }//end if\n // Mensagem padrão para operações de info\n if (Session::getSession('info')) {\n $this->info = Session::getSession('info');\n Session::destroySession('info');\n }//end if\n // Captura padrão de dados inseridos nos campos dos formulários\n if (Session::getSession('inputs')) {\n $this->inputs = Session::getSession('inputs');\n Session::destroySession('inputs');\n }//endif\n }",
"function __construct(){\n\t\t\trequire_once 'config.php';\n\t\t\t\n\t\t\t/*\n\t\t\t$this->session = array(\n\t\t\t\t'isLoged'=>BaseCtrl::isLoged(),\n\t\t\t\t'user'=>isset($_SESSION['user'])?$_SESSION['user']:NULL,\n\t\t\t\t'IDEmpleado' => isset($_SESSION['IDEmpleado'])?$_SESSION['IDEmpleado']:NULL,\n\t\t\t\t'controller'=>isset($_GET['ctrl'])?$_GET['ctrl']:'index',\n\t\t\t\t'action'=>'',\n\t\t\t);\n\t\t\t*/\n\n\t\t}",
"public function __construct() {\n\t\tself::_sess_init();\n\t}",
"private function mkNew()\n\t{\n\t\tdo\n\t\t{\n\t\t\t$this->id = md5\n\t\t\t(\n\t\t\t\tuniqid(microtime()) . $_SERVER['REMOTE_ADDR']\n\t\t\t\t\t. $_SERVER['HTTP_USER_AGENT']\n\t\t\t);\n\n\t\t\t$this->filename = ini_get('session.save_path')\n\t\t\t\t. '/SuckLess_' . $this->name . '.' . $this->id;\n\t\t}\n\t\twhile(file_exists($this->filename));\n\n\t\t$this->data = array();\n\t}",
"public function __construct()\n {\n if (!session_id()) {\n session_start();\n }\n }",
"public function createContextSession();",
"static function init(){\r\n\t\t//Create the session authentication controller and internal data storage\r\n\t\tif(!static::$auth){\r\n\t\t\tstatic::$auth = new Authenticator();\r\n\t\t\tstatic::$data = new Internal();\r\n\t\t}\r\n\t\t\r\n\t\t//Initialize supplied modules\r\n\t\tforeach(func_get_args() as $arg){\r\n\t\t\tif($arg instanceof ISessionStorage){\r\n\t\t\t\tstatic::$data = $arg;\r\n\t\t\t}elseif($arg instanceof ISessionExtra){\r\n\t\t\t\tstatic::$extra[get_class($arg)] = $arg;\r\n\t\t\t}elseif($arg instanceof IAuthenticator){\r\n\t\t\t\tstatic::$auth->setAuthenticator($arg);\r\n\t\t\t}elseif($arg instanceof ISessionSource){\r\n\t\t\t\tstatic::$auth->setSource($arg);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private function initSession()\n {\n // Start the session\n session_start();\n\n // Create session id constant\n define('SID', session_id());\n }",
"public function __construct()\n {\n if(!session_id()) {\n session_start();\n }\n }",
"function __construct(){\n session_start();\n if(isset($_SESSION[\"user\"])){\n if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) {\n //Destruyo la session despues de inactividad por determinado tiempo y vuelvo al login\n $this->logout();\n }\n $_SESSION['LAST_ACTIVITY'] = time(); //Actualizo el último instante de actividad\n }else{\n header(LOGIN);\n }\n }",
"protected function initSession()\n {\n $this->di->setShared('session', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $adapter = '\\Phalcon\\Session\\Adapter\\\\' . $config->get('session')->adapter;\n\n /** @var \\Phalcon\\Session\\AdapterInterface $session */\n $session = new $adapter;\n $session->start();\n\n return $session;\n });\n }",
"function __construct() {\n\t\tkataMakeTmpPath('sessions');\n\t}",
"public function __construct() {\n parent::__construct();\n \n $this->session = Session::instance();\n $this->auth = Auth::instance();\n \n if ($this->auth->logged_in() OR $this->auth->auto_login() == TRUE) {\n //logged in\n //that's all right\n Wi3::$user = $this->auth->get_user();\n Wi3::$site = Wi3::$user->sites[0];\n //set cache-addendum\n Wi3::$cache->page_addendums[\"wi3_login_userid\"] = Wi3::$user->id;\n //opnieuw URLs en PATHs uitzoeken\n Wi3::$urlof = new Wi3_urlof();\n Wi3::$pathof = new Wi3_pathof();\n $this->session->set(\"userid\", Wi3::$user->id);\n $this->session->set(\"sitefolder\", Wi3::$pathof->site); //set this for use by for example the Tinymce advimage plugin\n } else {\n if (url::current() != \"login/login\") {\n //set this page as 'last requested' and redirect to login-page\n $this->session->set(\"requested_url\",\"/\".url::current());\n url::redirect(\"login/login\"); //redirect to login-page\n } else {\n //we're already on the login-page (maybe even with a POST), so no redirect necessary!\n }\n }\n \n //create template \n //edit: use Template_Controller instead\n //$this->template = new View($this->template);\n \n //add a Profiler for extra debug information if you want\n //$profiler = new Profiler();\n \n }",
"public function _construct(){\n $lb_request_id = 0;\n if (isset($_SESSION['LB_Session_RequestId']))\n {\n if($_SESSION['LB_Session_RequestId'] > 0)\n {\n $lb_request_id = $_SESSION['LB_Session_RequestId'];\n }\n }\n if(empty($lb_request_id)){\n $clientId = Mage::getStoreConfig('lbconfig_section/lb_settings_group/client_id_field');\n $lb_request_id = Lb_Points_Helper_Data::getLbRequestId($clientId);\n $_SESSION['LB_Session_RequestId'] = $lb_request_id;\n }\n Lb_Points_Helper_Data::init($lb_request_id);\n //Lb_Points_Helper_Data::init();\n }",
"public function __construct(){\n\t\tparent::__construct();\n\t\t$this->_checkSession();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$data['title'] = 'My Rownds';\n\t\t$data['email'] = app::session('email');\n\t\t$data['allow_public'] = app::session('allow_public');\n\t\t$data['private_key'] = app::session('private_ley');\n\t\t$data['user_id'] = app::session('id');\n\t\t$this->load->vars($data);\n\t}",
"protected function initSession() {\n\t\tSession::init($this);\n\t}",
"protected function _initSession()\n\t{\n\t\t$sessionConfig = Zend_Registry::get('config')->session;\n \tZend_Session::setOptions($sessionConfig->toArray());\n\t\t$session = new Zend_Session_Namespace('crm', true);\n\t\treturn $session;\n\t}",
"public function __construct()\n {\n if(!Session::isDestroyed()){\n $this->historial = new SessionNamespace('historial');\n }\n\n //si existe guardo desde el comienzo para que este disponible a lo largo de la ejecucion del request\n if(isset($this->historial->request_uri)){\n self::$lastRequestUri = $this->historial->request_uri;\n }\n }",
"function init()\r\n\t{\r\n\t\t$projet = unserialize($_SESSION['session']->projet);\r\n\t\t$this->view->nom_complet = $projet->nom_complet;\r\n\t\t$this->view->desc_projet = $projet->description_projet;\r\n\t\t$this->view->employe = unserialize($_SESSION['session']->account)->account_lid;\r\n\t}",
"protected function _postConstruct()\n {\n parent::_postConstruct();\n\n $this->_manager = Solar::dependency(\n 'Solar_Session_Manager',\n $this->_config['manager']\n );\n \n // Add ourselves to the session manager's list to receive updates\n $this->_manager->addSession($this);\n \n // determine the storage segment; use trim() and strict-equals to \n // allow for string zero segment names.\n $segment = is_null($this->_config['class']) ? $this->_config['segment'] : $this->_config['class'];\n $segment = trim($segment);\n if ($segment === '') {\n $segment = 'Solar';\n }\n \n // set the class\n $this->setSegment($segment);\n \n // lazy-start any existing session\n $this->lazyStart();\n }",
"function __construct() {\n parent::__construct();\n session_start();\n }",
"function __construct() {\n parent::__construct();\n session_start();\n }",
"function __construct() {\n\t\t\tsession_start();\n\t\t\t$this->check_login();\n\t\t}",
"function __construct()\r\n {\r\n $this->oSLivParms = new SeedLivingParms();\r\n\r\n list($this->kfdb1, $this->sess, $this->lang) = SiteStartSessionAccountNoUI(); // no perms required, right?\r\n\r\n // from SiteKFDB - not sure if adding other constants (e.g. SiteKFDB_DB_seedliving) to the case statements will break that code if constants not defined\r\n if( !($this->kfdb = new KeyFrameDB( \"localhost\", SiteKFDB_USERID_seedliving, SiteKFDB_PASSWORD_seedliving )) ||\r\n !($this->kfdb->Connect( SiteKFDB_DB_seedliving )) )\r\n {\r\n die( \"Cannot connect to SeedLiving database\" );\r\n }\r\n\r\n //$this->kfdb1->SetDebug(1);\r\n //$this->kfdb->SetDebug(1);\r\n\r\n $this->oTmpl = new SLivTemplate( $this );\r\n $this->oBasket = new SLiv_Basket( $this ); // depends on oTmpl to set up the SEEDSession UI\r\n $this->oSeeds = new SLiv_Seeds( $this ); // depends on oTmpl to set up the SEEDSession UI\r\n $this->oUser = new SLiv_Users( $this ); // depends on oTmpl to set up the SEEDSession UI\r\n $this->oDocRepDB = New_DocRepDB_WithMyPerms( $this->kfdb1, $this->oUser->GetUID(), array('bReadonly'=>true) );\r\n\r\n // keep session state stuff here\r\n $this->oSVA = new SEEDSessionVarAccessor( $this->sess, \"seedliving\" );\r\n }",
"protected function __construct($name)\n {\n $db_file = (($_SERVER['DOCUMENT_ROOT'] == \"\")? dirname(__FILE__) : $_SERVER['DOCUMENT_ROOT']).'/session.db';\n\n if(defined('SESSION_DB_FILE')) {\n $db_file = SESSION_DB_FILE;\n }\n\n if(defined('SESSION_MAX_AGE')) {\n $this->max_age = SESSION_MAX_AGE;\n }\n\n // Do we create the schema?\n $create = true;\n if(!file_exists($db_file)) {\n $create = true;\n }\n $this->db = new SQLite3($db_file);\n\n $this->container = $this->db->escapeString($name);\n\n if($create) { // Creating the session schema.\n $this->db->exec('CREATE TABLE IF NOT EXISTS sessions(hash VARCHAR(64) PRIMARY KEY, timestamp INTEGER)');\n $this->db->exec(\n 'CREATE TABLE IF NOT EXISTS session_containers('.\n 'id INTEGER PRIMARY KEY AUTOINCREMENT, '.\n 'hash VARCHAR(64) REFERENCES sessions(hash) ON DELETE CASCADE, '.\n 'name VARCHAR(128))'\n );\n $this->db->exec(\n 'CREATE TABLE IF NOT EXISTS session_vars('.\n 'container INTEGER REFERENCES session_containers(id) ON DELETE CASCADE, '.\n 'name VARCHAR(128), '.\n 'value TEXT)'\n );\n }\n\n if(self::$sid == null && isset($_COOKIE['PHPFASTSESSID'])) {\n $sessid = $this->db->escapeString($_COOKIE['PHPFASTSESSID']);\n $session = $this->db->querySingle('SELECT * FROM sessions WHERE hash=\"'.$sessid.'\"', true);\n\n if(count($session) == 0) {\n $this->regenerate();\n }\n else if($session['timestamp'] + $this->max_age < time()) {\n echo 'expired! ' . ($session['timestamp'] + $this->max_age) . ' < ' . time();\n $sql = 'DELETE FROM sessions WHERE hash=\"'.$sessid.'\"';\n echo $sql;\n $this->db->exec($sql);\n $this->regenerate();\n }\n else {\n self::$sid = $sessid;\n }\n }\n else if(self::$sid == null) {\n $this->regenerate();\n }\n\n // Does the container exist?\n $num_container = $this->db->querySingle('SELECT id FROM session_containers WHERE hash=\"'.self::$sid.'\" AND name=\"'.$this->container.'\"');\n if(!$num_container) {\n $this->db->exec('INSERT INTO session_containers(hash, name) VALUES(\"'.self::$sid.'\", \"'.$this->container.'\")');\n $this->container_id = $this->db->lastInsertRowID();\n\n // fallback...\n if(!$this->container_id) {\n $this->container_id = $this->db->querySingle('SELECT id FROM session_containers WHERE hash=\"'.self::$sid.'\" AND name=\"'.$this->container.'\"');\n }\n } else {\n $this->container_id = $this->db->escapeString($num_container);\n }\n }",
"public function __construct() {\n global $conn;\n $this->connection = $conn;\n $this->time = time();\n $this->startSession();\n }",
"public function __construct() {\n //no session under cli\n if (php_sapi_name() === 'cli') {\n return false;\n }\n\n //100 minutes expire time , php default value is 180\n session_cache_expire(100);\n session_start();\n session_regenerate_id(TRUE); //每次从新加载都会产生一个新的session id\n int_set(\"session.use_only_cookies\", 1); //表示只使用cookies存放session id,这可以避免session固定攻击\n }",
"public function __construct(){\n\t\t// Démarre la session\n\t\t@session_start();\n\t\t\n\t\t// Récupère les clés du tableau de session\n\t\t$this->keys = array_keys($_SESSION);\n\t}",
"function __construct() {\n parent::__construct();\n $this->id = $this->getUserID(Session::get('user'));\n $this->FirstName = $this->getUserFirstName($this->id);\n $this->email = $_SESSION['user'];\n }",
"public function __construct()\n {\n $this->prefix = config('app.session_prefix');\n\n if (session_status() !== PHP_SESSION_ACTIVE) {\n $this->started = session_start();\n }\n session_regenerate_id(true);\n }",
"function session_begin()\n\t{\n\t\t// Get user information\n\t\t$this->time_now\t\t\t\t= time();\n\t\t$this->cookie_data\t\t\t= array('u' => 0, 'k' => '');\n\t\t$this->update_session_page\t= $update_session_page;\n\t\t$this->browser\t\t\t\t= $request->header('User-Agent');\n\t\t$this->referer\t\t\t\t= $request->header('Referer');\n\t\t$this->forwarded_for\t\t= $request->header('X-Forwarded-For');\n\n\t\treturn $this->session_create();\n\t}",
"private function init()\n\t{\n\t\tif (!$this->CI->session->userdata(AUTH_AFFILIATION_ARRAY))\n\t\t{\n\t\t\t$this->CI->session->set_userdata(AUTH_AFFILIATION_ARRAY, array());\n\t\t}\n\t\t\n\t\tif (!$this->CI->session->userdata(AUTH_FUNCTION_ARRAY))\n\t\t{\n\t\t\t$this->CI->session->set_userdata(AUTH_FUNCTION_ARRAY, array(AUTH_FUNCTION_DEFAULT_ATTRIBUTE));\n\t\t}\n\t\t\n\t\t// Copy to the local variable to avoid repeat access!\n\t\t$this->functions = $this->CI->session->userdata(AUTH_FUNCTION_ARRAY);\n\t\t$this->affiliations = $this->CI->session->userdata(AUTH_AFFILIATION_ARRAY);\n\t}",
"function __construct($account=\"\"){\n // $this->load->helper('url');\n $this->account = $account;\n\n $CI = & get_instance();\n if($this->account!=\"\"){ \n $CI->session->set_userdata('user', array(\"class\"=>get_class($this), \"data\"=>serialize($this)));\n }\n\n }",
"public function setup_session(){\n if(!(isset($_SESSION))){\n session_start();\n }\n\n $_SESSION['user_id'] = $this->user_id;\n $_SESSION['name'] = $this->firstname;\n\n //Remove anon flag\n if(isset($_SESSION['anon'])){\n unset($_SESSION['anon']);\n }\n\n }",
"function session_create()\n\t{\n\t\t$this->data = array();\n\t\treturn true;\n\t}",
"private function __construct()\n\t{\n App::session();\n \n App::setting();\n \n\t\t//get and create constant for project db driver\n\t\tLoader::loadClass('Common_DB_Model');\n \n\t\tApp::request();\n \n\t\tApp::user();\n\t}",
"function __construct() {\n parent::__construct();\n $this->data = array();\n $this->data['title'] = ''; // our default title\n $this->errors = array();\n $this->data['pageTitle'] = 'welcome'; // our default page\n \n if(!isset($_SESSION['defaultToggles']))\n {\n $_SESSION['defaultToggles'] = '1';\n $_SESSION['order'] = 'playerLastName';\n $_SESSION['layout'] = 'table';\n $_SESSION['edit'] = 'editOff';\n }\n }",
"public function getSession() {}",
"public static function init()\n {\n $authentic = false;\n\n if (($memno = array_get($_SESSION, 'camra_auth_memno', ''))) {\n $authentic = true;\n }\n\n return new static($memno, $authentic);\n }",
"function __construct() {\n if (session_status() == PHP_SESSION_NONE || session_id() == '') { session_start();\t}\n # check existing login\n $this->_checkLogin();\n }",
"public function __construct()\n {\n $this->sessionKey = \"WebsiteUserManager\";\n }"
] | [
"0.71987313",
"0.68522227",
"0.68478286",
"0.66913664",
"0.6658467",
"0.665356",
"0.663392",
"0.6587899",
"0.6538324",
"0.6525835",
"0.65178853",
"0.6484138",
"0.6458319",
"0.64573425",
"0.64187515",
"0.6393522",
"0.6387542",
"0.63779044",
"0.63664305",
"0.6348507",
"0.6312979",
"0.63102955",
"0.6308064",
"0.63020813",
"0.6301347",
"0.6286257",
"0.6271287",
"0.6261314",
"0.6249626",
"0.62329805",
"0.62122506",
"0.6200868",
"0.61997265",
"0.6186345",
"0.6178928",
"0.6178192",
"0.6159571",
"0.61586726",
"0.6153287",
"0.61416143",
"0.61373717",
"0.61371875",
"0.6136928",
"0.61317766",
"0.61307",
"0.61159146",
"0.61112064",
"0.610817",
"0.6100368",
"0.6099387",
"0.6095986",
"0.6087053",
"0.60853064",
"0.6084569",
"0.607667",
"0.60677934",
"0.6061262",
"0.6051327",
"0.60499287",
"0.60472226",
"0.6043993",
"0.60309863",
"0.60296786",
"0.602502",
"0.6020206",
"0.6017837",
"0.60163057",
"0.6014726",
"0.6005978",
"0.60042477",
"0.60023135",
"0.5993263",
"0.59898204",
"0.5989403",
"0.5988191",
"0.5980974",
"0.5980242",
"0.59781045",
"0.59683746",
"0.5965172",
"0.5963907",
"0.5963907",
"0.596045",
"0.5958873",
"0.59409267",
"0.59408367",
"0.5939223",
"0.5936226",
"0.59315884",
"0.5927775",
"0.59256756",
"0.59214467",
"0.5921038",
"0.5914899",
"0.5914811",
"0.5909733",
"0.5909494",
"0.5909132",
"0.59080994",
"0.5895269",
"0.58931166"
] | 0.0 | -1 |
Returns DB table name for entity | public static function getTableName()
{
return 'b_report_visual_report_widget';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }",
"public static function getTableName()\n\t{\n\t\treturn 'b_timeman_monitor_entity';\n\t}",
"public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }",
"public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }",
"protected function getTableName(): string {\n return self::TABLE_NAME;\n }",
"public function getTable($entityName)\n {\n $tableName = '';\n //echo $entityName. '<br/>';\n\n if (strpos($entityName, '/')) {\n $modelEntity = $entityName;\n $tableName = $this->_resources->getTableName($modelEntity);\n }\n else if( !empty($this->_resourceModel) ) {\n $entityName = sprintf('%s/%s', $this->_resourceModel, $entityName);\n $tableName = $this->_resources->getTableName($entityName);\n }\n else {\n $tableName = $entityName;\n }\n\n return $tableName;\n }",
"private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }",
"function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}",
"public function get_table_name(){\n return $this->table_name();\n }",
"function getTableName(): string;",
"public function getTableName(): string;",
"public function getTableName(): string;",
"public function get_table_name()\n {\n return $this->prefix . $this->table;\n }",
"public function getTableName() ;",
"public static function table()\n\t{\n\t\treturn self::em()->getRepository(static::class)->getMetadata()->getTable();\n\t}",
"public function getTableName() {}",
"public function getTableName() {}",
"public function getTableName()\n {\n return $this->__get(\"table_name\");\n }",
"public function getTableName();",
"public function getTableName();",
"public static function getTableName()\n {\n $type = static::getType();\n return $type::getTableName();\n }",
"public static function getTableName()\n\t{\n\t\treturn 'b_sale_entity_marker';\n\t}",
"public static function get_table_name()\n {\n return self::TABLE_NAME;\n }",
"public static function getTableName(){\n\t\treturn self::$table_name;\n\t}",
"public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }",
"function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }",
"public function getTableName():string;",
"protected function table () : string {\n return $this->guessName();\n }",
"protected function table(): string\n {\n return $this->tableName;\n }",
"public function getTableName() {\n\t\treturn $this -> _name;\n\t}",
"abstract public function getTableName();",
"abstract public function getTableName();",
"abstract public function getTableName();",
"abstract public static function getTableName();",
"abstract public static function getTableName();",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public function getTableName() : string\n {\n if ($this->tableName !== null) {\n return $this->tableName;\n }\n\n return $this->reflectionClass->getShortName();\n }",
"public static function getTableName() {\n return self::$tableName;\n }",
"public function get_table_name() {\n return $this->table_name;\n }",
"public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }",
"public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}",
"public function getTableName(){\r\n\t\treturn strtolower(get_class($this));\r\n\t}",
"protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }",
"public static function table_name() {\n $table_name = strtolower(get_called_class());\n\n if (!in_array($table_name, ApplicationSql::tablenames()))\n throw new TableNotFoundException(\"Veritabanında böyle bir tablo mevcut değil\", $table_name);\n\n return $table_name;\n }",
"function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}",
"public static function get_db_table_name(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_db_table_name();\n }",
"public function getTableName() {\n return $this->mapping['table'];\n }",
"public static function getTableName()\n {\n return ((new self)->getTable());\n }",
"private function setTableName()\n {\n // Get table name from name of entity if not defined\n if (!$this->tableName) {\n $path = explode('\\\\', get_class($entity));\n $this->tableName = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', array_pop($path))).'s';\n }\n\n // Set table to be used\n $this->adapter->setTable($this->tableName);\n }",
"abstract protected function getTableName();",
"abstract protected function getTableName();",
"public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}",
"public static function tablename() {\n return self::TABLE;\n }",
"public function tableName()\n\t{\n\t\treturn '{{'.$this->getTableName().'}}';\n\t}",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }",
"public function getTableName( )\n {\n return $this->table_name;\n }",
"public function getTable(): string\n {\n return $this->prefix . $this->table;\n }",
"public function table_name ()\n {\n return $this->app->table_names->entries;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}",
"public function getEntityName(SchemaTable $table) {\n\t\t$dbName = $table->getDatabase()->getDatabaseName();\n\t\t$tableName = $table->getTableName();\n\t\t\n\t\t// Check if a custom entity name is set via the configuration, if not, then use strip_table_name_prefixes option.\n\t\t$entityName = $this->getConfigValue('entity_name', $dbName, $tableName, CoughConfig::SCOPE_TABLE);\n\t\tif (is_null($entityName)) {\n\t\t\t// If a prefix exists in the table name, remove it\n\t\t\t$prefixes = $this->getConfigValue('class_names/strip_table_name_prefixes', $dbName, $tableName);\n\t\t\t$entityName = $this->getTableNameWithoutPrefix($tableName, $prefixes);\n\t\t}\n\t\t\n\t\treturn $entityName;\n\t}",
"public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n return camel_case_to_underscore(get_class($this));\n }\n }",
"public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}",
"public function getTblName()\n {\n return $this->tbl_name;\n }",
"public function getTableName()\r\n {\r\n return $this->tableName;\r\n }",
"private function getTableName()\n {\n $class = get_class($this);\n\n $mem = new Cache();\n if ($tableName = $mem->get($class . '-table-name')) {\n return $tableName;\n }\n\n $break = explode('\\\\', $class);\n $ObjectName = end($break);\n $className = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $ObjectName));\n $tableName = Inflect::pluralize($className);\n\n $mem->add($class . '-table-name', $tableName, 1440);\n\n return $tableName;\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public static function getTableName()\n {\n return static::getConfig()[self::CONFIG_TABLE_NAME];\n }",
"public static function getTableName()\n\t{\n\t\t//called from users, keyword self:: returns model\n\t\t// return self::$table;\n\t\t//called from users, keyword static:: returns users\n\t\treturn static::$table;\n\t}",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}",
"public function getTableName() {\n\t\t$dbName = empty($this->_dbName) ? '' : ($this->_dbName . '.');\n\t\t$tableName = $dbName . $this->_tableName;\n\t\treturn ($tableName);\n\t}",
"public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}",
"public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}",
"protected static function get_table_name() {\n return null;\n }",
"function getItemTableName() ;",
"private static function getFullyQualifiedTableName() {\n $database_name = static::getDatabaseName();\n $table_name = static::getTableName();\n return static::genFullyQualifiedTableName($database_name, $table_name);\n }",
"public function getTable()\n\t{\n\t\treturn empty($this->table) ? $this->table = Db_Inflector::pluralize($this->getSingular()) : $this->table;\n\t}",
"public function dataTableName()\n {\n $tableName = 'pd2_' . Utils::normalizeString($this->product()->name)\n . '__' . Utils::normalizeString($this->name);\n return strtolower($tableName);\n }",
"public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }",
"function getTableName() {\n return $this->tableName;\n }",
"public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}",
"public function getTable(): string\n {\n return $this->table;\n }",
"public function getTable(): string\n {\n return $this->table;\n }",
"public function getTable() {\n if ( isset( $this->table ) ) {\n return $this->table;\n }\n\n $table = str_replace( '\\\\', '', snake_case( str_plural( class_basename( $this ) ) ) );\n\n return $this->getConnection()->db->prefix . $table ;\n }",
"function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}",
"public function getTableName(){\n\t\treturn $this->tableName;\n\t}",
"protected function getDoctrineTable()\n {\n return Doctrine::getTable($this->getOption('model'));\n }",
"public function getTableName(){\n\t\treturn $this->_table;\n\t}",
"public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }",
"public function getTableName() {\n\t\treturn $this->tableName;\n\t}",
"public function getTableName() {\n\t\treturn $this->tableName;\n\t}",
"public function getTable(): string\n {\n return $this->_table;\n }"
] | [
"0.8198709",
"0.78227067",
"0.7774555",
"0.77489454",
"0.7628899",
"0.7624275",
"0.7600482",
"0.75954634",
"0.7568148",
"0.7560134",
"0.7534309",
"0.7534309",
"0.75264937",
"0.7522785",
"0.751881",
"0.7515723",
"0.7515723",
"0.750556",
"0.7502512",
"0.7502512",
"0.7499902",
"0.7461512",
"0.7442388",
"0.7412329",
"0.7411051",
"0.7400643",
"0.73757416",
"0.7369914",
"0.73631936",
"0.7359352",
"0.73527914",
"0.73527914",
"0.73527914",
"0.7350572",
"0.7350572",
"0.7348005",
"0.7348005",
"0.7348005",
"0.73393524",
"0.7322026",
"0.73069054",
"0.7299787",
"0.7296112",
"0.72955704",
"0.72942907",
"0.7267119",
"0.7266666",
"0.7264479",
"0.72548306",
"0.72510296",
"0.72508955",
"0.72486585",
"0.72486585",
"0.72391504",
"0.72374755",
"0.72327894",
"0.7231238",
"0.7221293",
"0.721758",
"0.7217344",
"0.7216956",
"0.7209766",
"0.7209766",
"0.7209766",
"0.7209766",
"0.72097486",
"0.7205864",
"0.7203369",
"0.7198239",
"0.7192462",
"0.71839297",
"0.71767765",
"0.71758324",
"0.7172578",
"0.7161782",
"0.71613324",
"0.71613324",
"0.71613324",
"0.71516377",
"0.71495533",
"0.71370053",
"0.7135459",
"0.71325433",
"0.7123762",
"0.7115509",
"0.71126044",
"0.71124923",
"0.7110368",
"0.71044207",
"0.7098514",
"0.7089928",
"0.7089928",
"0.7084689",
"0.70808095",
"0.70785016",
"0.70778537",
"0.70724046",
"0.70693225",
"0.7068522",
"0.7068522",
"0.7067208"
] | 0.0 | -1 |
Returns entity map definition. To get initialized fields. | public static function getMap()
{
return array(
new IntegerField(
'ID', array(
'primary' => true,
'autocomplete' => true,
)
),
new StringField('GID'),
new StringField('BOARD_ID'),
new IntegerField('DASHBOARD_ROW_ID'),
new IntegerField('PARENT_WIDGET_ID'),
new StringField('WEIGHT'),
new StringField('CATEGORY_KEY'),
new StringField('VIEW_KEY'),
new IntegerField('OWNER_ID'),
new StringField('WIDGET_CLASS'),
new DateField('CREATED_DATE'),
new DateField('UPDATED_DATE'),
new BooleanField('IS_PATTERN'),
new ReferenceField(
'ROW',
'Bitrix\Report\VisualConstructor\Internal\DashboardRowTable',
array('=this.DASHBOARD_ROW_ID' => 'ref.ID')
),
new ReferenceField(
'PARENTWIDGET',
'Bitrix\Report\VisualConstructor\Internal\WidgetTable',
array('=this.PARENT_WIDGET_ID' => 'ref.ID')
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'ORDER_NEW_TASK' => new Entity\\StringField('ORDER_NEW_TASK', array(\n\t\t\t\t'required' => true\n\t\t\t))\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'PROFILE_ID' => new Entity\\IntegerField('PROFILE_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'PROFILE_EXEC_ID' => new Entity\\IntegerField('PROFILE_EXEC_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'DATE_EXEC' => new Entity\\DateTimeField('DATE_EXEC', array(\n\t\t\t\t'default_value' => ''\n\t\t\t)),\n\t\t\t'TYPE' => new Entity\\StringField('TYPE', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'ENTITY_ID' => new Entity\\IntegerField('ENTITY_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'FIELDS' => new Entity\\TextField('FIELDS', array()),\n\t\t\t'PROFILE' => new Entity\\ReferenceField(\n\t\t\t\t'PROFILE',\n\t\t\t\t'\\Bitrix\\EsolImportxml\\ProfileTable',\n\t\t\t\tarray('=this.PROFILE_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'PROFILE_EXEC' => new Entity\\ReferenceField(\n\t\t\t\t'PROFILE_EXEC',\n\t\t\t\t'\\Bitrix\\EsolImportxml\\ProfileExecTable',\n\t\t\t\tarray('=this.PROFILE_EXEC_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'IBLOCK_ELEMENT' => new Entity\\ReferenceField(\n\t\t\t\t'IBLOCK_ELEMENT',\n\t\t\t\t'\\Bitrix\\Iblock\\ElementTable',\n\t\t\t\tarray('=this.ENTITY_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'IBLOCK_SECTION' => new Entity\\ReferenceField(\n\t\t\t\t'IBLOCK_SECTION',\n\t\t\t\t'\\Bitrix\\Iblock\\SectionTable',\n\t\t\t\tarray('=this.ENTITY_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'NAME' => new ORM\\Fields\\StringField(\n\t\t\t\t'NAME',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tnew ORM\\Fields\\Validators\\LengthValidator(null, 50),\n\t\t\t\t\t\t];\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_NAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERCENTAGE' => new ORM\\Fields\\FloatField(\n\t\t\t\t'PERCENTAGE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_PERCENTAGE_FIELD'),\n\t\t\t\t]\n\t\t\t)\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\tarray(\n\t\t\t\t 'autocomplete' => true,\n\t\t\t\t 'primary' => true,\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\IntegerField('ORDER_ID'),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'ENTITY_TYPE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 25,\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\IntegerField('ENTITY_ID'),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'TYPE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 10,\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'CODE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 255,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateComment')\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'MESSAGE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 255,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateMessage')\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'COMMENT',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 500,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateComment')\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\IntegerField('USER_ID'),\n\n\t\t\tnew Main\\Entity\\DatetimeField(\n\t\t\t\t'DATE_CREATE'\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\DatetimeField(\n\t\t\t\t'DATE_UPDATE'\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\BooleanField(\n\t\t\t\t'SUCCESS',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 1,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateSuccess')\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n { \n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ID_FIELD'),\n ),\n 'DATE_CHANGE' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CHANGE_FIELD'),\n ),\n 'DATE_CREATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ACTIVE_FIELD'),\n ),\n 'SORT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_SORT_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateName'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_NAME_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'PARENT_CATEGORY_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_PARENT_CATEGORY_ID_FIELD'),\n ), \n );\n }",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_CHAT_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('CONNECTOR', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_MESSAGE_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t);\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_ID_FIELD'),\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validateUser'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_USER_ID_FIELD'),\n ),\n 'ELEMENT_CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateElementCode'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_ELEMENT_CODE_FIELD'),\n ),\n 'TITLE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateTitle'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_TITLE_FIELD'),\n ),\n 'PASSWORD_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validatePassword'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_PASSWORD_ID_FIELD'),\n ),\n 'APP_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validateApp'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APP_ID_FIELD'),\n ),\n 'SCOPE' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_SCOPE_FIELD'),\n ),\n 'QUERY' => array(\n 'data_type' => 'text',\n 'serialized' => true,\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_QUERY_FIELD'),\n ),\n 'OUTGOING_EVENTS' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_EVENTS_FIELD'),\n ),\n 'OUTGOING_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateOutgoingQueryNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_NEEDED_FIELD'),\n ),\n 'OUTGOING_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateOutgoingHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_HANDLER_URL_FIELD'),\n ),\n 'WIDGET_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateWidgetNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_NEEDED_FIELD'),\n ),\n 'WIDGET_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateWidgetHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_HANDLER_URL_FIELD'),\n ),\n 'WIDGET_LIST' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_LIST_FIELD'),\n ),\n 'APPLICATION_TOKEN' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationToken'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_TOKEN_FIELD'),\n ),\n 'APPLICATION_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_NEEDED_FIELD'),\n ),\n 'APPLICATION_ONLY_API' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationOnlyApi'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_ONLY_API_FIELD'),\n ),\n 'BOT_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_BOT_ID_FIELD'),\n ),\n 'BOT_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateBotHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_BOT_HANDLER_URL_FIELD'),\n ),\n 'USER' => new ReferenceField(\n 'USER',\n '\\Bitrix\\Main\\UserTable',\n array('=this.USER_ID' => 'ref.ID')\n ),\n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew Main\\Entity\\IntegerField('TEMPLATE_ID', [\n\t\t\t\t'primary' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('PROVIDER', [\n\t\t\t\t'primary' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\ReferenceField('TEMPLATE', '\\Bitrix\\DocumentGenerator\\Model\\Template',\n\t\t\t\t['=this.TEMPLATE_ID' => 'ref.ID']\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ID_FIELD')\n\t\t\t)),\n\t\t\t'XML_ID' => new Main\\Entity\\StringField('XML_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateXmlId'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_XML_ID_FIELD')\n\t\t\t)),\n\t\t\t'SITE_ID' => new Main\\Entity\\StringField('SITE_ID', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_SITE_ID_FIELD')\n\t\t\t)),\n\t\t\t'TYPE' => new Main\\Entity\\IntegerField('TYPE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => self::TYPE_DISCOUNT,\n\t\t\t\t'validation' => array(__CLASS__, 'validateType'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_TYPE_FIELD')\n\t\t\t)),\n\t\t\t'ACTIVE' => new Main\\Entity\\BooleanField('ACTIVE', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'Y',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ACTIVE_FIELD')\n\t\t\t)),\n\t\t\t'ACTIVE_FROM' => new Main\\Entity\\DatetimeField('ACTIVE_FROM', array(\n\t\t\t\t'default_value' => null,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ACTIVE_FROM_FIELD')\n\t\t\t)),\n\t\t\t'ACTIVE_TO' => new Main\\Entity\\DatetimeField('ACTIVE_TO', array(\n\t\t\t\t'default_value' => null,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ACTIVE_TO_FIELD')\n\t\t\t)),\n\t\t\t'RENEWAL' => new Main\\Entity\\BooleanField('RENEWAL', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'N',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_RENEWAL_FIELD')\n\t\t\t)),\n\t\t\t'NAME' => new Main\\Entity\\StringField('NAME', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateName'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_NAME_FIELD')\n\t\t\t)),\n\t\t\t'SORT' => new Main\\Entity\\IntegerField('SORT', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_SORT_FIELD')\n\t\t\t)),\n\t\t\t'MAX_DISCOUNT' => new Main\\Entity\\FloatField('MAX_DISCOUNT', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_MAX_DISCOUNT_FIELD')\n\t\t\t)),\n\t\t\t'VALUE_TYPE' => new Main\\Entity\\EnumField('VALUE_TYPE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'values' => array(self::VALUE_TYPE_PERCENT, self::VALUE_TYPE_FIX, self::VALUE_TYPE_SALE),\n\t\t\t\t'default_value' => self::VALUE_TYPE_PERCENT,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_VALUE_TYPE_FIELD')\n\t\t\t)),\n\t\t\t'VALUE' => new Main\\Entity\\FloatField('VALUE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_VALUE_FIELD')\n\t\t\t)),\n\t\t\t'CURRENCY' => new Main\\Entity\\StringField('CURRENCY', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateCurrency'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_CURRENCY_FIELD')\n\t\t\t)),\n\t\t\t'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new Main\\Type\\DateTime();\n\t\t\t\t\t},\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_TIMESTAMP_X_FIELD')\n\t\t\t)),\n\t\t\t'COUNT_PERIOD' => new Main\\Entity\\EnumField('COUNT_PERIOD', array(\n\t\t\t\t'values' => array(self::COUNT_PERIOD_TYPE_ALL, self::COUNT_PERIOD_TYPE_INTERVAL, self::COUNT_PERIOD_TYPE_PERIOD),\n\t\t\t\t'default_value' => self::COUNT_PERIOD_TYPE_ALL\n\t\t\t)),\n\t\t\t'COUNT_SIZE' => new Main\\Entity\\IntegerField('COUNT_SIZE', array(\n\t\t\t\t'default_value' => 0\n\t\t\t)),\n\t\t\t'COUNT_TYPE' => new Main\\Entity\\EnumField('COUNT_TYPE', array(\n\t\t\t\t'values' => array(self::COUNT_TYPE_SIZE_DAY, self::COUNT_TYPE_SIZE_MONTH, self::COUNT_TYPE_SIZE_YEAR),\n\t\t\t\t'default_value' => self::COUNT_TYPE_SIZE_YEAR\n\t\t\t)),\n\t\t\t'COUNT_FROM' => new Main\\Entity\\DatetimeField('COUNT_FROM', array(\n\t\t\t\t'default_value' => null\n\t\t\t)),\n\t\t\t'COUNT_TO' => new Main\\Entity\\DatetimeField('COUNT_TO', array(\n\t\t\t\t'default_value' => null\n\t\t\t)),\n\t\t\t'ACTION_SIZE' => new Main\\Entity\\IntegerField('ACTION_SIZE', array(\n\t\t\t\t'default_value' => 0\n\t\t\t)),\n\t\t\t'ACTION_TYPE' => new Main\\Entity\\EnumField('ACTION_TYPE', array(\n\t\t\t\t'values' => array(self::ACTION_TYPE_SIZE_DAY, self::ACTION_TYPE_SIZE_MONTH, self::ACTION_TYPE_SIZE_YEAR),\n\t\t\t\t'default_value' => self::ACTION_TYPE_SIZE_YEAR\n\t\t\t)),\n\t\t\t'MODIFIED_BY' => new Main\\Entity\\IntegerField('MODIFIED_BY', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_MODIFIED_BY_FIELD')\n\t\t\t)),\n\t\t\t'DATE_CREATE' => new Main\\Entity\\DatetimeField('DATE_CREATE', array(\n\t\t\t\t'default_value' => null,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_DATE_CREATE_FIELD')\n\t\t\t)),\n\t\t\t'CREATED_BY' => new Main\\Entity\\IntegerField('CREATED_BY', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_CREATED_BY_FIELD')\n\t\t\t)),\n\t\t\t'PRIORITY' => new Main\\Entity\\IntegerField('PRIORITY', array(\n\t\t\t\t'default_value' => 1,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_PRIORITY_FIELD')\n\t\t\t)),\n\t\t\t'LAST_DISCOUNT' => new Main\\Entity\\BooleanField('LAST_DISCOUNT', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'Y',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_LAST_DISCOUNT_FIELD')\n\t\t\t)),\n\t\t\t'VERSION' => new Main\\Entity\\EnumField('VERSION', array(\n\t\t\t\t'values' => array(self::OLD_VERSION, self::ACTUAL_VERSION),\n\t\t\t\t'default_value' => self::ACTUAL_VERSION\n\t\t\t)),\n\t\t\t'NOTES' => new Main\\Entity\\StringField('NOTES', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateNotes'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_NOTES_FIELD')\n\t\t\t)),\n\t\t\t'CONDITIONS' => new Main\\Entity\\TextField('CONDITIONS', array()),\n\t\t\t'CONDITIONS_LIST' => new Main\\Entity\\TextField('CONDITIONS_LIST', array(\n\t\t\t\t'serialized' => true,\n\t\t\t\t'column_name' => 'CONDITIONS',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_CONDITIONS_LIST_FIELD')\n\t\t\t)),\n\t\t\t'UNPACK' => new Main\\Entity\\TextField('UNPACK', array()),\n\t\t\t'USE_COUPONS' => new Main\\Entity\\BooleanField('USE_COUPONS', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'N',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_USE_COUPONS_FIELD')\n\t\t\t)),\n\t\t\t'SALE_ID' => new Main\\Entity\\IntegerField('SALE_ID'),\n\t\t\t'CREATED_BY_USER' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'CREATED_BY_USER',\n\t\t\t\t'\\Bitrix\\Main\\User',\n\t\t\t\tarray('=this.CREATED_BY' => 'ref.ID')\n\t\t\t),\n\t\t\t'MODIFIED_BY_USER' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'MODIFIED_BY_USER',\n\t\t\t\t'\\Bitrix\\Main\\User',\n\t\t\t\tarray('=this.MODIFIED_BY' => 'ref.ID')\n\t\t\t),\n\t\t\t'SALE_DISCOUNT' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'SALE_DISCOUNT',\n\t\t\t\t'Bitrix\\Sale\\Internals\\DiscountTable',\n\t\t\t\tarray('=this.SALE_ID' => 'ref.ID')\n\t\t\t)\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\n\t\t\t(new Fields\\IntegerField('ADDRESS_ID'))\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\StringField('ENTITY_ID'))\n\t\t\t\t->configurePrimary(true)\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(1, 100)),\n\n\t\t\t// todo: int\n\t\t\t(new Fields\\StringField('ENTITY_TYPE'))\n\t\t\t\t->configurePrimary(true)\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(1, 50)),\n\n\t\t\t// Ref\n\n\t\t\t(new Fields\\Relations\\Reference('ADDRESS', AddressTable::class,\n\t\t\t\tJoin::on('this.ADDRESS_ID', 'ref.ID')))\n\t\t\t\t->configureJoinType('inner')\n\t\t];\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ID_FIELD'),\n ),\n 'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n 'default_value' => new Main\\Type\\DateTime(),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_TIMESTAMP_X_FIELD'),\n )),\n 'LID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateLid'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_LID_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ACTIVE_FIELD'),\n ),\n 'BONUS' => array(\n 'data_type' => 'float',\n 'required' => true,\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_BONUS_FIELD'),\n ),\n 'USERID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_USERID_FIELD'),\n ),\n 'ACTIVE_FROM' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ACTIVE_FROM_FIELD'),\n ),\n 'ACTIVE_TO' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ACTIVE_TO_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_NAME_FIELD'),\n ),\n 'PROMOCODE' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validatePromocode'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_PROMOCODE_FIELD'),\n ),\n 'DOMAINE' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDomaine'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_DOMAINE_FIELD'),\n ),\n 'URL' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_URL_FIELD'),\n ),\n 'COMMISIA' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_COMMISIA_FIELD'),\n ),\n 'COMMISIAPROMO' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_COMMISIAPROMO_FIELD'),\n ),\n );\n }",
"public static function getMap()\n {\n return [\n 'ID' => [\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ID_FIELD'),\n ],\n 'STEP' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ITEMS_STEP_FIELD'),\n ],\n 'STATUS' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_STATUS_FIELD'),\n ],\n 'ITEMS_PER_STEP' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ITEMS_PER_STEP_FIELD'),\n ],\n 'CREATED' => [\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_CREATED_FIELD'),\n ],\n ];\n }",
"public function getMapping() {}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'STORE_ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'STORE_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_STORE_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PRODUCT_ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'PRODUCT_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_PRODUCT_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'AMOUNT' => new ORM\\Fields\\FloatField(\n\t\t\t\t'AMOUNT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_AMOUNT_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'QUANTITY_RESERVED' => new ORM\\Fields\\FloatField(\n\t\t\t\t'QUANTITY_RESERVED',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_QUANTITY_RESERVED_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'STORE' => new ORM\\Fields\\Relations\\Reference(\n\t\t\t\t'STORE',\n\t\t\t\tStoreTable::class,\n\t\t\t\tORM\\Query\\Join::on('this.STORE_ID', 'ref.ID')\n\t\t\t),\n\t\t\t'PRODUCT' => new ORM\\Fields\\Relations\\Reference(\n\t\t\t\t'PRODUCT',\n\t\t\t\tProductTable::class,\n\t\t\t\tORM\\Query\\Join::on('this.PRODUCT_ID', 'ref.ID')\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'TIMESTAMP_X' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => false,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_TIMESTAMP_X_FIELD'),\n\t\t\t),\n\t\t\t'EVENT' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_EVENT_FIELD'),\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_ID_FIELD'),\n ),\n 'LID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateLid'),\n 'title' => Loc::getMessage('BASKET_ENTITY_LID_FIELD'),\n ),\n 'DATATIME_INSERT' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_DATATIME_INSERT_FIELD'),\n ),\n 'DATATIME_UPDATE' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_DATATIME_UPDATE_FIELD'),\n ),\n 'ORDER_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_ORDER_ID_FIELD'),\n ),\n 'PRODUCT_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_PRODUCT_ID_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n\n 'title' => Loc::getMessage('BASKET_ENTITY_NAME_FIELD'),\n ),\n 'PRICE' => array(\n 'data_type' => 'float',\n\n 'title' => Loc::getMessage('BASKET_ENTITY_PRICE_FIELD'),\n ),\n 'PRICEOLD' => array(\n 'data_type' => 'float',\n\n 'title' => Loc::getMessage('BASKET_ENTITY_PRICEOLD_FIELD'),\n ),\n 'OWNER_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_OWNER_ID_FIELD'),\n ),\n 'QUANTITY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_QUANTITY_FIELD'),\n ),\n 'XML_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateXmlId'),\n 'title' => Loc::getMessage('BASKET_ENTITY_XML_ID_FIELD'),\n ),\n 'PROPERTY' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('BASKET_ENTITY_PROPERTY_FIELD'),\n 'serialized' => true\n ),\n 'DELAY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_DELAY_FIELD'),\n ),\n 'DETAIL_PAGE_URL' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('BASKET_ENTITY_DETAIL_PAGE_URL_FIELD'),\n ),\n 'PICTURE' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_PICTURE_FIELD'),\n ),\n );\n }",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'TIMESTAMP_X' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_TIMESTAMP_X_FIELD'),\n\t\t\t),\n\t\t\t'LID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateLid'),\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_LID_FIELD'),\n\t\t\t),\n\t\t\t'ACTIVE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_ACTIVE_FIELD'),\n\t\t\t),\n\t\t\t'USERID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_USERID_FIELD'),\n\t\t\t),\n\t\t\t'DEFAULTBONUS' => array(\n\t\t\t\t'data_type' => 'float',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_DEFAULTBONUS_FIELD'),\n\t\t\t),\n\t\t\t'BONUSACCOUNTS' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_BONUSACCOUNTS_FIELD'),\n\t\t\t),\n\t\t\t'NUM' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateNum'),\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_NUM_FIELD'),\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateType'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TYPE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TITLE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateTitle'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TITLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'PUBLIC_CODE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePublicCode'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_PUBLIC_CODE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew Main\\Entity\\IntegerField('ID', [\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\IntegerField('REGION_ID', [\n\t\t\t\t'required' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('CODE', [\n\t\t\t\t'required' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('PHRASE'),\n\t\t\tnew Main\\Entity\\ReferenceField('REGION', '\\Bitrix\\DocumentGenerator\\Model\\Region',\n\t\t\t\t['=this.REGION_ID' => 'ref.ID']\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'SESSION_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_SESSION_ID_FIELD'),\n\t\t\t),\n\t\t\t'CHAT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_CHAT_ID_FIELD'),\n\t\t\t),\n\t\t\t'MESSAGE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_MESSAGE_ID_FIELD'),\n\t\t\t),\n\t\t\t'MESSAGE_ORIGIN_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_MESSAGE_ORIGIN_ID_FIELD'),\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_USER_ID_FIELD'),\n\t\t\t),\n\t\t\t'ACTION' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateAction'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_ACTION_FIELD'),\n\t\t\t),\n\t\t\t'CRM_ENTITY_TYPE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateCrmEntityType'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_CRM_ENTITY_TYPE_FIELD'),\n\t\t\t),\n\t\t\t'CRM_ENTITY_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_CRM_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_TYPE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateValue'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_FIELD_NAME_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateValue'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_FIELD_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_DATE_CREATE_FIELD'),\n\t\t\t\t'default_value' => array(__CLASS__, 'getCurrentDate'),\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_TYPE' => new EnumField(\n\t\t\t\t'PERSON_TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'values' => static::getTypes(),\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_TYPE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_NAME' => new StringField(\n\t\t\t\t'PERSON_NAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonName'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_NAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_LASTNAME' => new StringField(\n\t\t\t\t'PERSON_LASTNAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonLastname'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_LASTNAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_MIDDLENAME' => new StringField(\n\t\t\t\t'PERSON_MIDDLENAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonMiddlename'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_MIDDLENAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'EMAIL' => new StringField(\n\t\t\t\t'EMAIL',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateEmail'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_EMAIL_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PHONE' => new StringField(\n\t\t\t\t'PHONE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePhone'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PHONE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'POST_INDEX' => new StringField(\n\t\t\t\t'POST_INDEX',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePostIndex'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_POST_INDEX_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'COUNTRY' => new StringField(\n\t\t\t\t'COUNTRY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCountry'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_COUNTRY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'CITY' => new StringField(\n\t\t\t\t'CITY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCity'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_CITY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'COMPANY' => new StringField(\n\t\t\t\t'COMPANY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCompany'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_COMPANY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'INN' => new StringField(\n\t\t\t\t'INN',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateInn'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_INN_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'KPP' => new StringField(\n\t\t\t\t'KPP',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateKpp'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_KPP_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'ADDRESS' => new StringField(\n\t\t\t\t'ADDRESS',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateAddress'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_ADDRESS_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'DATE_MODIFY' => new DatetimeField(\n\t\t\t\t'DATE_MODIFY',\n\t\t\t\t[\n\t\t\t\t\t'default' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new DateTime();\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_DATE_MODIFY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'DATE_CREATE' => new DatetimeField(\n\t\t\t\t'DATE_CREATE',\n\t\t\t\t[\n\t\t\t\t\t'default_value' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new DateTime();\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_DATE_CREATE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'CREATED_BY' => new IntegerField(\n\t\t\t\t'CREATED_BY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_CREATED_BY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'MODIFIED_BY' => new IntegerField(\n\t\t\t\t'MODIFIED_BY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_MODIFIED_BY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_ID_FIELD'),\n ),\n 'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n 'default_value' => new Main\\Type\\DateTime(),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_TIMESTAMP_X_FIELD'),\n )),\n 'SOCIAL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateSocial'),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIAL_FIELD'),\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_USER_ID_FIELD'),\n ),\n 'SOCIALTEXT' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIALTEXT_FIELD'),\n ),\n );\n }",
"public function mapEntity(Entity $entity) {\n\t\t$entity['_loc'] = $this->_table->getUrl($entity);\n\t\t$entity['_lastmod'] = $entity->{$this->_config['lastmod']};\n\t\t$entity['_changefreq'] = $this->_config['changefreq'];\n\t\t$entity['_priority'] = $this->_config['priority'];\n\n\t\treturn $entity;\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true\n ),\n 'APP_ID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateVarchar128'),\n ),\n 'CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateVarchar128'),\n ),\n 'TYPE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateType'),\n ),\n 'HANDLER' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateHandler'),\n ),\n 'DATE_ADD' => array(\n 'data_type' => 'datetime',\n 'default_value' => new Main\\Type\\DateTime(),\n ),\n 'AUTHOR_ID' => array(\n 'data_type' => 'integer',\n 'default_value' => 0,\n ),\n 'AUTHOR' => array(\n 'data_type' => '\\Bitrix\\Main\\UserTable',\n 'reference' => array(\n '=this.AUTHOR_ID' => 'ref.ID'\n ),\n 'join_type' => 'LEFT',\n ),\n );\n }",
"public function getMappingEntityBundle();",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'IBLOCK_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IBLOCK_ID_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateFieldId'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_FIELD_ID_FIELD'),\n\t\t\t),\n\t\t\t'IS_REQUIRED' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N','Y'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IS_REQUIRED_FIELD'),\n\t\t\t),\n\t\t\t'DEFAULT_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_DEFAULT_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'IBLOCK' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Iblock\\Iblock',\n\t\t\t\t'reference' => array('=this.IBLOCK_ID' => 'ref.ID')\n\t\t\t),\n\t\t);\n\t}",
"abstract protected function getMapping();",
"abstract protected function getMapping();",
"public static function getMap()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'SEARCH_CONTENT_ID' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'primary' => true,\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCH_CONTENT_ID_FIELD'),\r\n\t\t\t),\r\n\t\t\t'SEARCH_CONTENT_MD5' => array(\r\n\t\t\t\t'data_type' => 'string',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'validation' => array(__CLASS__, 'validateSearchContentMd5'),\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCH_CONTENT_MD5_FIELD'),\r\n\t\t\t),\r\n\t\t\t'SEARCHABLE_CONTENT' => array(\r\n\t\t\t\t'data_type' => 'text',\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCHABLE_CONTENT_FIELD'),\r\n\t\t\t),\r\n\t\t\t'CONTENT' => array(\r\n\t\t\t\t'data_type' => SearchTable::getEntity(),\r\n\t\t\t\t'reference' => array('=this.SEARCH_CONTENT_ID' => 'ref.ID'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t(new StringField('EXTERNAL_HASH'))\n\t\t\t\t->configurePrimary()\n\t\t\t\t->configureAutocomplete()\n\t\t\t\t->configureSize(128)\n\t\t\t,\n\t\t\tnew IntegerField('OBJECT_ID'),\n\t\t\tnew IntegerField('VERSION_ID'),\n\t\t\t(new IntegerField('OWNER_ID'))\n\t\t\t\t->configureRequired()\n\t\t\t,\n\t\t\t(new DatetimeField('CREATE_TIME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureDefaultValue(function() {\n\t\t\t\t\treturn new DateTime();\n\t\t\t\t})\n\t\t\t,\n\t\t\t(new DatetimeField('UPDATE_TIME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureDefaultValue(function() {\n\t\t\t\t\treturn new DateTime();\n\t\t\t\t})\n\t\t\t,\n\t\t\t(new IntegerField('USERS'))\n\t\t\t\t->configureDefaultValue(0)\n\t\t\t,\n\t\t\t(new IntegerField('CONTENT_STATUS'))\n\t\t\t\t->configureDefaultValue(self::CONTENT_STATUS_INIT)\n\t\t\t,\n\t\t];\n\t}",
"function tradeoff_map($definition)\n {\n return app(Models\\Resolution\\Map\\Map::class)->setData($definition);\n }",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true\n ),\n 'OBJECT_ID' => array(\n 'data_type' => 'integer',\n 'required' => true\n ),\n 'TASK_ID' => array(\n 'data_type' => 'integer',\n 'required' => true\n ),\n 'ACCESS_CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateAccessCode')\n ),\n 'DOMAIN' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDomain')\n ),\n 'NEGATIVE' => array(\n 'data_type' => 'integer',\n 'required' => true\n ),\n 'OBJECT' => array(\n 'data_type' => 'Bitrix\\Disk\\DiskObject',\n 'reference' => array('=this.OBJECT_ID' => 'ref.ID'),\n ),\n 'TASK' => array(\n 'data_type' => 'Bitrix\\Task\\Task',\n 'reference' => array('=this.TASK_ID' => 'ref.ID'),\n ),\n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_SEO_TEXT_IBLOCK_SECTIONS_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'SEO_TEXT_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_SEO_TEXT_IBLOCK_SECTIONS_ENTITY_SEO_TEXT_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'SECTION_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_SEO_TEXT_IBLOCK_SECTIONS_ENTITY_SECTION_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n (new Reference('SEO_TEXT', SmartseoSeoTextTable::class, Join::on('this.SEO_TEXT_ID', 'ref.ID')))\n ->configureJoinType('left'),\n (new Reference('SECTION', \\Bitrix\\Iblock\\SectionTable::class, Join::on('this.SECTION_ID', 'ref.ID')))\n ->configureJoinType('left'),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\n\t\t\t(new Fields\\IntegerField('LOCATION_ID'))\n\t\t\t\t->configureRequired(true)\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\IntegerField('TYPE'))\n\t\t\t\t->configureRequired(true)\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\StringField('VALUE'))\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(null, 255)),\n\n\t\t\t// Ref\n\n\t\t\t(new Fields\\Relations\\Reference('LOCATION', LocationTable::class,\n\t\t\t\tJoin::on('this.LOCATION_ID', 'ref.ID')))\n\t\t\t\t->configureJoinType('inner')\n\t\t];\n\t}",
"public static function getMap()\n {\n return self::$map;\n }",
"protected function getMap()\n {\n if (! $this->map) {\n $this->load();\n }\n\n return $this->map;\n }",
"public function getFields(){ return $this->field_map; }",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'FORUM_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('FORUM_SITE_TABLE_FIELD_FORUM_ID'),\n\t\t\t),\n\t\t\t'SITE_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t\t'title' => Loc::getMessage('FORUM_SITE_TABLE_FIELD_SITE_ID'),\n\t\t\t),\n\t\t\t'PATH2FORUM_MESSAGE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validatePath'),\n\t\t\t\t'title' => Loc::getMessage('FORUM_SITE_TABLE_FIELD_SITE_ID'),\n\t\t\t),\n\t\t\t'FORUM' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Forum\\Forum',\n\t\t\t\t'reference' => array('=this.FORUM_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'SITE' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\Site',\n\t\t\t\t'reference' => array('=this.SITE_ID' => 'ref.LID'),\n\t\t\t),\n\t\t);\n\t}",
"static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'rev' => array(\n 'type' => 'integer',\n ),\n 'cover' => array(\n 'type' => 'string',\n ),\n 'wiki_id' => array(\n 'type' => 'integer',\n ),\n 'title' => array(\n 'type' => 'string',\n ),\n 'html_cache' => array(\n 'type' => 'string',\n ),\n 'content' => array(\n 'type' => 'string',\n ),\n 'tags' => array(\n 'type' => 'raw',\n ),\n 'comment_tags' => array(\n 'type' => 'raw',\n ),\n 'model' => array(\n 'type' => 'string',\n ),\n 'has_video' => array(\n 'type' => 'integer',\n ),\n 'like_num' => array(\n 'type' => 'integer',\n ),\n 'dislike_num' => array(\n 'type' => 'integer',\n ),\n 'watched_num' => array(\n 'type' => 'integer',\n ),\n 'admin_id' => array(\n 'type' => 'integer',\n ),\n 'do_date' => array(\n 'type' => 'date',\n ),\n 'source' => array(\n 'type' => 'raw',\n ),\n 'tvsou_id' => array(\n 'type' => 'string',\n ),\n 'first_letter' => array(\n 'type' => 'string',\n ),\n 'douban_id' => array(\n 'type' => 'string',\n ),\n 'verify' => array(\n 'type' => 'integer',\n ),\n 'created_at' => array(\n 'type' => 'date',\n ),\n 'updated_at' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TITLE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateTitle'],\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_TITLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'YEAR',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateYear'],\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_YEAR_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'COPIES_CNT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_COPIES_CNT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'PUBLISHINGID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_PUBLISHINGID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew ReferenceField(\n\t\t\t\t'PUBLISHING_ID',\n\t\t\t\t'Listbooks\\PublishingTable',\n\t\t\t\tarray('=this.PUBLISHINGID' => 'ref.ID'),\n\t\t\t)\n\t\t];\n\t}",
"public function getFieldsMap()\n {\n return $this->fields_map;\n }",
"public static function getMap()\n {\n return [\n (new Fields\\StringField('HASH'))\n ->configurePrimary(true),\n\n new Fields\\IntegerField('RELIABILITY'),\n new Fields\\StringField('ADDRESS'),\n new Fields\\StringField('FULL_NAME'),\n new Fields\\StringField('PHONE'),\n new Fields\\DatetimeField('UPDATED_AT')\n ];\n }",
"public function getMapping()\n {\n return $this->mapping;\n }",
"static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'channel_code' => array(\n 'type' => 'string',\n ),\n 'time' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }",
"public function mapFor()\n {\n // Here we tell Doctrine that this mapping is for the Scientist object.\n return Article::class;\n }",
"public function getMap() {\n\t\treturn is_array($this -> _referenceMap) ? $this -> _referenceMap : array();\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'USER_LOG_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_USER_LOG_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'USER_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_USER_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew TextField(\n\t\t\t\t'COMMENT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_COMMENT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}",
"public function getMapping() {\n return $this->mapping;\n }",
"public function getMap()\n {\n return $this->map;\n }",
"public function getMap()\n {\n return $this->map;\n }",
"public static function getMap()\n{\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_ID_FIELD'),\n ),\n 'TITLE' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateTitle'),\n 'title' => Loc::getMessage('TASKS_ENTITY_TITLE_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('TASKS_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'DESCRIPTION_IN_BBCODE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_DESCRIPTION_IN_BBCODE_FIELD'),\n ),\n 'PRIORITY' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validatePriority'),\n 'title' => Loc::getMessage('TASKS_ENTITY_PRIORITY_FIELD'),\n ),\n 'STATUS' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateStatus'),\n 'title' => Loc::getMessage('TASKS_ENTITY_STATUS_FIELD'),\n ),\n 'RESPONSIBLE_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_RESPONSIBLE_ID_FIELD'),\n ),\n 'DATE_START' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_DATE_START_FIELD'),\n ),\n 'DURATION_PLAN' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_DURATION_PLAN_FIELD'),\n ),\n 'DURATION_FACT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_DURATION_FACT_FIELD'),\n ),\n 'DURATION_TYPE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateDurationType'),\n 'title' => Loc::getMessage('TASKS_ENTITY_DURATION_TYPE_FIELD'),\n ),\n 'TIME_ESTIMATE' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_TIME_ESTIMATE_FIELD'),\n ),\n 'REPLICATE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_REPLICATE_FIELD'),\n ),\n 'DEADLINE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_DEADLINE_FIELD'),\n ),\n 'START_DATE_PLAN' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_START_DATE_PLAN_FIELD'),\n ),\n 'END_DATE_PLAN' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_END_DATE_PLAN_FIELD'),\n ),\n 'CREATED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_CREATED_BY_FIELD'),\n ),\n 'CREATED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_CREATED_DATE_FIELD'),\n ),\n 'CHANGED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_CHANGED_BY_FIELD'),\n ),\n 'CHANGED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_CHANGED_DATE_FIELD'),\n ),\n 'STATUS_CHANGED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_STATUS_CHANGED_BY_FIELD'),\n ),\n 'STATUS_CHANGED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_STATUS_CHANGED_DATE_FIELD'),\n ),\n 'CLOSED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_CLOSED_BY_FIELD'),\n ),\n 'CLOSED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_CLOSED_DATE_FIELD'),\n ),\n 'GUID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateGuid'),\n 'title' => Loc::getMessage('TASKS_ENTITY_GUID_FIELD'),\n ),\n 'XML_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateXmlId'),\n 'title' => Loc::getMessage('TASKS_ENTITY_XML_ID_FIELD'),\n ),\n 'EXCHANGE_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateExchangeId'),\n 'title' => Loc::getMessage('TASKS_ENTITY_EXCHANGE_ID_FIELD'),\n ),\n 'EXCHANGE_MODIFIED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateExchangeModified'),\n 'title' => Loc::getMessage('TASKS_ENTITY_EXCHANGE_MODIFIED_FIELD'),\n ),\n 'OUTLOOK_VERSION' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_OUTLOOK_VERSION_FIELD'),\n ),\n 'MARK' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateMark'),\n 'title' => Loc::getMessage('TASKS_ENTITY_MARK_FIELD'),\n ),\n 'ALLOW_CHANGE_DEADLINE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ALLOW_CHANGE_DEADLINE_FIELD'),\n ),\n 'ALLOW_TIME_TRACKING' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ALLOW_TIME_TRACKING_FIELD'),\n ),\n 'MATCH_WORK_TIME' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_MATCH_WORK_TIME_FIELD'),\n ),\n 'TASK_CONTROL' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_TASK_CONTROL_FIELD'),\n ),\n 'ADD_IN_REPORT' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ADD_IN_REPORT_FIELD'),\n ),\n 'GROUP_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_GROUP_ID_FIELD'),\n ),\n 'PARENT_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_PARENT_ID_FIELD'),\n ),\n 'FORUM_TOPIC_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_FORUM_TOPIC_ID_FIELD'),\n ),\n 'MULTITASK' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_MULTITASK_FIELD'),\n ),\n 'SITE_ID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateSiteId'),\n 'title' => Loc::getMessage('TASKS_ENTITY_SITE_ID_FIELD'),\n ),\n 'DECLINE_REASON' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('TASKS_ENTITY_DECLINE_REASON_FIELD'),\n ),\n 'FORKED_BY_TEMPLATE_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_FORKED_BY_TEMPLATE_ID_FIELD'),\n ),\n 'ZOMBIE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ZOMBIE_FIELD'),\n ),\n 'DEADLINE_COUNTED' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_DEADLINE_COUNTED_FIELD'),\n ),\n 'STAGE_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_STAGE_ID_FIELD'),\n ),\n 'SEARCH_INDEX' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('TASKS_ENTITY_SEARCH_INDEX_FIELD'),\n ),\n );\n}",
"public static function &entityInfo($entity_name)\n\t{\n\t\tif(isset(self::$entity_info[$entity_name])) {\n\t\t\treturn self::$entity_info[$entity_name];\n\t\t}\n\t\t\n\t\t$class = Collection::loadEntity($entity_name);\n\t\t\n\t\tif(class_exists($class)) {\n\t\t\t$object = new $class($entity_name);\n\t\t\t\n\t\t\tif(!is_subclass_of($object, Orm::ENTITY_BASE_CLASS) && get_class($object) != Orm::ENTITY_BASE_CLASS) {\n\t\t\t\tthrow new BakedCarrotOrmException(\"Class $class is not a subclass of \" . Orm::ENTITY_BASE_CLASS);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$class = Orm::ENTITY_BASE_CLASS;\n\t\t\t$object = new $class($entity_name);\n\t\t}\n\t\t\n\t\tself::$entity_info[$entity_name] = $object->info();\n\t\t\n\t\tunset($object);\n\t\t\n\t\treturn self::$entity_info[$entity_name];\n\t}",
"function mapper($entity, $entityMap = null)\n {\n return Manager::getMapper($entity, $entityMap);\n }",
"abstract protected function buildMap();",
"public function FieldMap()\n {\n return new Form_FieldMap($this);\n }",
"public function entity()\n {\n $data = $this->morphMany('\\ApprovalSequence\\Models\\Entity', 'entity')->get();\n $data = $data->map(function ($item) {\n return $item->entity;\n });\n return $data;\n }",
"abstract protected function defineMapping();",
"public function getMappings();",
"public function getMappings();",
"public static function createFromDOM( \\DOMElement $element, Metadata $metadata ): EntityMap {\n $map = new static();\n\n $x = new \\DOMXPath( $element->ownerDocument );\n $x->registerNamespace( 'edmx', Metadata::NS_EDMX );\n $x->registerNamespace( 'edm', Metadata::NS_EDM );\n\n $map->name = $element->getAttribute( 'Name' );\n $map->key = $x->evaluate( 'string(edm:Key/edm:PropertyRef/@Name)', $element );\n if ( $map->key === '' ) {\n $map->key = null;\n }\n\n $map->isAbstract = $element->hasAttribute( 'Abstract' ) && $element->getAttribute( 'Abstract' ) === 'true';\n $map->baseEntity = $element->hasAttribute( 'BaseType' )? $metadata->stripNamespace( $element->getAttribute( 'BaseType' ) ) : null;\n\n $propertiesList = $x->query( 'edm:Property', $element );\n foreach ( $propertiesList as $propertyElement ) {\n /**\n * @var \\DOMElement $propertyElement\n */\n $propertyName = $propertyElement->getAttribute( 'Name' );\n $concretePropertyName = preg_replace( '~^_(.*)_value$~', '$1', $propertyName );\n\n /*\n * Build the inbound map.\n *\n * As-is properties by default, _(.*)_value => $1\n */\n $map->inboundMap[$propertyName] = $concretePropertyName;\n\n /**\n * Build the field type map. Mapped are the real CRM field names.\n */\n $map->fieldTypes[$concretePropertyName] = $propertyElement->getAttribute( 'Type' );\n\n /*\n * Build the outbound map.\n *\n * As-is properties by default.\n * For _(.*)_value, find corresponding navigation properties.\n * We get a map $1 => [ Type => NavigationPropertyName ]\n */\n $referentialConstraints = $x->query( \"edm:NavigationProperty/edm:ReferentialConstraint[@Property='{$propertyName}']\", $element );\n if ( !$referentialConstraints->length ) {\n $map->outboundMap[$propertyName] = $propertyName;\n continue;\n }\n $map->outboundMap[$concretePropertyName] = [];\n foreach ( $referentialConstraints as $referentialConstraint ) {\n /**\n * @var \\DOMElement $referentialConstraint\n */\n $navigationProperty = $referentialConstraint->parentNode;\n $navType = $metadata->stripNamespace( $navigationProperty->getAttribute( 'Type' ) );\n\n $map->outboundMap[$concretePropertyName][$navType] = $navigationProperty->getAttribute( 'Name' );\n\n /*\n * Resolve possible abstract types into concrete types. E.g. principal => systemuser, team.\n */\n if ( array_key_exists( $navType, $metadata->parentTypesMap ) ) {\n foreach ( $metadata->parentTypesMap[$navType] as $concreteType ) {\n $map->outboundMap[$concretePropertyName][$concreteType] = $navigationProperty->getAttribute( 'Name' );\n }\n }\n }\n }\n\n return $map;\n }",
"function getEntityList()\n\t{\n\t\tif($this->entityList === null)\n\t\t{\n\t\t\t$event = new \\Bitrix\\Main\\Event('main', 'onUserTypeEntityOrmMap');\n\t\t\t$event->send();\n\n\t\t\tforeach($event->getResults() as $eventResult)\n\t\t\t{\n\t\t\t\tif($eventResult->getType() == \\Bitrix\\Main\\EventResult::SUCCESS)\n\t\t\t\t{\n\t\t\t\t\t$result = $eventResult->getParameters(); // [ENTITY_ID => 'SomeTable']\n\t\t\t\t\tforeach($result as $entityId => $entityClass)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(mb_substr($entityClass, 0, 1) !== '\\\\')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entityClass = '\\\\' . $entityClass;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->entityList[$entityId] = $entityClass;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->entityList;\n\t}",
"public static function getMap()\n\t{\n\t\t/*\n\t\t\tboolean (наследует ScalarField)\n\t\t\tdate (наследует ScalarField)\n\t\t\tdatetime (наследует DateField)\n\t\t\tenum (наследует ScalarField)\n\t\t\tfloat (наследует ScalarField)\n\t\t\tinteger (наследует ScalarField)\n\t\t\tstring (наследует ScalarField)\n\t\t\ttext (наследует StringField)\n\t\t */\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('AOS_LT_ID'),\n\t\t\t),\n\t\t\t'ACTIVE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'title' => Loc::getMessage('AOS_LT_ACTIVE'),\n\t\t\t),\n\t\t\t'NAME' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'title' => Loc::getMessage('AOS_LT_NAME'),\n\t\t\t),\n\t\t\t'STATUS_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'title' => Loc::getMessage('AOS_LT_STATUS_ID'),\n\t\t\t),\n\t\t\t'DESCRIPTION' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t\t'title' => Loc::getMessage('AOS_LT_DESCRIPTION'),\n\t\t\t),\n\t\t\t'DESCRIPTION_TYPE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'title' => Loc::getMessage('AOS_LT_DESCRIPTION_TYPE'),\n\t\t\t),\n\t\t\t'DATE_MODIFY' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t 'title' => Loc::getMessage('AOS_LT_DATE_MODIFY'),\n\t\t\t),\n\t\t\t'MODIFIED_BY' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t 'title' => Loc::getMessage('AOS_LT_MODIFIED_BY'),\n\t\t\t),\n\t\t);\n\t}",
"public function map()\n {\n return [\n 'full' => ['key' => 'address'],\n 'city' => ['key' => 'city'],\n 'state' => ['key' => 'state'],\n 'zip' => ['key' => 'zip'],\n 'country' => ['key' => 'country'],\n ];\n }",
"public function testBuildMarshalMapBuildEntities(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n $translate = $table->behaviors()->get('Translate');\n\n $map = $translate->buildMarshalMap($table->marshaller(), [], []);\n $entity = $table->newEmptyEntity();\n $data = [\n 'en' => [\n 'title' => 'English Title',\n 'body' => 'English Content',\n ],\n 'es' => [\n 'title' => 'Titulo Español',\n 'body' => 'Contenido Español',\n ],\n ];\n $result = $map['_translations']($data, $entity);\n $this->assertEmpty($entity->getErrors(), 'No validation errors.');\n $this->assertCount(2, $result);\n $this->assertArrayHasKey('en', $result);\n $this->assertArrayHasKey('es', $result);\n $this->assertSame('English Title', $result['en']->title);\n $this->assertSame('Titulo Español', $result['es']->title);\n }",
"private function getFieldMaping() {\n return $this->fieldMapping;\n }",
"public function definition()\n {\n return [\n 'entity' => $this->faker->word,\n 'entity_id' => $this->faker->numberBetween(1, 1000),\n 'field' => $this->faker->word,\n 'name' => $this->faker->word,\n 'nameOriginal' => $this->faker->word,\n 'publicPath' => $this->faker->word,\n 'extension' => $this->faker->countryCode,\n 'data' => $this->faker->text,\n ];\n }",
"function importer_helper_get_field_and_props($entity, $bundle) {\n\n // now that we know the columns to be mapped FROM,\n // we need to get the fields and properties to map TO. That depends on the node type..\n\n\t// get the fields.\n $fields = field_info_instances($entity, $bundle);\n\n // get the properties\n $properties_info = entity_get_property_info($entity);\n $properties = array_keys( $properties_info['properties'] );\n\n // this function is used to build the options for the fields select\n function get_field_label($field_instance) {\n return $field_instance['label'];\n }\n\n // store field options\n $field_options = (array) array_map('get_field_label', $fields);\n $property_options = array_combine($properties, $properties);\n\n\n // build the options by merging both property options and field options.\n $map_options = array_merge($field_options, $property_options);\n\n return $map_options;\n}",
"public function getMap() : Map {\n // return the private property as-is\n return $this->map;\n }",
"public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this\n\t\t\t->setEntityMapping( 'id', 'hid' )\n\t\t\t->setEntityMapping( 'title', 'name' )\n\t\t;\n\t\t\n\t\treturn $this;\n\t}",
"protected function getMap()\n {\n return config('codegenerator.eloquent_type_to_html_type');\n }",
"protected function getMap()\n\t{\n\t\treturn array(\n\t\t\t'USE' => new Field\\Checkbox('USE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_USE')\n\t\t\t)),\n\t\t\t'CODE' => new Field\\Textarea('CODE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE'),\n\t\t\t\t'help' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE_HELP2'),\n\t\t\t\t'placeholder' => '<script>\n\tvar googletag = googletag || {};\n\tgoogletag.cmd = googletag.cmd || [];\n</script>'\n\t\t\t))\n\t\t);\n\t}",
"function tradeoff_map_node($definition)\n {\n return app(Models\\Resolution\\Map\\MapNode::class)->setData($definition);\n }",
"public function get_postmeta_mapping() {\n\t\treturn $this->postmeta_mapping;\n\t}",
"public static function get_map_explorer_definition() {\n return array(\n 'title' => 'Map explorer',\n 'category' => 'Reporting',\n 'description' => 'A map plus grid of data, with various options for exploring the data. This is designed to integrate with the Easy Login feature\\'s '.\n 'preferred taxon groups and locality for the logged in user and is therefore specific to Drupal.'\n );\n }",
"public function getDtdMapping();",
"function &get_entity()\n {\n return $this->object->_stdObject;\n }",
"public function getEntity( )\n {\n\n return $this->entity;\n\n }",
"public static function getFieldMap() {\n\n return get_option( 'geb_gfe_field_map' );\n }",
"public function GenerateEntity() {\n return $this->entity->Generate();\n }",
"function get_map(){\n return $this->customizer_map_array;\n }",
"public function getEntity()\n\t{\n\t\treturn new $this->entity();\n\t}",
"public function entity ()\n {\n return $this->_entity;\n }",
"public function getMap() {\n return [\n 'sku' => 'itemNo',\n 'shortDescription' => 'description',\n 'longDescription' => 'description2',\n 'measurementUnit' => 'unitOfMeasure',\n 'mpn' => 'vendorItemNo',\n 'ean' => 'eanNo',\n ];\n }",
"public function getEntity() {\n return $this->entity;\n }",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'DIALOG_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateDialogId'),\n\t\t\t),\n\t\t\t'ITEM_RID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'ITEM_CID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'RELATION' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Im\\Model\\RelationTable',\n\t\t\t\t'reference' => array('=this.ITEM_RID' => 'ref.ID'),\n\t\t\t\t'join_type' => 'INNER',\n\t\t\t),\n\t\t\t'CHAT' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Im\\Model\\ChatTable',\n\t\t\t\t'reference' => array('=this.ITEM_CID' => 'ref.ID'),\n\t\t\t\t'join_type' => 'INNER',\n\t\t\t),\n\t\t);\n\t}",
"public function getIdentityMap()\n {\n return $this->identityMap;\n }",
"public function getIdentityMap()\n {\n return $this->identityMap;\n }",
"public function entity()\r\n {\r\n return $this->entity;\r\n }",
"public function getElasticaMapping() {\n\t\t$mapping = new Mapping();\n\n $fields = $this->getElasticaFields();\n\n\t\t$mapping->setProperties($fields);\n\n $callable = get_class($this->owner).'::updateElasticsearchMapping';\n if(is_callable($callable))\n {\n $mapping = call_user_func($callable, $mapping);\n }\n\n\t\treturn $mapping;\n\t}",
"public static function init()\n {\n if (self::$_map != null) {\n return;\n }\n\n self::$_map = [\n self::CONTACT => [\n 'tableName' => \\app\\models\\Contact::tableName(),\n 'label' => 'contact'\n ],\n self::ADDRESS => [\n 'tableName' => \\app\\models\\Address::tableName(),\n 'label' => 'address'\n ],\n self::BANK_ACCOUNT => [\n 'tableName' => \\app\\models\\BankAccount::tableName(),\n 'label' => 'bank account',\n 'viewRoute' => 'bank-account/view'\n ],\n self::ATTACHMENT => [\n 'tableName' => \\app\\models\\Attachment::tableName(),\n 'label' => 'attachment'\n ],\n self::CATEGORY => [\n 'tableName' => \\app\\models\\Category::tableName(),\n 'label' => 'category'\n ],\n self::ORDER => [\n 'tableName' => \\app\\models\\Order::tableName(),\n 'label' => 'order'\n ],\n self::PRODUCT => [\n 'tableName' => \\app\\models\\Product::tableName(),\n 'label' => 'product'\n ],\n self::TRANSACTION => [\n 'tableName' => \\app\\models\\Transaction::tableName(),\n 'label' => 'transaction'\n ],\n self::TRANSACTION_PACK => [\n 'tableName' => \\app\\models\\TransactionPack::tableName(),\n 'label' => 'transaction pack',\n 'viewRoute' => 'transaction-pack/view'\n ],\n self::CONTACT_RELATION => [\n 'tableName' => \\app\\models\\ContactRelation::tableName(),\n 'label' => 'contact relation',\n 'viewRoute' => 'contact-relation/view'\n ],\n self::TAG => [\n 'tableName' => \\app\\models\\Tag::tableName(),\n 'label' => 'tag',\n 'viewRoute' => 'tag/view'\n ],\n ];\n }",
"public function getCustomMapping()\n {\n return $this->custom_mapping;\n }",
"protected function classMap()\n {\n $class_map = new ClassMap();\n\n return $class_map->getMap();\n }",
"public function GetEntity(){\n\t\treturn $this->_entity;\n\t}",
"public function getFieldMapping(): array {\n return $this->fieldMapping;\n }",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'USER' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\UserTable',\n\t\t\t\t'reference' => array('=this.USER_ID' => 'ref.ID'),\n\t\t\t),\n\t\t\t'GROUP_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'GROUP' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Socialnetwork\\WorkgroupTable',\n\t\t\t\t'reference' => array('=this.GROUP_ID' => 'ref.ID'),\n\t\t\t),\n\t\t\t'ROLE' => array(\n\t\t\t\t'data_type' => 'enum',\n\t\t\t\t'values' => array(self::ROLE_OWNER, self::ROLE_MODERATOR, self::ROLE_USER, self::ROLE_BAN, self::ROLE_REQUEST),\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime'\n\t\t\t),\n\t\t\t'DATE_UPDATE' => array(\n\t\t\t\t'data_type' => 'datetime'\n\t\t\t),\n\t\t\t'INITIATED_BY_TYPE' => array(\n\t\t\t\t'data_type' => 'enum',\n\t\t\t\t'values' => array(self::INITIATED_BY_USER, self::INITIATED_BY_GROUP),\n\t\t\t),\n\t\t\t'INITIATED_BY_USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'INITIATED_BY_USER' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\UserTable',\n\t\t\t\t'reference' => array('=this.INITIATED_BY_USER_ID' => 'ref.ID'),\n\t\t\t),\n\t\t\t'MESSAGE' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t)\n\t\t);\n\t}",
"public function getEntity()\n\t{\n\t \treturn $this->entity;\n\t}",
"protected function define(MapperDefinition $map)\n {\n $map->type(TestEntityWithMetadata::class);\n $map->toTable('data');\n\n $map->idToPrimaryKey('id');\n\n $map->embeddedCollection(TestEntityWithMetadata::METADATA)\n ->toTable('data_metadata')\n ->withPrimaryKey('id')\n ->withForeignKeyToParentAs('data_id')\n ->using(new MetadataMapper());\n }",
"public function getEntity()\r\n {\r\n return $this->entity;\r\n }",
"public function getIdentityMap()\n {\n if (null == $this->identityMap) {\n $this->setIdentityMap(new IdentityMap());\n }\n return $this->identityMap;\n }",
"public function getEntity();"
] | [
"0.7015885",
"0.6892737",
"0.6874207",
"0.6847661",
"0.679989",
"0.67517155",
"0.664372",
"0.65369815",
"0.653322",
"0.65271753",
"0.6493772",
"0.6488595",
"0.6435219",
"0.64083576",
"0.6354096",
"0.6295647",
"0.62785566",
"0.6258927",
"0.6249063",
"0.6212577",
"0.6188243",
"0.61266047",
"0.60974556",
"0.60661215",
"0.60655254",
"0.59838665",
"0.59535056",
"0.59535056",
"0.59284616",
"0.58914405",
"0.5859274",
"0.58364916",
"0.5801292",
"0.5792904",
"0.5791292",
"0.57905746",
"0.5784078",
"0.577814",
"0.5746495",
"0.57095605",
"0.57015955",
"0.56894684",
"0.5649652",
"0.5612072",
"0.55966324",
"0.55937564",
"0.5585349",
"0.5577983",
"0.55760694",
"0.55760694",
"0.55712664",
"0.5569223",
"0.55569994",
"0.55501",
"0.55466664",
"0.55353564",
"0.55253327",
"0.5523702",
"0.5523702",
"0.55189335",
"0.5510501",
"0.5472299",
"0.5469433",
"0.54533726",
"0.54391754",
"0.5436011",
"0.543366",
"0.54318273",
"0.54167044",
"0.54098916",
"0.54058063",
"0.53808516",
"0.5376159",
"0.5374183",
"0.53736013",
"0.5370928",
"0.5369742",
"0.5363249",
"0.5359095",
"0.5354554",
"0.53518313",
"0.53444713",
"0.53344154",
"0.5331381",
"0.5326349",
"0.5324457",
"0.5324457",
"0.5311153",
"0.5297193",
"0.52947474",
"0.52901417",
"0.528128",
"0.5277654",
"0.5273522",
"0.5268727",
"0.5266472",
"0.5248237",
"0.524239",
"0.5240979",
"0.52264726"
] | 0.53313196 | 84 |
Render view config object for current package and theme | public function getViewConfig(array $params = [])
{
$this->assetRepo->updateDesignParams($params);
$viewConfigParams = [];
if (isset($params['themeModel'])) {
/** @var \Magento\Framework\View\Design\ThemeInterface $currentTheme */
$currentTheme = $params['themeModel'];
$key = $currentTheme->getFullPath();
if (isset($this->viewConfigs[$key])) {
return $this->viewConfigs[$key];
}
$viewConfigParams['themeModel'] = $currentTheme;
}
$viewConfigParams['area'] = (isset($params['area'])) ? $params['area'] : null;
/** @var \Magento\Framework\Config\View $config */
$config = $this->viewConfigFactory->create($viewConfigParams);
if (isset($key)) {
$this->viewConfigs[$key] = $config;
}
return $config;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function render()\n\t{\n\t\t$config = json_decode(file_get_contents(JPATH_CONFIGURATION . '/config.json'));\n\n\t\t// @todo Twig can not foreach() over stdclasses...\n\t\t$cfx = ArrayHelper::fromObject($config);\n\n\t\t$this->renderer->set('config', $cfx);\n\n\t\treturn parent::render();\n\t}",
"public function manifest()\n {\n $this->enableStaticTplCache();\n\n $this->view->hex_bg_color = $this->config->values['module.setting']['hex.background_color'];\n $this->view->orientation = $this->config->values['module.setting']['orientation_mode'];\n\n $this->jsonOutput();\n }",
"protected function render()\n {\n $settings = $this->get_settings_for_display();\n require dirname(__FILE__) . '/' . $settings['layout'] . '.php';\n }",
"function default_view_context() {\n return array(\n 'metaTitle' => 'Suicide MVC', // Set in \"<head><meta>\"\n 'metaAuthor' => '', // Displayed in \"#container > #footer\" && set in \"<head><meta>\"\n 'heading' => 'Suicide MVC', // Displayed in \"#container > #header > h1\"\n\n 'styleSheets' => 'CakePHP/cake.generic.css', // ';' delimited list of paths from the $viewStyleDirectory\n 'jscripts' => '', // ';' delimited list of paths from the $viewJavascriptDirectory\n // 'sections' => 'data_list.php' // (useful to implement?)\n\n 'data' => NULL // used by model, never need to modify\n );\n}",
"function index() {\n\t\t$this->theme = $this->passedArgs['theme'];\n\t\t$this->layout = $this->passedArgs['layout'];\n\t}",
"public function render()\n {\n $myConfig = $this->getConfig();\n\n parent::render();\n\n $oAuthUser = oxNew('oxuser');\n $oAuthUser->loadAdminUser();\n $blisMallAdmin = $oAuthUser->oxuser__oxrights->value == \"malladmin\";\n\n if ($blisMallAdmin && !$myConfig->isDemoShop()) {\n $aClassVars = get_object_vars($myConfig);\n $aSystemInfo = array();\n $aSystemInfo['pkg.info'] = $myConfig->getPackageInfo();\n $oSmarty = oxRegistry::get(\"oxUtilsView\")->getSmarty();\n while (list($name, $value) = each($aClassVars)) {\n if (gettype($value) == \"object\") {\n continue;\n }\n // security fix - we do not output dbname and dbpwd cause of demoshops\n if ($name == \"oDB\" || $name == \"dbUser\" || $name == \"dbPwd\" ||\n $name == \"oSerial\" || $name == \"aSerials\" || $name == \"sSerialNr\"\n ) {\n continue;\n }\n\n $value = var_export($value, true);\n $value = str_replace(\"\\n\", \"<br>\", $value);\n $aSystemInfo[$name] = $value;\n //echo( \"$name = $value <br>\");\n }\n $oSmarty->assign(\"oViewConf\", $this->_aViewData[\"oViewConf\"]);\n $oSmarty->assign(\"oView\", $this->_aViewData[\"oView\"]);\n $oSmarty->assign(\"shop\", $this->_aViewData[\"shop\"]);\n $oSmarty->assign(\"isdemo\", $myConfig->isDemoShop());\n $oSmarty->assign(\"aSystemInfo\", $aSystemInfo);\n echo $oSmarty->fetch(\"systeminfo.tpl\");\n echo(\"<br><br>\");\n\n phpinfo();\n\n oxRegistry::getUtils()->showMessageAndExit(\"\");\n } else {\n return oxRegistry::getUtils()->showMessageAndExit(\"Access denied !\");\n }\n }",
"protected function loadDefaultViewParameters()\n {\n # Load Hook component\n $this->oHook = new Hook();\n $this->aView['aHooks'] = array();\n\n $this->aView['aSession'] = $this->oSession->get();\n // @todo provisoire\n if (isset($this->aView['aSession']['auth'])) {\n $aUserSession = $this->aView['aSession']['auth'];\n $this->aView['sGravatarSrc16'] = Gravatar::getGravatar($aUserSession['mail'], 16);\n $this->aView['sGravatarSrc32'] = Gravatar::getGravatar($aUserSession['mail'], 32);\n $this->aView['sGravatarSrc64'] = Gravatar::getGravatar($aUserSession['mail'], 64);\n $this->aView['sGravatarSrc128'] = Gravatar::getGravatar($aUserSession['mail'], 128);\n }\n\n // Views common couch\n $this->aView[\"appLayout\"] = '../../../app/Views/layout.tpl'; // @todo degager ca ou computer\n $this->aView[\"helpers\"] = '../../../app/Views/helpers/';\n\n // Bootstrap\n $oBundles = new Bundles();\n $this->aView[\"aAppBundles\"] = $oBundles->get();\n $this->aView[\"sAppName\"] = $this->aConfig['app']['name'];\n $this->aView[\"sAppSupportName\"] = $this->aConfig['support']['name'];\n $this->aView[\"sAppSupportMail\"] = $this->aConfig['support']['email'];\n $this->aView[\"sAppIcon\"] = '/lib/bundles/' . $this->sBundleName . '/img/icon.png';\n\n // MVC infos\n $this->aView['sLocale'] = $this->sLang;\n $this->aView['sBundle'] = $this->sBundleName;\n $this->aView[\"sController\"] = $this->sController;\n $this->aView[\"sControllerName\"] = substr($this->sController, 0, strlen($this->sController) - strlen('controller'));\n $this->aView[\"sAction\"] = $this->sAction;\n $this->aView[\"sActionName\"] = substr($this->sAction, 0, strlen($this->sAction) - strlen('action'));\n\n // debug\n $this->aView[\"sEnv\"] = ENV;\n $this->aView[\"sDeBugHelper\"] = '../../../app/Views/helpers/debug.tpl';\n $this->aView[\"bIsXhr\"] = $this->isXHR();\n\n // Benchmark\n $this->aView['framework_started'] = FRAMEWORK_STARTED;\n $this->aView['current_timestamp'] = time();\n }",
"public function show()\n {\n\n $view = \\View::make('config.config');\n $view->title = \"Configuration\";\n\n return $this->render($view);\n }",
"public function view(){\r\n\r\n\t$this->registry->template->blog_heading = 'This is the blog heading';\r\n\t$this->registry->template->blog_content = 'This is the blog content';\r\n\t$this->registry->template->show('blog_view');\r\n}",
"protected function renderData()\n {\n $this->view->baseUrl = $this->_baseUrl;\n $this->view->staticUrl = Zend_Registry::get('static');\n $this->view->version = Zend_Registry::get('version');\n $this->view->hostUrl = Zend_Registry::get('host');\n $this->view->photoUrl = Zend_Registry::get('photo');\n $this->view->adminUser = $this->_user;\n\n $this->view->isSuperUser = $this->_isSuperUser;\n $this->view->isViewer = $this->_isViewer;\n $this->view->isWatcher = $this->_isWatcher;\n $this->view->isEditor = $this->_isEditor;\n }",
"public function view(){\n\n\t$this->registry->template->blog_heading = 'This is the blog heading';\n\t$this->registry->template->blog_content = 'This is the blog content';\n\t$this->registry->template->show('blog_view');\n}",
"public function view(){\n\n\t$this->registry->template->blog_heading = 'This is the blog heading';\n\t$this->registry->template->blog_content = 'This is the blog content';\n\t$this->registry->template->show('blog_view');\n}",
"private function _config()\n\t{\n\t\t// Get the base path for the smarty base directory\n\t\t$basePath\t= $this->getBasePath();\n\t\t$configFile\t= $this->getConfigFile();\n\t\t\n\t\tif (null === $basePath){\n\t\t\tthrow new Exception('No view base path specified');\n\t\t}\n\t\t\n\t\tif (null === $configFile){\n\t\t\tthrow new Exception('No config file specified');\n\t\t}\n\t\t\n\t\t// Generate the path to the view xml config file\n\t\tif ( file_exists(Package::buildPath( $basePath , $configFile)) ) {\n\t\t\t$viewBuildFile = Package::buildPath( $basePath , $configFile);\n\t\t} else {\n\t\t\tthrow new Exception(\"Unable to find config file: \" . $configFile);\n\t\t}\n\t\t \n\t\t// Load the config file\n\t\tif (! $viewXml = Zend_Registry::get('site_config_cache')->load('view_config') ) {\n\t\t\ttry {\n\t\t\t\t$xmlSection = (defined('BUILD_ENVIRONMENT')) ? BUILD_ENVIRONMENT : strtolower($_SERVER['SERVER_NAME']);\n\t\t\t\t$viewXml = new Zend_Config_Xml($viewBuildFile, $xmlSection);\n\t\t\t\tZend_Registry::get('site_config_cache')->save($viewXml, 'view_config');\n\t\t\t} catch (Zend_Exception $e) {\n\t\t\t\tthrow new Exception( 'There was a problem caching the config file: ' . $e->getMessage() );\n\t\t\t}\n\t\t}\n\t\tunset($viewBuildFile, $xmlSection);\n\t\t\n\t\t\n\t\t// Alias' replacements\n\t\t$replacements = array(\n ':baseDir' => $basePath\n ); \n\t\t\n $params = str_replace(array_keys($replacements), array_values($replacements), $viewXml->smarty->params->toArray());\n\n\t\t// Set the base smarty parameters\n\t\t$this->setParams($params);\n\t\t\n\t\t// Register plugins\n\t\t/*\n\t\tif (isset($viewXml->smarty->plugins)){\n\t\t\t$plugins\t= $viewXml->smarty->plugins->toArray();\n\t\t\t\n\t\t\t// Loop each plugin entry\n\t\t\tforeach($plugins as $key => $plugin)\n\t\t\t{\n\t\t\t\t// Check if a plugin type has been specified\n\t\t\t\tif (isset($plugin['type'])){\n\t\t\t\t\tswitch($plugin['type'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'resource':\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t$methodArgs\t= array(\n\t\t\t\t\t\t\t\t\t$key . '_get_source',\n\t\t\t\t\t\t\t\t\t$key . '_get_timestamp',\n\t\t\t\t\t\t\t\t\t$key . '_get_secure',\n\t\t\t\t\t\t\t\t\t$key . '_get_trusted'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$methodArgs\t= (is_array($plugin['parameters'])) ? $plugin['parameters'] : array();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//$methodName\t= 'register_' . $plugin['type'];\n\t\t\t\t\t//$this->_setSmartyMethod($methodName, array($key, $methodArgs));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t*/\n\t\t\n\t}",
"function configure() {\n // * You can add a layout, a layout is just a .phtml file that represents\n // the site template.\n Yasc_App::config()->setLayoutScript(dirname(__FILE__) . \"/layouts/default.phtml\");\n \n // * If you want to use a stream wrapper to convert markup of mostly-PHP \n // templates into PHP prior to include(), seems like is a little bit slow,\n // so by default is off.\n // ->setViewStream(true);\n // \n // * You can add more than one folder to store views, each view script\n // is a .phtml file.\n // ->addViewsPath(dirname(__FILE__) . \"/extra_views\");\n // \n // * You can add more than one path of view helpers and set a\n // class prefix for the path added.\n // ->addViewHelpersPath(dirname(__FILE__) . \"/../library/My/View/Helper\", \"My_View_Helper\");\n // \n // or if you don't want a class prefix just leave it blank.\n // ->addViewHelpersPath(dirname(__FILE__) . \"/extra_views/helpers\");\n //\n // * Function helpers, second argument is a prefix class.\n // ->addFunctionHelpersPath(dirname(__FILE__) . \"/extra_function_helpers\");\n // \n // * Add models folder, second argument is a prefix class.\n // ->addModelsPath(dirname(__FILE__) . \"/models\");\n // ->addModelsPath(dirname(__FILE__) . \"/extra_models/My/Model\", \"My_Model\");\n // \n // * Add extra options to the configuration object, like some $mysql connection \n // resource or a global flag, etc.\n // ->addOption(\"db\", $mysql);\n}",
"public function render()\n {\n return view('adminhub::livewire.components.settings.attributes.show')\n ->layout('adminhub::layouts.base');\n }",
"public function configAction(): Response\n {\n $user = $this->tokenStorage->getToken()->getUser();\n $contact = $this->contactManager->getById($user->getContact()->getId(), $user->getLocale());\n\n $resourceMetadataEndpoints = [];\n foreach ($this->resourceMetadataPool->getAllResourceMetadata($user->getLocale()) as $resourceMetadata) {\n if ($resourceMetadata instanceof EndpointInterface) {\n $resourceMetadataEndpoints[$resourceMetadata->getKey()] = $this->router->generate($resourceMetadata->getEndpoint());\n }\n }\n\n $view = View::create([\n 'sulu_admin' => [\n 'fieldTypeOptions' => $this->fieldTypeOptionRegistry->toArray(),\n 'routes' => $this->routeRegistry->getRoutes(),\n 'navigation' => $this->navigationRegistry->getNavigation()->getChildrenAsArray(),\n 'resourceMetadataEndpoints' => $resourceMetadataEndpoints,\n 'smartContent' => array_map(function(DataProviderInterface $dataProvider) {\n return $dataProvider->getConfiguration();\n }, $this->dataProviderPool->getAll()),\n 'user' => $user,\n 'contact' => $contact,\n ],\n ]);\n\n $context = new Context();\n $context->setGroups(['frontend', 'partialContact', 'fullRoute']);\n\n $view->setContext($context);\n $view->setFormat('json');\n\n return $this->viewHandler->handle($view);\n }",
"public function getViewConfig()\n {\n if ($this->_oViewConf === null) {\n $this->_oViewConf = oxNew('oxViewConfig');\n }\n\n return $this->_oViewConf;\n }",
"public function getViewPath(){\n /*\n $array = array();\n $array['theme_name'] = Yii::app()->getTheme()->name;\n $array['theme_is_object'] = is_object(Yii::app()->getTheme());\n $array['theme_viewPath'] = Yii::app()->getTheme()->viewPath;\n $array['parent_viewPath'] = parent::getViewPath(false);\n $array['parent_paths'] = parent::getViewPath(true);\n $array['ext_path'] = Yii::getPathOfAlias('ext');\n $array['file_dirname'] = dirname(__FILE__);\n $array['class_name'] = get_class($this);\n $class=new ReflectionClass($array['class_name']);\n $array['class_filename'] = $class->getFileName();\n $array['class_dirname'] = dirname($class->getFileName());\n MyFunctions::echoArray( $array, $this->controller->pars );\n /**/\n if( ($theme=Yii::app()->getTheme())!==null ){\n // create dir as: /moduleName/widgetPath under theme's views path\n $class = new ReflectionClass( get_class($this) );\n $dir = str_replace( Yii::getPathOfAlias('ext'), '', dirname( $class->getFilename() ) );\n return Yii::app()->getTheme()->viewPath . $dir;\n } else { // return default viewPath\n return parent::getViewPath(false);\n }\n }",
"private function configureTemplate(){\n\t\t$viewdirectory = DIR_MODULE . $this->getModule()->getLocation() . 'view/';\n\t\t// add module css\n\t\t$template = $this->getTemplate();\n\t\t$template->addStyle('<link href=\"'.$viewdirectory.'css/style.css\" rel=\"stylesheet\"/>');\n\t\n\t\t$template->setPageTitle($this->getModule()->getDisplayedName());\n\t}",
"public function ThemeEngineRender(){\n\t\t// Get the path and settings for the Theme\n\t\t$themeName = $this->config['theme']['name'];\n\t\t$themePath = RAND_INSTALL_PATH . \"/themes/{$themeName}\";\n\t\t$themeUrl = $this->request->base_url . \"themes/{$themeName}\"; \n\n\t\t//Add stylesheet\n\t\t$this->data['stylesheet'] = \"{$themeUrl}/style.css\";\n\n\t\t//Include global functions and functions.php from the theme\n\t\t$rd = &$this;\n\t\t$globalFunctions = RAND_INSTALL_PATH . \"themes/functions.php\";\n\t\tif(is_file($globalFunctions)){\n\t\t\tinclude $globalFunctions;\n\t\t}\n\t\t$functionsPath = \"{$themePath}/functions.php\";\n\t\tif(is_file($functionsPath)){\n\t\t\tinclude $functionsPath;\n\t\t}\n\n\t\textract($this->data);\n\t\tinclude(\"{$themePath}/default.tpl.php\");\n\n\n\n\t}",
"public function render() {\n return [\n '#theme' => $this->themeFunctions(),\n '#view' => $this->view,\n '#options' => $this->options,\n '#rows' => $this->view->result,\n '#mapping' => $this->defineMapping(),\n ];\n }",
"private function configureTemplate(){\n\t\t$viewdirectory = DIR_MODULE . $this->getModule()->getLocation() . 'view/';\n\t\t// add module css\n\t\t$template = $this->getTemplate();\n\t\t$template->addStyle('<link href=\"'.$viewdirectory.'css/style.css\" rel=\"stylesheet\"/>');\n\n\t\t$template->setPageTitle($this->getModule()->getDisplayedName());\n\t}",
"function defaultTemplate() {\n//\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n//\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n//\t\t$this->api->pathfinder->addLocation($addon_location,array(\n//\t\t\t'js'=>'templates/js',\n//\t\t\t'css'=>'templates/css',\n// 'template'=>'templates',\n//\t\t))->setParent($l);\n\n return array('view/draw');\n }",
"public function view(): array {\n return [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => ['container'],\n 'id' => 'swagger-ui',\n ],\n '#attached' => [\n 'library' => [\n 'donl_api/api',\n ],\n 'drupalSettings' => [\n 'donl_api' => [\n 'url' => $this->baseUrl . '/' . drupal_get_path('module', 'donl_api') . '/swagger.json',\n ],\n ],\n ],\n ];\n }",
"public function render() {\n\n\t\t$context = $this->options;\n\t\t$context = $this->load($context);\n\n\t\textract($context);\n\n\t\tinclude __DIR__ . '/../views/' . $this->template();\n\t}",
"public function getViewTpl(){\n return $this->templates['view'];\n }",
"public function view()\n {\n $this->processParametersForView();\n \n if ($this->view === 'main/base') { //Legacy and body\n extract($this->data);\n \n include(__DIR__ . '/../View/' . $this->view . '.php');\n \n return;\n }\n \n //Templates\n $this->latteView();\n }",
"protected function generateConfiguration()\n {\n if (!in_array($this->format, array('yml', 'xml', 'php'))) {\n return;\n }\n\n $target = sprintf(\n '%s/Resources/config/routing/%s.%s',\n $this->bundle->getPath(),\n strtolower(str_replace('\\\\', '_', $this->entity)),\n $this->format\n );\n\n $this->renderFile('rest/config/routing.'.$this->format.'.twig', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n ));\n }",
"public function config()\n {\n\n return view('account.config');\n }",
"public function getView() {\n return $this->setView();\n }",
"public function getViewLayout()\n {\n if(isset($_GET['debug'])) $this->debug();\n\n switch (true) {\n case isset($this->items):\n return 'man_toc';\n case isset($this->methods):\n return 'man_group';\n default:\n return 'man_single';\n }\n }",
"private function renderView(){\n\t\trequire($this->ViewFile);\n\t}",
"public function renderJSConfig() {\n\t\n\t\t$config = $this->wire('config'); \n\t\n\t\t$jsConfig = $config->js();\n\t\t$jsConfig['debug'] = $config->debug;\n\t\n\t\t$jsConfig['urls'] = array(\n\t\t\t'root' => $config->urls->root, \n\t\t\t'admin' => $config->urls->admin, \n\t\t\t'modules' => $config->urls->modules, \n\t\t\t'core' => $config->urls->core, \n\t\t\t'files' => $config->urls->files, \n\t\t\t'templates' => $config->urls->templates,\n\t\t\t'adminTemplates' => $config->urls->adminTemplates,\n\t\t\t); \n\t\n\t\treturn \"var config = \" . json_encode($jsConfig);\n\t}",
"public function _render($view)\n {\n $this->data['admin'] = false;\n\n $data = $this->data;\n $data['css'] = $this->css;\n $data['js'] = $this->js;\n $data['bower_components'] = $this->bower_components;\n\n $data['title'] = $this->title;\n $data['description'] = $this->description;\n $data['keywords'] = $this->keywords;\n $data['author'] = $this->author;\n\n $data['head'] = $this->load->view('templates/head', $data, true);\n if (isset($data['user'])) {\n $data['nav'] = $this->load->view('templates/logged/nav', $data, true);\n } else {\n $data['nav'] = $this->load->view('templates/nav', $data, true);\n }\n $data['scripts'] = $this->load->view('templates/scripts', $data, true);\n $data['footer'] = $this->load->view('templates/footer', $data, true);\n\n $data['content'] = $this->load->view($view, $data, true);\n\n $this->load->view('templates/skeleton', $data);\n }",
"public function getThemeLayout();",
"protected function view()\n {\n return $this->app['view'];\n }",
"private function initViewVars()\n {\n $this->viewEngine->vars['loggedUserId'] = $this->model->config->getVar('loggedUserId');\n $this->viewEngine->vars['isUserLogged'] = $this->model->config->getVar('isUserLogged');\n $this->viewEngine->vars['loggedUserRole'] = $this->model->config->getVar('loggedUserRole');\n\n $this->viewEngine->vars['charset'] = $this->model->config->getModuleVar('common', 'charset');\n $this->viewEngine->vars['stylesFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->model->config->getModuleVar('common', 'styles_folder');\n $this->viewEngine->vars['scriptsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'scripts_folder');\n $this->viewEngine->vars['imagesFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'images_folder');\n $this->viewEngine->vars['viewsFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'views_folder');\n $this->viewEngine->vars['controllersFolder'] = JAPA_PUBLIC_DIR . 'scripts/'.$this->model->config->getModuleVar('common', 'controllers_folder');\n $this->viewEngine->vars['urlBase'] = $this->router->getBase();\n $this->viewEngine->vars['adminWebController'] = $this->model->config->getVar('default_module_application_controller');\n $this->viewEngine->vars['default_lang'] = $this->model->config->getModuleVar('common', 'default_lang');\n }",
"protected function renderOutput()\n {\n\t\t\n\t\t// $menu = $this->getMenu();\n\t\t\n\t\t//dd($menu);\n\t\t\n\t\t// $navigation = view(config('settings.theme').'.navigation')->with('menu',$menu)->render();\n\t\t// $this->vars = array_add($this->vars,'navigation',$navigation);\n\t\t\n\t\t// if($this->contentRightBar) {\n\t\t\t// $rightBar = view(config('settings.theme').'.rightBar')->with('content_rightBar',$this->contentRightBar)->render();\n\t\t\t// $this->vars = array_add($this->vars,'rightBar',$rightBar);\n\t\t// }\n\t\t\n\t\t$this->vars = array_add($this->vars,'keywords',$this->keywords);\n\t\t$this->vars = array_add($this->vars,'meta_desc',$this->meta_desc);\n\t\t$this->vars = array_add($this->vars,'title',$this->title);\n\t\t\n $header = view(config('settings.theme') . $this->header_temp)->render();\n $this->vars = array_add($this->vars, 'header', $header);\n\t\t\n\t\t$footer = view(config('settings.theme'). $this->footer_temp)->render();\n\t\t$this->vars = array_add($this->vars, 'footer', $footer);\n \n return view($this->template)->with($this->vars);\n\t\t\n\t}",
"public function getDesignTheme();",
"protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\n\n\t\t\t$cb_js_var = array(\n\t\t\t\t'site_url' => url('/'),\n\t\t\t\t'admin_url' => url('/admin'),\n\t\t\t\t'admin_assets_url' => asset('packages/vizioart/cookbook/'),\n\t\t\t\t'admin_api_url' => url('/admin/api')\n\t\t\t);\n\n\n\t\t\t$this->layout = View::make($this->layout, array(\n\t\t\t\t'cb_js_var' => $cb_js_var\n\t\t\t));\n\t\t}\n\t}",
"public function setLibraryViewConfiguration()\r\n {\r\n // Gets the library configuration manager\r\n $this->libraryConfigurationManager = $this->getController()->getLibraryConfigurationManager();\r\n\r\n // Gets the view identifier\r\n $this->viewIdentifier = $this->libraryConfigurationManager->getViewIdentifier($this->viewType);\r\n\r\n // Gets the view configuration\r\n $this->libraryViewConfiguration = $this->libraryConfigurationManager->getViewConfiguration($this->viewIdentifier);\r\n }",
"public function config() {\n return view('user.config');\n }",
"public function viewName(): string\n {\n return $this->config['view'];\n }",
"public function getView()\n {\n $options = $this->getOptions();\n\t\t\n if( $options['enabled'] )\n {\n \t\n if( null === $this->_view )\n {\n // Initialize view\n $view = new Zend_View();\n $view->doctype( $options['doctype'] );\n $view->headTitle( $options['title'] );\n $view->headMeta()->appendHttpEquiv('Content-Type',$options['content-type']);\n\t\t\t\t$view->addHelperPath(APPLICATION_PATH . '/../library/App/View/Helper','App_View_Helper');\n // Add it to the ViewRenderer\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper( 'ViewRenderer' );\n $viewRenderer->setView( $view );\n\n $this->_view = $view;\n }\n\n return $this->_view;\n }\n }",
"protected function render()\n {\n $sControllerDriver = \\Limbonia\\Controller\\Cli::driver($this->oRouter->controller);\n\n if (empty($sControllerDriver))\n {\n try\n {\n $aAvailableModes = [];\n\n foreach (\\Limbonia\\App::viewDirs() as $sDir)\n {\n foreach (glob($sDir . '/' . $this->type . '/*.php') as $sFileName)\n {\n $aAvailableModes[] = basename($sFileName, '.php');\n }\n\n foreach (glob($sDir . '/' . $this->type . '/*/*.php') as $sFileName)\n {\n $aAvailableModes[] = basename(dirname($sFileName)) . '_' . basename($sFileName, '.php');\n }\n }\n\n $aAvailableModes = array_unique($aAvailableModes);\n sort($aAvailableModes);\n $iPos = array_search('default', $aAvailableModes);\n\n if (false !== $iPos)\n {\n unset($aAvailableModes[$iPos]);\n }\n\n $iPos = array_search('error', $aAvailableModes);\n\n if (false !== $iPos)\n {\n unset($aAvailableModes[$iPos]);\n }\n\n if (count($aAvailableModes) > 0)\n {\n $this->addOption\n ([\n 'long' => 'mode',\n 'value' => \\Limbonia\\App\\Cli::OPTION_VALUE_REQUIRE,\n 'desc' => \"This utility has the following built-in modes:\\n\\t\\t\\t\\t\" . implode(\"\\n\\t\\t\\t\\t\", $aAvailableModes)\n ]);\n }\n\n $this->processOptions();\n return $this->viewRender($this->generateViewFile());\n }\n catch (Exception $e)\n {\n $this->viewData('failure', 'Failed to generate the requested data: ' . $e->getMessage());\n return $this->viewRender('error');\n }\n }\n\n try\n {\n $oCurrentController = $this->controllerFactory($sControllerDriver);\n $this->sViewName = strtolower($sControllerDriver) . '_' . $this->oRouter->action;\n $oCurrentController->prepareView();\n $this->viewData('options', $this->processOptions());\n $sControllerView = $oCurrentController->getView();\n return $this->viewRender($sControllerView);\n }\n catch (\\Exception $e)\n {\n $this->viewData('failure', \"The controller {$this->oRouter->controller} could not be instaniated: \" . $e->getMessage());\n return $this->viewRender('error');\n }\n }",
"public function config($templatify = false)\n {\n $config = parent::config($templatify);\n\n $config['options']['class'] = $config['options']['class'] . ' model-report-item-panel';\n\n // ----------------------------------------------------------------------\n // PANEL\n // ----------------------------------------------------------------------\n $panelId = strtolower(htmlentities(\\Yii::$app->t::getModelClassName($config['model']) . $config['reportItemName'] . '-' . $config['id']));\n $config['panelId'] = $panelId;\n $this->outputJsData([\n 'panelId' => $panelId,\n 'reportItem' => ArrayHelper::getValue($config, 'reportItem.widgetConfig', []),\n 'modelName' => $config['modelName'],\n 'title' => ArrayHelper::getValue($config, 'reportItem.title', null),\n 'reportItemName' => $config['reportItemName'],\n 'apiEndpoint' => \\Yii::$app->reportsManager->apiEndpoint,\n ]);\n return $config;\n }",
"public function renderLayout();",
"public function run()\n {\n return view('voyager::dimmer', array_merge($this->config, [\n 'icon' => '',\n 'title' => '',\n 'text' => '',\n 'button' => [\n 'text' => '',\n 'link' => '',\n ],\n 'image' => '',\n ]));\n }",
"function get_view()\n{\n return Zend_Registry::get('view');\n}",
"public function render()\n {\n $theme = Yii::app()->theme->name;\n $name = get_class($this);\n $templateName = \"themes/$theme/templates/$name.xhtml\";\n $content = $this->renderContent();\n if (!file_exists($templateName))\n {\n $templateName = \"themes/default/templates/$name.xhtml\";\n }\n if (file_exists($templateName))\n {\n $span = \"<span class=\\\"$name\\\" />\";\n $templateSource = file_get_contents($templateName);\n if (strpos($templateSource, $span))\n {\n $content = str_replace($span, $content, $templateSource);\n }\n $content = \"<!-- Start of $templateName -->$content<!-- End of $templateName -->\";\n }\n $classes = RuntimeUtil::getClassHierarchy(get_class($this), 'View');\n if ($this->isUniqueToAPage())\n {\n $id = \" id=\\\"$name\\\"\";\n unset($classes[0]);\n }\n else\n {\n $id = $this->getId();\n if ($id != null)\n {\n $id = \" id=\\\"$id\\\"\";\n }\n }\n $classes = join(' ', array_merge($this->getCssClasses(), $classes));\n if ($classes != '')\n {\n $classes = \" class=\\\"$classes\\\"\";\n }\n $calledClass = get_called_class();\n if (YII_DEBUG)\n {\n $reflection = new ReflectionClass( $calledClass );\n $classFile = $reflection->getFileName();\n return \"<!--Called in: $classFile--><div\" . $id . $classes . $this->getViewStyle() . \">$content</div>\";\n }\n else\n {\n return \"<div\" . $id . $classes . $this->getViewStyle() . \">$content</div>\";\n }\n }",
"public function _config_para_view() {\n $this->controller->set('ControleAcessoConfig', $this->config);\n }",
"function render() \n {\n return View::factory($this->template_path . get_class($this))\n ->set('grid', $this)\n ->render();\n \n }",
"protected function wrapViewAndDisplay($view) {\n\n\t $outputMode = KenedoPlatform::p()->getOutputMode();\n\n\t if ($outputMode == 'view_only') {\n $view->display();\n }\n elseif ($outputMode == 'in_html_doc') {\n $view->display();\n }\n elseif (strpos($view->view,'admin') === 0 && $view->view != 'admin') {\n $wrapperView = KenedoView::getView('ConfigboxViewAdmin');\n $wrapperView->contentHtml = $view->getHtml();\n $wrapperView->display();\n }\n\t else {\n $view->display();\n }\n\n\t}",
"public function GeneralSettingsView(){\n\t\t//Meta is usually not setup yet, so we manually do this before loading css file\n\t\t$this->meta = new Meta();\n\t\t\n\t\t//This class requires an extra css file\n\t\t$this->getMeta()->addExtra('<link href=\"core/fragments/css/admin.css\" rel=\"stylesheet\" type=\"text/css\" />');\n\t}",
"public function render () { \n $this->load->view( $this->template_path($this->layout) , array(\n 'page_title' => $this->load_title(),\n 'js_files' => $this->load_js(),\n 'css_files' => $this->load_css(),\n 'body_class' => $this->load_body_class()\n ));\n return $this;\n }",
"protected function getView()\n {\n $this->getBootstrap()->bootstrap('view');\n return $this->getBootstrap()->getResource('view');\n }",
"public function __invoke()\n {\n $account = Auth::user();\n\n return $this->getView('settings', compact('account'));\n }",
"public function index()\n {\n $this->adminTheme = ThemeSetting::withoutGlobalScope(CompanyScope::class)->where('panel', 'superadmin')->first();\n return view('super-admin.theme-settings.edit', $this->data);\n }",
"public function render()\n {\n parent::render();\n\n $myConfig = $this->getConfig();\n $oParentView = $this->getParent();\n\n // add content for main menu\n $oContentList = oxNew('oxcontentlist');\n $oContentList->loadMainMenulist();\n $oParentView->setMenueList($oContentList);\n\n return;\n }",
"function defaultTemplate() {\n\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n\t\t$this->api->pathfinder->addLocation($addon_location,array(\n\t\t\t//'js'=>'templates/js',\n\t\t\t//'css'=>'templates/css',\n //'template'=>'templates',\n\t\t))->setParent($l);\n\n //return array('view/lister/tags');\n return parent::defaultTemplate();\n }",
"public function __viewTemplate()\n {\n $this->_context[2] = 'single';\n $this->addStylesheetToHead(self::$assets_base_url . 'editor.css');\n $this->addStylesheetToHead(self::$assets_base_url . 'highlighters/highlight-xsl.css');\n $this->addScriptToHead(self::$assets_base_url . 'editor.js');\n $this->addScriptToHead(self::$assets_base_url . 'highlighters/highlight-xsl.js');\n $name = $this->_context[1];\n $filename = $name . '.xsl';\n $title = $filename;\n $this->setTitle(__(('%1$s – %2$s – %3$s'), array($title, __('Pages'), __('Symphony'))));\n //$this->setPageType('table');\n $this->Body->setAttribute('spellcheck', 'false');\n $this->appendSubheading($title);\n $breadcrumbs = array(\n Widget::Anchor(__('Pages'), SYMPHONY_URL . '/blueprints/pages/'),\n new XMLElement('span', __(Helpers::capitalizeWords($name)))\n );\n $this->insertBreadcrumbs($breadcrumbs);\n \n $this->insertAction(\n Widget::Anchor(\n __('Edit Page'), \n SYMPHONY_URL . '/blueprints/pages/edit/' . PageManager::fetchIDFromHandle($name) . '/',\n __('Edit Page Configuration'),\n 'button'\n )\n );\n\n $this->Form->setAttribute('class', 'columns');\n $this->Form->setAttribute('action', SYMPHONY_URL . '/blueprints/pages/' . $name . '/');\n\n $fieldset = new XMLElement('fieldset');\n $fieldset->appendChild(Widget::Input('fields[name]', $filename, 'hidden'));\n $fieldset->appendChild($label);\n //$fieldset->appendChild((isset($this->_errors['name']) ? Widget::Error($label, $this->_errors['name']) : $label));\n\n $label = Widget::Label(__('Body'));\n $label->appendChild(\n Widget::Textarea(\n 'fields[body]',\n 30,\n 100,\n $filename ? htmlentities(file_get_contents(WORKSPACE . '/pages/' . $filename), ENT_COMPAT, 'UTF-8') : '',\n array('id' => 'text-area', 'class' => 'code hidden')\n )\n );\n //$fieldset->appendChild((isset($this->_errors['body']) ? Widget::Error($label, $this->_errors['body']) : $label));\n\n $fieldset->appendChild($label);\n $this->Form->appendChild($fieldset);\n\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n new XMLElement('p', __('Saving')),\n array('id' => 'saving-popup')\n )\n );\n //$this->_context = array('edit', 'pages', 'single');\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n Widget::Input(\n 'action[save]',\n __('Save Changes'),\n 'submit',\n array('class' => 'button', 'accesskey' => 's')\n ),\n array('class' => 'actions')\n )\n );\n }",
"function renderConfigForm() {\n\t}",
"public function render($config)\n {\n extract($config); //extract all params in config array\n $output = \"\";\n if(is_readable($view_path)){\n ob_start();\n extract($data);\n require $view_path;\n $output = ob_get_contents();\n ob_end_clean();\n }\n if($return_output){\n return $output;\n }\n else{\n $response->send($output);\n }\n }",
"protected static function config()\n {\n return [\n 'view' => ['viewRenderClass' => 'Ice:Php', 'layout' => ''],\n 'input' => [\n 'resources' => [\n 'default' => [\n 'modules' => [\n 'Ice' => [\n 'vendor_js' => [\n 'path' => 'js/vendor/',\n 'js' => ['-modernizr-2.8.3.min.js'],\n 'css' => [],\n 'isCopy' => false,\n ],\n 'vendor_css' => [\n 'path' => 'css/vendor/',\n 'js' => [],\n 'css' => ['empty.css'],\n 'isCopy' => false,\n ],\n 'vendor' => [\n 'path' => 'vendor/',\n 'js' => [],\n 'css' => [],\n 'isCopy' => false,\n ],\n 'common' => [\n 'path' => '',\n 'js' => [],\n 'css' => ['css/flags.css', 'css/preloader.css'],\n 'isCopy' => false,\n ],\n 'module' => [\n 'path' => 'Ice/',\n 'js' => ['Helper/String.js', 'Ui/Form.js', 'Ui/Menu.js', 'Ui/Data.js'],\n 'css' => [],\n 'isCopy' => false,\n ],\n ],\n ],\n// 'vendors' => [\n// 'jquery/jquery-ui' => [\n// 'jquery' => [\n// 'path' => '/',\n// 'js' => ['external/jquery/jquery.js', '-jquery-ui.min.js'],\n// 'css' => ['-jquery-ui.min.css', '-jquery-ui.structure.min.css', '-jquery-ui.theme.min.css'],\n// 'isCopy' => true,\n// ],\n// ],\n// 'twbs/bootstrap' => [\n// 'bootstrap' => [\n// 'path' => 'dist/',\n// 'js' => ['-js/bootstrap.min.js'],\n// 'css' => ['-css/bootstrap.min.css', '-css/bootstrap-theme.min.css'],\n// 'isCopy' => true,\n// 'css_replace' => ['url(../', 'url('],\n// ],\n// ],\n// ],\n ],\n ],\n 'js' => ['default' => []],\n 'css' => ['default' => []],\n 'routeName' => ['default' => ''],\n 'context' => ['default' => '/resource/']\n ],\n 'ttl' => 3600\n ];\n }",
"public function getViewHelperConfig()\n {\n return array(\n 'factories' => array(\n 'comments' => function ($serviceManager) {\n return new \\Swaggerdile\\View\\Helper\\Comments($serviceManager);\n },\n 'ads' => function ($serviceManager) {\n return new \\Swaggerdile\\View\\Helper\\Ads($serviceManager);\n },\n 'isAdult' => function($serviceManager) {\n return new \\Swaggerdile\\View\\Helper\\IsAdult($serviceManager);\n },\n )\n );\n }",
"function renderApplication(){\n\tinclude getApplicationSystemPath() . \"/public/layout/layout.php\";\t\n}",
"public function render() {\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Executing all modules methods.\" );\n\t\tW2P::getInstance()->modules()->exec_all_functions();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Generating rendering of the view: {$this->view}\" );\n\t\t\n\t\tob_start ();\n\t\tinclude_once (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/views/' . $this->view . '.phtml');\n\t\t$this->content = ob_get_clean ();\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Content of the rendered view\" );\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Adding to the project layout\" );\n\t\t\n\t\tinclude (W2P_INCLUDE . W2P::getInstance()->configuration()->layout_path . '/' . $this->layout . '.phtml');\n\t\t\n\t\tW2P::getInstance()->debug()->_debug_add_content ( \"Layout successfully mastered\" );\n\t\t\n\t\tif (W2P::getInstance()->configuration()->debug)\n\t\t\tW2P::getInstance()->debug()->save_debug ( W2P::getInstance()->configuration()->debug_format );\n\t}",
"public function compose(View $view)\n {\n $view->withAboutApp(Markdown::convertToHtml($this->config->get('setting.app_about')));\n $view->withAppAnalytics($this->config->get('setting.app_analytics'));\n $view->withAppAnalyticsGoSquared($this->config->get('setting.app_analytics_gs'));\n $view->withAppAnalyticsPiwikUrl($this->config->get('setting.app_analytics_piwik_url'));\n $view->withAppAnalyticsPiwikSiteId($this->config->get('setting.app_analytics_piwik_site_id'));\n $view->withAppBanner($this->config->get('setting.app_banner'));\n $view->withAppBannerStyleFullWidth($this->config->get('setting.style_fullwidth_header'));\n $view->withAppBannerType($this->config->get('setting.app_banner_type'));\n $view->withAppDomain($this->config->get('setting.app_domain'));\n $view->withAppGraphs($this->config->get('setting.display_graphs'));\n $view->withAppLocale($this->config->get('setting.app_locale'));\n $view->withAppStylesheet($this->config->get('setting.stylesheet'));\n $view->withAppUrl($this->config->get('app.url'));\n $view->withAppHeader($this->config->get('setting.header'));\n $view->withAppFooter($this->config->get('setting.footer'));\n $view->withAppName($this->config->get('setting.app_name'));\n $view->withShowSupport($this->config->get('setting.show_support'));\n $view->withAutomaticLocalization($this->config->get('setting.automatic_localization'));\n $view->withEnableExternalDependencies($this->config->get('setting.enable_external_dependencies'));\n $view->withShowTimezone($this->config->get('setting.show_timezone'));\n $view->withAppRefreshRate($this->config->get('setting.app_refresh_rate'));\n $view->withTimezone($this->dates->getTimezone());\n $view->withSiteTitle($this->config->get('setting.app_name'));\n $view->withFontSubset($this->config->get('langs.'.$this->config->get('app.locale').'.subset', 'latin'));\n $view->withOnlyDisruptedDays($this->config->get('setting.only_disrupted_days'));\n $view->withDashboardLink($this->config->get('setting.dashboard_login_link'));\n $view->withEnableSubscribers($this->config->get('setting.enable_subscribers'));\n }",
"public function index()\n {\n $this->data['themes'] = $this->model->getThemes();\n return view($this->getView(), $this->data);\n }",
"public function style_settings() {\n include __DIR__ . \"/views/style_settings.php\";\n }",
"public function getView()\n {\n if (!$this->view) {\n $this->view = Kerisy::$app->get('view');\n $this->view->setDirectory($this->getViewPath());\n }\n return $this->view;\n }",
"private function view()\n {\n if (isset(static::$view)) {\n return static::$view;\n }\n\n $classNamespace = $this->getModuleName();\n $className = $this->getComponentName();\n\n return \"{$classNamespace}::blocks.{$className}\";\n }",
"public function getView()\n {\n return $this->getService('view');\n }",
"function theme_view( $key, $params = [] )\n {\n if ( Resolver::exists( 'theme' ) )\n Resolver::get( 'theme' )->view( $key, $params );\n }",
"public function getContent()\n\t{\n\t\t$this->context->smarty->assign('module_dir', $this->_path);\n\n\t\treturn $this->display(__FILE__, 'views/templates/admin/configure.tpl');\n\n\t}",
"private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}",
"public function getTheme()\n {\n $this->appinfo['theme_vendor'] = DEF_VENDOR;\n $this->appinfo['theme_directory'] = DEF_THEME;\n $this->appinfo['theme_path'] = DIR_APP.DIRECTORY_SEPARATOR.$this->appinfo['theme_vendor'].DIRECTORY_SEPARATOR.DIR_THEMES.DIRECTORY_SEPARATOR.$this->appinfo['theme_directory'];\n $this->appinfo['theme_webpath'] = DIR_APP.'/'.$this->appinfo['theme_vendor'].'/'.DIR_THEMES.'/'.$this->appinfo['theme_directory'];\n }",
"private function registerViewFinder() {\n $paths = \\Config::get('view.paths');\n\t\tarray_unshift($paths, DIR_TEMPLATE);\n\t\t\\Config::set('view.paths', $paths);\n }",
"public function getViewTemplate();",
"public function getViewHelperConfig()\n {\n return [\n 'invokables' => [\n 'applicationCalendar' => 'Application\\View\\Helper\\ApplicationCalendar',\n 'applicationSetting' => 'Application\\View\\Helper\\ApplicationSetting',\n 'applicationRoute' => 'Application\\View\\Helper\\ApplicationRoute',\n 'applicationRandId' => 'Application\\View\\Helper\\ApplicationRandId',\n 'applicationDate' => 'Application\\View\\Helper\\ApplicationDate',\n 'applicationHumanDate' => 'Application\\View\\Helper\\ApplicationHumanDate',\n 'applicationIp' => 'Application\\View\\Helper\\ApplicationIp',\n 'applicationFileSize' => 'Application\\View\\Helper\\ApplicationFileSize'\n ],\n 'factories' => [\n 'applicationBooleanValue' => function() {\n return new \\Application\\View\\Helper\\ApplicationBooleanValue($this->serviceLocator->get('Translator'));\n },\n 'applicationAdminMenu' => function() {\n $adminMenu = $this->serviceLocator\n ->get('Application\\Model\\ModelManager')\n ->getInstance('Application\\Model\\ApplicationAdminMenu');\n\n return new \\Application\\View\\Helper\\ApplicationAdminMenu($adminMenu->getMenu());\n },\n 'applicationFlashMessage' => function() {\n $flashMessenger = $this->serviceLocator\n ->get('ControllerPluginManager')\n ->get('flashMessenger');\n \n $messages = new \\Application\\View\\Helper\\ApplicationFlashMessage();\n $messages->setFlashMessenger($flashMessenger);\n \n return $messages;\n },\n 'applicationConfig' => function() {\n return new \\Application\\View\\Helper\\ApplicationConfig($this->serviceLocator->get('config'));\n },\n ]\n ];\n }",
"public function view()\n {\n return $this->view;\n }",
"public function view()\n {\n return $this->view;\n }",
"public function index()\n {\n $apiKey = Config::where('name', '=', 'API_KEY')->first();\n $slackHookUrl = Config::where('name', '=', 'SLACK_HOOK_URL')->first();\n $storageLocation = Config::where('name', '=', 'STORAGE_LOCATION')->first();\n\n return view('configs',\n [\n 'apiKey' => $apiKey,\n 'slackHookUrl' => $slackHookUrl,\n 'storageLocation' => $storageLocation\n ]\n );\n }",
"public function render( $data = null )\r\n\t{\r\n\t\t$form\t=\tdunloader( 'form', true );\r\n\t\t$db\t\t=\tdunloader( 'database', true );\r\n\t\t\r\n\t\t$db->setQuery( \"SELECT * FROM mod_intouch_settings\" );\r\n\t\t$results\t= $db->loadObjectList();\r\n\t\t$values\t\t= array();\r\n\t\t\r\n\t\t// Set the values up\r\n\t\tforeach ( $results as $result ) $values[$result->key] = $result->value;\r\n\t\t\r\n\t\t$views\t=\tdunloader( 'views', 'intouch' );\r\n\t\t$views->setData( array( 'fields' => $form->setValues( $values, 'intouch.config' ) ) );\r\n\t\t\r\n\t\treturn parent :: render( $views->render( 'configure' ) );\r\n\t}",
"public function render_view_mode()\n {\n }",
"function admin_configuration()\n{\n global $app;\n\n $app->render('admin_configuration.html', [\n 'page' => mkPage(getMessageString('admin'), 0, 2),\n 'mailers' => mkMailers(),\n 'ttss' => mkTitleTimeSortOptions(),\n 'isadmin' => is_admin()]);\n}",
"public function render() {\n\t\tif ( false === (bool) $this->data( 'customize' ) ) {\n\t\t\t$type = $this->setting( 'type' );\n\t\t\t$defaults = (array) $this->get_option( 'newsroom-settings', 'component_defaults', \"{$type}_call_to_action\", 'data' );\n\t\t\t$this->set_data( $defaults );\n\t\t}\n\n\t\tif ( 'sticky' === $this->setting( 'layout' ) ) {\n\t\t\t\\ai_get_template_part(\n\t\t\t\t$this->get_component_path( 'sticky' ),\n\t\t\t\t[\n\t\t\t\t\t'component' => $this,\n\t\t\t\t\t'stylesheet' => 'sticky-cta',\n\t\t\t\t]\n\t\t\t);\n\t\t} else {\n\t\t\t\\ai_get_template_part(\n\t\t\t\t$this->get_component_path( $this->setting( 'type' ) ),\n\t\t\t\t[\n\t\t\t\t\t'component' => $this,\n\t\t\t\t\t'stylesheet' => $this->slug,\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\t}",
"public function generate()\r\n {\r\n $loader = new ContentLoader($this->_viewVariables);\r\n $loader->initContent($this->_contentViewPath);\r\n $this->_layout = $loader->initLayout($this->_layoutPath);\r\n echo $this->_layout;\r\n }",
"public function render()\n {\n return view(\"layouts.{$this->layout}\");\n }",
"protected function generateView() {\n \n $this->getViewData();\n $this->generatePageHeader(\"Kunde\");\n $this->generatePageBody();\n $this->generatePageFooter();\n }",
"function render($view, $data = array(), $return_html = FALSE) {\n\t\t\n\t\textract($data);\n\t\t\n\t\t// globalize variables as workaround to weird extract bug\n\t\tforeach($data AS $key => $val){\n\t\t\tglobal ${$key};\n\t\t\t${$key} = $val;\n\t\t}\n\n\t\t\n\t\t$view = str_replace(EXT,\"\",$view); // just a little clean up here\n\t\t\t\t\n\t\t$projectnum = $this->config->item('projectnum');\n\t\t\t\t\n\t\t$module = str_replace(APPPATH,\"\",$this->module_path);\n\t\t$module = str_replace(\"custom_modules/\",\"\",$module);\n\t\t$module = str_replace(\"core_modules/\",\"\",$module);\t\n\t\t$module = str_replace($projectnum . \"_modules/\",\"\",$module);\t\n\t\t$module = str_replace(\"/widgets/\",\"\",$module);\t\n\t\t\n\n\n\t\t$viewfiles = array();\n\t\t\n\t\t$pathfix = str_replace(APPPATH,\"\",$this->module_path);\n\t\t$pathfix = str_replace(\"core_modules\",\"modules\",$pathfix);\n\t\t$pathfix = str_replace(\"custom_modules\",\"modules\",$pathfix);\n\t\t\n\t\t\n\t\t$viewfiles[] = TEMPLATEPATH . \"/modules/{$projectnum}/{$module}/standard/widgets/\" . $view.EXT;\n\t\t$viewfiles[] = TEMPLATEPATH . \"/modules/default/{$module}/standard/widgets/\" . $view.EXT;\n\t\t\n\t\t$viewfiles[] = APPPATH . $projectnum . \"/\" . $pathfix . \"views/standard/\" . $view.EXT;\n\t\t\n\t\t$viewfiles[] = APPPATH . $projectnum . \"/\" . $pathfix . \"views/\" . $view.EXT;\n\t\t\n\t\t$viewfiles[] = $this->module_path.'views/'.$projectnum . \"/\" . $view.EXT;\n\t\t\n\t\t$viewfiles[] = $this->module_path.'views/'.$view.EXT;\n\t\t\n\t\t\t\n\t\tforeach($viewfiles as $file){\n\t\t\t\t\n\t\t\t//echo \" SEEKING $file <br />\";\n\t\n\t\t\tif(file_exists($file)){\n\t\t\t\n\t\t\t\tif($return_html){\n\t\t\t\t\tob_start();\n\t\t\t\t}\t\n\t\t\t\tinclude($file);\n\t\t\t\t\n\t\t\t\tif($return_html){\n\t\t\t\t\n\t\t\t\t\t$return_html = ob_get_contents();\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\t\n\t\t\t\t\treturn $return_html;\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\t\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\t\t\n\t}",
"public function init()\n {\n $this->getBootstrap()->bootstrap('view');\n $options = $this->getOptions();\n if(!isset($options['theme'])){\n throw new Zend_Application_Resource_Exception('No theme name is supplied');\n }\n \n $options['layoutPath'] = APPLICATION_PATH . \"/../public/themes/\".$options['theme'];\n if(!file_exists($options['layoutPath'])){\n throw new Zend_Application_Resource_Exception('Theme given is not found');\n }\n\n $this->setOptions($options);\n if(!defined('THEME_BASE_URL'))\n define('THEME_BASE_URL', '/themes/'.$options['theme']);\n\n $view = $this->getLayout()->getView();\n $view->frontend($this->getOptions());\n\n if(file_exists($options['layoutPath'].'/views'))\n {\n $view->setScriptPath(APPLICATION_PATH.'/views/scripts');\n $view->addScriptPath($options['layoutPath'].'/views');\n }\n //now call to Zend layout resource plugin\n return parent::init();\n }",
"public function renderDefault() {\n\t\t$this->onlyForAdmins();\n\t\t$this->template->instances = $this->configManager->getInstances($this->fileName);\n\t}",
"public function getViewEnvironment()\n {\n return $this->view;\n }",
"private function __layoutContent()\n {\n return VIEWS . DS . 'Layout' . DS . 'base.php';\n }",
"public function view(){\n \t\t//get setting\n \t\t$setting = array();\n \t\tif($this->layoutWidgetInfo){\n \t\t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t\t}\n\n \t\t$categoryId = $setting['category_id'];\n \t\t$order_by = $setting['order_by'];\n \t\t$order_direction = $setting['order_direction'];\n\n //get productList in $categoryId\n $filter = array();\n $filter['p.status'] = 'A';\n //get all child of categoryId\n $child = array();\n CategoryExt::getChild($child, $categoryId);\n $childIds = $child;\n $childList = array();\n foreach ($childIds as $v){\n $childList[] = CategoryExt::getCategoryInfo($v);\n }\n $setting['childList'] = $childList;\n\n //get $categoryInfo\n $setting['categoryInfo'] = CategoryExt::getCategoryInfo($categoryId);\n\n //next\n array_push($child, $categoryId);\n if(count($child)){\n $filter['pc.category_id'] = array('in', '('.join(', ', $child).')', 'int');\n }\n $orderBy = array($order_by => $order_direction);\n $productList = ProductExt::getFilter($filter, $orderBy, 0, $this->settingDefault['items_limit']);\n $setting['productList'] = $productList;\n\n \t\t$setting['layoutWidgetInfo'] = $this->layoutWidgetInfo;\n\n \t\t//view\n include \"view.php\";\n \t}",
"protected function setupLayout()\n\t{\n\n $this->user = Auth::user();\n $this->theme = Theme::uses('default')->layout('default');\n $user = $this->user;\n $this->theme->bind('user', function() use($user)\n {\n return $user;\n });\n $cat = Category::all();\n $this->theme->bind('cat', function() use($cat)\n {\n return $cat;\n });\n if (Session::get('cart')){\n $cart_count = count(Session::get('cart'));\n $this->theme->bind('cart_count', function() use($cart_count)\n {\n return $cart_count;\n });\n }\n\t}",
"public function getView() {}",
"public function getView() {}",
"public function getSetup() \n {\n $this->view->showSetup();\n return $this->view;\n }"
] | [
"0.7216423",
"0.65727717",
"0.6475849",
"0.63279325",
"0.63176644",
"0.6239308",
"0.6227612",
"0.6226452",
"0.622049",
"0.6193899",
"0.6158485",
"0.6158485",
"0.61206955",
"0.60963935",
"0.609497",
"0.60807675",
"0.6060992",
"0.60442007",
"0.6030099",
"0.6025871",
"0.6019336",
"0.6012694",
"0.59970844",
"0.5992776",
"0.59689385",
"0.5949148",
"0.59421283",
"0.5923665",
"0.59233284",
"0.5920607",
"0.58893406",
"0.58828884",
"0.58797085",
"0.58759004",
"0.58616865",
"0.5859299",
"0.5841813",
"0.58278394",
"0.5818645",
"0.5813398",
"0.5807911",
"0.5800394",
"0.57995033",
"0.5790641",
"0.5786606",
"0.5778991",
"0.5777469",
"0.5773912",
"0.5770706",
"0.5747934",
"0.57218057",
"0.57069385",
"0.5702591",
"0.57002056",
"0.5698901",
"0.56985444",
"0.5696872",
"0.5691225",
"0.5690898",
"0.5690436",
"0.5688647",
"0.5672423",
"0.5665045",
"0.56623536",
"0.5661933",
"0.5649065",
"0.56478536",
"0.56400096",
"0.56307006",
"0.56210864",
"0.5621003",
"0.56191206",
"0.5614742",
"0.5609756",
"0.5608212",
"0.5606826",
"0.56026596",
"0.5601968",
"0.55977684",
"0.55928683",
"0.5590068",
"0.5590068",
"0.5589284",
"0.5589073",
"0.55868566",
"0.5578208",
"0.5563808",
"0.5554556",
"0.55469334",
"0.55417585",
"0.55336004",
"0.5531844",
"0.5523198",
"0.5520645",
"0.5518372",
"0.5518149",
"0.5514756",
"0.5514667",
"0.5514667",
"0.5510561"
] | 0.57904893 | 44 |
really should only be used in testing | public static function set(string $key, $value)
{
if (!self::$configLoaded) {
self::loadConfig();
}
self::$config[$key] = $value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function helper()\n\t{\n\t\n\t}",
"protected function test9() {\n\n }",
"private function _i() {\n }",
"protected function testObjects() {\n }",
"protected function __init__() { }",
"public function testPingTreeGetItem()\n {\n }",
"private function __construct () {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"final private function __construct() {}",
"final private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"protected function testObject() {\n }",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}"
] | [
"0.59388685",
"0.59295464",
"0.5738805",
"0.570226",
"0.56354594",
"0.55978715",
"0.5595923",
"0.55617034",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.5560986",
"0.5560986",
"0.55581516",
"0.55581516",
"0.55334353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988"
] | 0.0 | -1 |
really should only be used in testing | public static function remove(string $key)
{
if (!self::$configLoaded) {
self::loadConfig();
}
unset(self::$config[$key]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function helper()\n\t{\n\t\n\t}",
"protected function test9() {\n\n }",
"private function _i() {\n }",
"protected function testObjects() {\n }",
"protected function __init__() { }",
"public function testPingTreeGetItem()\n {\n }",
"private function __construct () {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"final private function __construct() {}",
"final private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"protected function testObject() {\n }",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}"
] | [
"0.59388685",
"0.59295464",
"0.5738805",
"0.570226",
"0.56354594",
"0.55978715",
"0.5595923",
"0.55617034",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.5560986",
"0.5560986",
"0.55581516",
"0.55581516",
"0.55334353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988"
] | 0.0 | -1 |
really should only be used in testing | public static function reset()
{
self::$config = null;
self::$configLoaded = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function helper()\n\t{\n\t\n\t}",
"protected function test9() {\n\n }",
"private function _i() {\n }",
"protected function testObjects() {\n }",
"protected function __init__() { }",
"public function testPingTreeGetItem()\n {\n }",
"private function __construct () {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"final private function __construct() {}",
"final private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"protected function testObject() {\n }",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}"
] | [
"0.59388685",
"0.59295464",
"0.5738805",
"0.570226",
"0.56354594",
"0.55978715",
"0.5595923",
"0.55617034",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.55609864",
"0.5560986",
"0.5560986",
"0.55581516",
"0.55581516",
"0.55334353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5526353",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988",
"0.5524988"
] | 0.0 | -1 |
Returns usergroup as object | function getGroup()
{
return Factory::create('group', $this->_gid);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUsergroup() {}",
"public function getUserGroup() {\n $c = $this->modx->newQuery('modUserGroup');\n $c->select($this->modx->getSelectColumns('modUserGroup','modUserGroup'));\n $c->select($this->modx->getSelectColumns('disUserGroupProfile','Profile','',array(\n 'post_based',\n 'min_posts',\n 'color',\n 'image',\n )));\n $c->leftJoin('disUserGroupProfile','Profile','modUserGroup.id = Profile.usergroup');\n $c->where(array(\n 'modUserGroup.id' => $this->scriptProperties['id'],\n ));\n /** @var modUserGroup $userGroup */\n $userGroup = $this->modx->getObject('modUserGroup',$c);\n if (empty($userGroup)) return false;\n\n $this->userGroupArray = $userGroup->toArray();\n return $this->userGroup;\n }",
"public static function getGroup(){\n\t\treturn FW_DAO_UserGroup::getInstance();\n\t}",
"public function getGroupObject() {\n return $this->groups[0];\n }",
"function group()\r\n {\r\n $group = false;\r\n\r\n if ( $this->GroupID > 0 )\r\n {\r\n $group = new eZUserGroup( $this->GroupID );\r\n }\r\n\r\n return $group;\r\n }",
"public function group()\n\t{\n\t\t$group = \\Hubzero\\User\\Group::getInstance($this->get('owned_by_group'));\n\t\tif (!$group)\n\t\t{\n\t\t\t$group = new \\Hubzero\\User\\Group;\n\t\t}\n\t\treturn $group;\n\t}",
"public function getGroup()\n {\n return $this->_getVar('user_group');\n }",
"function moderator()\r\n {\r\n $group = false;\r\n\r\n if ( $this->ModeratorID > 0 )\r\n {\r\n $group = new eZUserGroup( $this->ModeratorID );\r\n }\r\n\r\n return $group;\r\n }",
"public function getGroup ()\n {\n return $this->getObject();\n }",
"public function getGroup(): GroupInterface;",
"function get_user_group($group_id)\n {\n $user_group = $this->db->query(\"\n SELECT\n *\n\n FROM\n `groups`\n\n WHERE\n `gro_id` = ?\n \",array($group_id))->row_array();\n \n return $user_group;\n }",
"public function usergroup()\n {\n return $this->belongsTo('App\\Usergroup');\n }",
"public function __get($name)\n\t{\n\t switch ($name) {\n\t case 'group':\n\t if (!isset($this->group)) {\n\t $this->group = (object) API_USERGROUPS::getRecordById($this->groupid);\n\t }\n\t \n\t return $this->group;\n\t \n\t break;\n\t }\n\t}",
"public function getGroup()\n\t{\n\t return $this->groupService->getGroup($this->ownerid);\n\t}",
"public function getGroup() {\n\t\tif (empty($this->group)) {\n\t\t\t$this->group = $this->groupsTable->findById($this->groupId);\n\t\t}\n\t\treturn $this->group;\n\t}",
"function get_userGroup($id){\n $result = array();\n $user = selectRecord(TAB_USERS, \"id = $id\");\n\n $result['id'] = $user['id'];\n $result['username'] = $user['username'];\n $result['password'] = \"\";\n $result['email'] = $user['email'];\n\n $role = selectJoin(TAB_USR_ROLE, TAB_GROUPS, \"groupId = id\", \"userId = $id\")[0]['role'];\n $groups = selectQuery(TAB_GROUPS, \"role <> '$role'\", \"role ASC\");\n\n foreach($groups as $group){\n $gr_elem[] = $group['role'];\n }\n array_unshift($gr_elem, $role);\n $result['group'] = $gr_elem;\n\n return $result;\n}",
"function get_group_info($user)\n{\n global $group_names, $group_colors, $special_ids;\n\n // get data from group string\n @list($group, $suppl) = @explode(',', make_group_str($user));\n\n // data validation\n $group_default = $group == 2 ? 2 : 0;\n if (is_null($suppl)) {\n $suppl = $group_default;\n }\n $group = $group > count($group_names) - 1 ? 0 : max(0, (int) $group);\n $suppl = $suppl > count($group_names[$group]) - 1 ? $group_default : max(0, (int) $suppl);\n\n // special\n $special_user = in_array(@$user->user_id, $special_ids);\n\n // return data\n $ret = new stdClass();\n $ret->num = $group;\n $ret->num2 = !$special_user ? $suppl : '*';\n $ret->name = $group_names[$group][$suppl];\n $ret->color = !$special_user ? $group_colors[$group][$suppl] : '83C141';\n $ret->str = \"$group,$ret->num2\";\n return $ret;\n}",
"static function getUserGroups(){\n \n }",
"public function user_group()\n {\n return $this->belongsTo('App\\UserGroup');\n }",
"public function UserGroup() {\n return $this->belongsTo('UserGroup', 'group_id');\n }",
"private function getUserGroup(): int {\n return $this->core->getUser()->getGroup();\n }",
"public function getForUserGroups()\n\t{\n##if @BUILDER.strUGConnectionID.len##\n\t\treturn $this->byId( \"##@BUILDER.strUGConnectionID s##\" );\n##else##\t\t\n\t\treturn $this->getDefault();\n##endif##\n\t}",
"public function getUsers()\n\t{\n\t\t$groupUsers = new ArrayObject();\n\t\t$group = $this->getGroup();\n\t\tif ($group != null) {\n\t\t\t$users = $this->groupService->getUsersInGroup($this->getGroup(), true);\n\t\t\t\n\t\n\t foreach ($users as $user) {\n\t $groupUsers[$user->id] = $user;\n\t }\t\n\t\t}\n \n return $groupUsers;\n\t}",
"public function systemGroup()\n\t{\n\t\t$cn = $this->config('group_prefix', 'pr-') . $this->get('alias');\n\n\t\t$group = \\Hubzero\\User\\Group::getInstance($cn);\n\n\t\tif (!$group)\n\t\t{\n\t\t\t$group = new \\Hubzero\\User\\Group();\n\t\t\t$group->set('cn', $cn);\n\t\t\t$group->create();\n\t\t}\n\n\t\treturn $group;\n\t}",
"public function userInGroup()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\t$group = FormUtil::getPassedValue('group', null);\n\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\t\tif($group == null) {\n\t\t\treturn self::retError('ERROR: No group passed!');\n\t\t}\n\n\t\t$uid = UserUtil::getIdFromName($uname);\n\t\tif($uid == false) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\tif($group == 'admin') {\n\t\t\tif(SecurityUtil::checkPermission('Owncloud::Admin', '::', ACCESS_MODERATE, $uid)) {\n\t\t\t\t$return = true;\n\t\t\t} else {\n\t\t\t\t$return = false;\n\t\t\t}\n\t\t} else {\n\t\t\t$groups = UserUtil::getGroupsForUser($uid);\n\t\t\t$return = false;\n\t\t\tforeach($groups as $item) {\n\t\t\t\t$itemgroup = UserUtil::getGroup($item);\n\t\t\t\tif($itemgroup['name'] == $group) {\n\t\t\t\t\t$return = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn self::ret($return);\n\t}",
"private function getUserGroup()\n {\n if (null !== $token = $this->tokenStorage->getToken()) {\n /** @var \\Ekyna\\Bundle\\UserBundle\\Model\\UserInterface $user */\n if (null !== $user = $token->getUser()) {\n return $user->getGroup();\n }\n }\n return null;\n }",
"protected function get_user_object($rdn) \n\t{\n\t\t// user attribute \n\t\t$userInfo = $this->conn->getNode($rdn);\n\t\t\n\t\tforeach ( $this->config_options_attributes as $k => $attr ) \n\t\t{\n\t\t\t$user[$attr] = $userInfo->$attr;\n\t }\n\t \n\t // group attributes\n\t $groupdn = $this->config_options['groupdn'];\n\t $filter = sprintf('%s=%s',$this->config_options['group_member'],$rdn);\n\t $attributes = $this->config_options['group_attribute'];\n\t \n\t $search = $this->conn->search($filter, $groupdn,\n\t \t\tZend_Ldap::SEARCH_SCOPE_SUB, $attributes);\n\n\t foreach( $search as $value)\n\t\t{\n\t\t\t$user['group'][] = strtolower(current(current($value)));\n\t\t}\n\t\t\n\t\treturn (object) $user;\t\n\t}",
"public function getGroup() {\n\t\t$ids = $this->getGroupIds();\n\t\treturn MessageGroups::getGroup( $ids[0] );\n\t}",
"public function GetGroup() {\n $resource = $this->Retrieve();\n $query = mysqli_query($resource, \"SELECT grpname, grpdesc FROM `group`\");\n while ($row = mysqli_fetch_object($query)) {\n $p[] = $row;\n }\n return json_encode($p);\n }",
"public function getGroup();",
"public function getGroup();",
"public function getGroup();",
"public function mrow_group($r)\n {\n return $r['usergroup'];\n }",
"public function getGroup() {}",
"public function getGroup() {}",
"public function getGroup() {}",
"public function getGroup() {}",
"static function get_apigroup();",
"public function findUserGroup($idGroup) {\n\t\t$sql = \"select u.* from t_user u INNER JOIN t_group g ON g.idGroup = u.idGroup where g.idGroup=? LIMIT 1\";\n\t\t$row = $this->getDb()->fetchAssoc($sql, array($idGroup));\n\n\t\tif ($row){\n\t\t\treturn $this->buildDomainObject($row);\n\t\t} else {\n\t\t\tthrow new \\Exception(\"Pas de groupe correspondant à l'id '\" . $id . \"'\");\n\t\t}\t\t\n\t}",
"public function getGroup()\n {\n return $this->hasOne(Group::class, ['id' => 'group_id']);\n }",
"public static function bygroup()\r\n {\r\n if(!self::user()->hasPerm('users_membership'))\r\n \\CAT\\Helper\\Json::printError('You are not allowed for the requested action!');\r\n $id = self::router()->getParam();\r\n $data = \\CAT\\Groups::getInstance()->getMembers($id);\r\n if(self::asJSON())\r\n {\r\n echo header('Content-Type: application/json');\r\n echo json_encode($data,true);\r\n return;\r\n }\r\n }",
"public function getCustomerGroup();",
"public static function FromUser(User $User): Groups {\n return (new static([], $User))->Fill();\n }",
"public function getGroup()\n {\n return $this->group;\n }",
"public function getGroup()\n {\n return $this->group;\n }",
"public function getGroup()\n {\n return $this->group;\n }",
"public function getGroup()\n {\n return $this->group;\n }",
"public function getGroup()\n {\n return $this->group;\n }",
"public function getGroup()\n {\n return $this->group;\n }",
"public function findById($userId){\n $user = parent::findById($userId);\n if(!empty($user)){\n $user->groups = $user->findManyToManyRowset('Group', 'FrontendUserGroup');\n\n foreach($user->groups as $group){\n $user->groupNames[] = $group->name;\n $user->groupIds[] = $group->id;\n }\n }\n\n return $user;\n }",
"public static function primaryGroup( \\Users\\Models\\Users $user=null )\r\n\t{\r\n\t\t$group = new \\Users\\Models\\Groups;\r\n\r\n\t\tif (!empty($user))\r\n\t\t{\r\n\t\t\tif ($groups = $user->groups())\r\n\t\t\t{\r\n\t\t\t\t$group = $groups[0];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (empty($group->id))\r\n\t\t{\r\n\t\t\t// Set this to be a default group, as configured in the Shop config\r\n\t\t\t$group_id = \\Shop\\Models\\Settings::fetch()->{'users.default_group'};\r\n\t\t\tif (!empty($group_id)) {\r\n\t\t\t\t$group = $group->setState('filter.id', (string) $group_id)->getItem();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $group;\r\n\t}",
"protected function GetGroup() {\r\n\t\t\treturn $this->group;\r\n\t\t}",
"function user_getgroup()\n\t{\n\t\t$id = $this->user_getid();\n\t\t$perms = $this->DB->database_select('users', 'gid', array('uid' => $id), 1);\n\t\treturn ($perms === false) ? false : $perms['gid'];\n\t}",
"public function get_groups()\n\t{\n\t\tif (empty($this->user))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn array(array('UniGroup', $this->user[static::_column('group')]));\n\t}",
"public abstract function getGroup();",
"function people_getPublicGroups ($user_id) {\n $response = $this->execute(array('method' => 'flickr.people.getPublicGroups', 'user_id' => $user_id));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['groups']['group'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}",
"function &_returnGroupFromRow(&$row) {\n\t\t$group = $this->newDataObject();\n\t\t$group->setId($row['group_id']);\n\t\t$group->setAboutDisplayed($row['about_displayed']);\n\t\t$group->setPublishEmail($row['publish_email']);\n\t\t$group->setSequence($row['seq']);\n\t\t$group->setContext($row['context']);\n\t\t$group->setAssocType($row['assoc_type']);\n\t\t$group->setAssocId($row['assoc_id']);\n\t\t$this->getDataObjectSettings('group_settings', 'group_id', $row['group_id'], $group);\n\n\t\tHookRegistry::call('GroupDAO::_returnGroupFromRow', array(&$group, &$row));\n\n\t\treturn $group;\n\t}",
"public function getGroup() {\n return $this->group;\n }",
"public function asig_grupo_user()\n {\n return $this->hasOne(AsignaturaGrupoUser::class);\n }",
"function createGroup($_name,$_owner) {\n $group = R::dispense('groups');\n $group->name = $_name;\n $group->owner = $_owner;\n $id = R::store($group);\n \n $groupMembers = R::dispense('groupmembers');\n $groupMembers->member_id = $_SESSION['user_id'];\n $groupMembers->group_id = $id;\n R::store($groupMembers);\n \n return $id;\n}",
"public function getGroup()\n {\n //Note: group parts are not \"named\" so it's all or nothing\n return $this->_get('_group');\n }",
"function get_group($id)\n\t{\n\t\treturn get_instance()->kbcore->groups->get($id);\n\t}",
"public static function getUserGroups($user)\n {\n return self::getAccount($user, array('CN'));\n }",
"function get_all_user_group()\n {\n $user_group = $this->db->query(\"\n SELECT\n *\n\n FROM\n `groups`\n\n WHERE\n 1 = 1\n AND gro_id != 1\n\n ORDER BY `gro_id` DESC\n \")->result_array();\n\n return $user_group;\n }",
"private static function fromRow($row){\n $permissions = self::fetchPermissions($row['id']);\n if($permissions === null) return null;\n $output = new Group($row['name'], $permissions);\n $output->setModified($row['modified']);\n $output->setId($row['id']);\n $output->setNew(false);\n return $output;\n }",
"function getUsersGroups($mysqli,$userID){\r\n $result = $mysqli->query(\"SELECT groups.*, group_members.isAdmin FROM `group_members` RIGHT JOIN groups ON group_members.group_ID = groups.ID WHERE Member_ID = \".$userID.\"\");\r\n $groups = array();\r\n\r\n $i=0;\r\n while($row = $result->fetch_row()){\r\n $g = new group();\r\n $g->groupID = $row[0];\r\n $g->name = $row[1];\r\n $g->description = $row[2];\r\n $g->website = $row[3];\r\n $g->private = $row[4];\r\n $g->type = $row[5];\r\n $g->sport = $row[6];\r\n $g->logoURL = $row[7];\r\n $g->city = $row[8];\r\n $g->userIsAdmin = $row[9];\r\n $groups[$i] = $g;\r\n $i++;\r\n }\r\n return $groups;\r\n }",
"public static function GetGuestGroup()\n {\n static $guest;\n \n if(!is_object($guest))\n {\n $guest = new Data\\Group('guest', 'Guest');\n }\n \n return $guest;\n }",
"public function get_group($user_id){\r\n\t\r\n\t$user_id1 = ($user_id != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($user_id).\"'\":'NULL';\r\n\t$sql = $this->hrm_mysql_connect->query(\"SELECT a.leave_group, b.name, b.supervisor_id, b.delegate, b.status, c.user_firstname, c.user_lastname, c.user_email FROM leave_reg a JOIN leave_groups b ON a.leave_group = b.group_id JOIN hrm_users c ON b.supervisor_id = c.user_id WHERE a.user_id=$user_id1\");\r\n\tif($sql){\r\n\t$sup = $sql->fetch_assoc();\r\n\t$g_name = $sup['name'];\r\n\t$g_deleg = $sup['delegate'];\r\n\t$g_status = $sup['status'];\r\n\tif($g_status==3 && $g_deleg!=0){\r\n\t\t$user_id2 = ($g_deleg != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($g_deleg).\"'\":'NULL';\r\n\t\t$sql2 = $this->hrm_mysql_connect->query(\"SELECT user_firstname, user_lastname, user_email FROM hrm_users WHERE user_id=$user_id2\");\r\n\t\t$sup_deleg = $sql2->fetch_assoc();\r\n\t\t$delegate = 1;\r\n\t\t$sup_id = $g_deleg;\r\n\t\t$sup_name = $sup_deleg['user_firstname'].' '.$sup_deleg['user_lastname'];\r\n\t\t$sup_email = $sup_deleg['user_email'];\r\n\t\t}else {\r\n\t$delegate = 0;\r\n\t$sup_id = $sup['supervisor_id'];\r\n\t$sup_name = $sup['user_firstname'].' '.$sup['user_lastname'];\r\n\t$sup_email = $sup['user_email'];\r\n\t\t\t}\r\n\t\t\treturn array($g_name, $sup_id, $sup_name, $sup_email, $delegate);\r\n\t}else{\r\n\t\treturn 0;\r\n\t\t}\r\n}",
"public static function getGroups($idUser){ \r\n $user = self::findUser($idUser); \r\n $groups = $user->groups;\r\n foreach ($groups as $key => &$value) {\r\n $value['role_id'] = $value->pivot->role_id;\r\n $value['role'] = Role::find($value->pivot->role_id)->name;\r\n unset($value->pivot);\r\n }\r\n return $groups;\r\n }",
"public function getGroup()\n {\n return $this->hasOne(ScrtGroup::className(), ['group_id' => 'group_id']);\n }",
"public function getGrupo()\n {\n return $this->grupo;\n }",
"public function getGroup($groupId);",
"public function model()\n {\n return GroupMember::class;\n }",
"function get_member_group()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('group_id'), array(\n\t\t\t'select' => array()\n\t\t));\n\t\t\n\t\t// prepare variables for sql\n\t\t$vars = $this->_prepare_sql($vars);\n\n\t\t// start hook\n\t\t$vars = $this->_hook('get_member_group_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_member_group($vars['group_id'], $vars['select'])->result();\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_member_group_end', $data);\n\n\t\t$this->response($data);\n\t}",
"public function getUserGroups()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('userGroups');\n }",
"public function getAllGroupUser(){\n $client = new Client();\n $req = $client->request('GET', 'http://localhost:8000/allgroupuser');\n $res = $req->getBody();\n $data = json_decode($res);\n\n $groupUser = $data->groupUser;\n $permissions = $data->permissions;\n $message = $data->message;\n\n return json_encode(['groupUser' => $groupUser, 'permissions' => $permissions]);\n }",
"public function getSystemUserGroups()\n {\n $system_user_groups = array();\n \n // load the related System_user_group objects\n //Busca grupo para professor\n $system_user_system_user_groups = SystemGroup::where('name','like','%- Professor%')->load();\n if (isset($system_user_system_user_groups[0]))\n {\n $group_id = $system_user_system_user_groups[0];\n }\n $system_user_groups[] = new SystemGroup( $group_id->id );\n //var_dump($system_user_groups);\n return $system_user_groups;\n \n }",
"public static function getByUserGroup($id)\n\t{\n\t\treturn new ACL('tl_user_group', $id);\n\t}",
"public static function getGroups(): array\n {\n return ['user'];\n }",
"public function getUserGroups()\n\t{\n\t\t\n\t\t$groups = array();\n\t\t$db \t= $this->getUserDbTable();\n\t\t$id \t= $this->getUserId();\n\t\t\n\t\tif ($id)\n\t\t{\t\n\t\t\t$groups \t= $db->getAdapter()->select()->from(array('gmt'=>'groups_members_table'))\n\t\t\t\t\t\t\t\t\t\t ->joinInner(array('gt'=>'groups_table'), 'gmt.group_id = gt.group_id')\n\t\t\t\t\t\t\t\t\t\t ->where('gmt.user_id = ? ', $id)\n\t\t\t\t\t\t\t\t\t\t ->query()->fetchAll();\n\t\t}\t\n\t\t/* Automatically append group 0===Public group */\n\t\t$public \t\t= $db->getAdapter()->select()->from(array('gmt'=>'groups_table'))->where('group_privacy_level = ? ', 0)\n\t\t\t\t\t\t\t\t\t ->query()->fetch();\n\t\t$groups[] = $public;\n\t\t\n\t\treturn $groups;\n\t}",
"public function employeeGroup()\n {\n return new EmployeeGroupModel();\n }",
"public static function getGroup($param = array()){\n\n /** @var bool $access */\n $access = self::$UserEntitlementService->userHasEntitlement(CoreUser::getUser(), self::$UserEntitlementService->getEntitlement(UserModule::ENTITLEMENT_MANAGE_USERS));\n\n if($access) {\n\n /** @var array $groups */\n $group = self::$UserGroupService->getGroup(isset($param[1]) ? $param[1] : 0);\n\n //set data\n CoreApi::setData('group', $group);\n\n }else{\n\n CoreNotification::set('You are not authorized to view group', CoreNotification::ERROR);\n\n }\n }",
"public function getUserGroups()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\n\t\t$uid = UserUtil::getIdFromName($uname);\n\t\tif($uid == false) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$groups = UserUtil::getGroupsForUser($uid);\n\t\t$return = array();\n\t\tforeach($groups as $item) {\n\t\t\t$group = UserUtil::getGroup($item);\n\t\t\t$return[] = $group['name'];\n\t\t}\n\t\tif(SecurityUtil::checkPermission('Owncloud::Admin', '::', ACCESS_MODERATE, $uid)) {\n\t\t\t$return[] = 'admin';\n\t\t}\n\t\treturn self::ret($return);\n\t}",
"function newDataObject() {\n\t\treturn new Group();\n\t}",
"public function get($_groupId)\n {\n $this->checkRight('VIEW_ACCOUNTS');\n \n $group = GroupbaseGroup::getInstance()->getGroupById($_groupId);\n\n return $group;\n }",
"function GetGroup ($id) {\n $path = REST_PATH . 'groups/' . $id . '.xml';\n\n // Call Rest API\n $result = CallRestApi($path);\n \n // Read the returned XML\n $xml = simplexml_load_string($result) or die(\"Error: Cannot create object\");\n\n return $xml;\n}",
"public function getTaoUserGroups()\n {\n return $this->hasMany(TaoUserGroup::className(), ['tao_group_id' => 'id']);\n }",
"public function listGroups($user) {\n return $user->groups;\n }",
"function &getGroup() {\n\t\treturn $this->Group;\n\t}",
"public function fetch(): object\n {\n if ($this->title() instanceof UserTrophyTitle) {\n return $this->get(\n 'trophy/v1/users/' . $this->title()->getFactory()->getUser()->accountId() . '/npCommunicationIds/' . $this->title()->npCommunicationId() . '/trophyGroups',\n [\n 'npServiceName' => $this->title()->serviceName()\n ]\n );\n } else {\n return $this->get(\n 'trophy/v1/npCommunicationIds/' . $this->title()->npCommunicationId() . '/trophyGroups',\n [\n 'npServiceName' => $this->title()->serviceName()\n ]\n );\n }\n }",
"protected function _get_usergroup_list()\n {\n $results = $this->connection->query('SELECT gid,title FROM ' . $this->connection->get_table_prefix() . 'usergroups');\n $mod_results = array();\n foreach ($results as $key => $value) {\n $mod_results[] = array('group_id' => $value['gid'], 'group_name' => $value['title']);\n }\n $results2 = collapse_2d_complexity('group_id', 'group_name', $mod_results);\n return $results2;\n }",
"function grabUsergroupInfo(){\n\t\t// Check for request forgeries\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\t\t\n\t\t$app \t= JFactory::getApplication();\n\t\t$db\t= JFactory::getDbo();\n\t\t$user \t= JFactory::getUser();\n\t\t$ugid \t= $app->input->get('ugid', 0, 'int');\n\t\t\n\t\t//if the user has JoomBri profile, redirect him to the dashboard\n \t\t$hasJBProfile = JblanceHelper::hasJBProfile($user->id);\t\n \t\tif($hasJBProfile){\n \t\t\t$link = JRoute::_('index.php?option=com_jblance&view=user&layout=dashboard', false);\n \t\t\t$this->setRedirect($link);\n \t\t\treturn;\n \t\t}\n\t\n\t\t$session = JFactory::getSession();\n\t\t$session->set('ugid', $ugid, 'register');\n\t\t$session->clear('skipPlan', 'register');\t//clear or reset skip plan session if the registration is restarted.\n\t\n\t\t$freeMode = JblanceHelper::isFreeMode($ugid);\n\t\n\t\tif($freeMode){\n\t\t\t// if the user is not registered, direct him to registration page else to profile page.\n\t\t\tif($user->id == 0)\n\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=register&step=3', false);\n\t\t\telse\n\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=usergroupfield', false);\n\t\n\t\t}\n\t\telse {\n\t\t\t// check for skipping of plan selection for this usergroup. If skipped, set the default plan for the usergroup\n\t\t\t$userHelper = JblanceHelper::get('helper.user');\n\t\t\t$ugroup = $userHelper->getUserGroupInfo(null, $ugid);\n\t\t\t\n\t\t\tif($ugroup->skipPlan){\n\t\t\t\t\n\t\t\t\t$query = \"SELECT id FROM #__jblance_plan WHERE default_plan=1 AND ug_id=\".$db->quote($ugid);\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$defaultPlanId = $db->loadResult();\n\t\t\t\t\n\t\t\t\tif(empty($defaultPlanId)){\n\t\t\t\t\t$app->enqueueMessage(JText::_('COM_JBLANCE_NO_DEFAULT_PLAN_FOR_THE_USERGROUP', 'error'));\n\t\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=showfront', false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$session->set('planid', $defaultPlanId, 'register');\n\t\t\t\t\t$session->set('gateway', 'banktransfer', 'register');\n\t\t\t\t\t$session->set('skipPlan', 1, 'register');\n\t\t\t\t\t// if the user is not registered, direct him to registration page else to profile page.\n\t\t\t\t\tif($user->id == 0)\n\t\t\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=register&step=2', false);\n\t\t\t\t\telse \n\t\t\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=usergroupfield&step=2', false);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$return\t= JRoute::_('index.php?option=com_jblance&view=membership&layout=planadd&step=2', false);\n\t\t\t}\n\t\t}\n\t\t$this->setRedirect($return);\n\t\treturn;\n\t}",
"public function get( $id ){\n $result = array(\"records\"=>array());\n\n $platformuser = new PlatformUserGroupCollection();\n $model = $platformuser->getById( $id );\n $result['records']['userGroup'] = $model->toRecord();\n\n $collection = new PlatformUserGroupHasPermissionSetCollection();\n $user = PlatformUser::instanceBySession();\n $collection->setActor($user);\n $attributes = array( \"pugid\"=>$id );\n $collectionResult = $collection->getRecords($attributes);\n $ids = array();\n foreach ($collectionResult['records'] as $key => $record) {\n array_push($ids, $record['psid']);\n }\n $result['records']['permissionSetIds'] = $ids;\n\n return $result;\n }",
"public function group()\n {\n\n \treturn $this-> belongsTo(Group::class);\n }",
"public static function get_all_users_group($create = true)\n\t{\n\t\tstatic $group;\n\t\tif ($group === null)\n\t\t{\n\t\t\t$groups = new object_list(array(\n\t\t\t\t\"class_id\" => group_obj::CLID,\n\t\t\t\t\"site_id\" => aw_ini_get(\"site_id\"),\n\t\t\t\t\"type\" => aw_groups::TYPE_ALL_USERS\n\t\t\t));\n\n\t\t\tif (1 === $groups->count())\n\t\t\t{\n\t\t\t\t$group = $groups->begin();\n\t\t\t}\n\t\t\telseif (1 < $groups->count())\n\t\t\t{\n\t\t\t\t// shouldn't occur at all but jic\n\t\t\t\tthrow new awex_obj_invalid_count(sprintf(\"Excessive active system groups of type TYPE_ALL_USERS in site %s with gid %s\", aw_ini_get(\"site_id\"), aw_ini_get(\"groups.all_users_grp\")));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// look for legacy groups that have no all_users type specified\n\t\t\t\t$groups = new object_list(array(\n\t\t\t\t\t\"class_id\" => group_obj::CLID,\n\t\t\t\t\t\"site_id\" => aw_ini_get(\"site_id\"),\n\t\t\t\t\t\"gid\" => aw_ini_get(\"groups.all_users_grp\")\n\t\t\t\t));\n\n\t\t\t\tif (1 === $groups->count())\n\t\t\t\t{\n\t\t\t\t\t$group = $groups->begin();\n\t\t\t\t\t$group->set_prop(\"type\", aw_groups::TYPE_ALL_USERS);\n\t\t\t\t\t$group->save();\n\t\t\t\t}\n\t\t\t\telseif (1 < $groups->count())\n\t\t\t\t{\n\t\t\t\t\t// shouldn't occur but jic\n\t\t\t\t\tthrow new awex_obj_invalid_count(sprintf(\"Excessive active system groups of type TYPE_ALL_USERS in site %s with gid %s\", aw_ini_get(\"site_id\"), aw_ini_get(\"groups.all_users_grp\")));\n\t\t\t\t}\n\t\t\t\telseif ($create)\n\t\t\t\t{\n\t\t\t\t\t$group = obj(null, array(), group_obj::CLID);\n\t\t\t\t\t$group->set_prop(\"type\", aw_groups::TYPE_ALL_USERS);\n\t\t\t\t\t$group->save();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $group;\n\t}",
"public function testAddUserIntoGroup(){\n jAcl2DbUserGroup::createUser('robert');\n self::$grpId7 = $this->getLastId('id_aclgrp', 'jacl2_group');\n jAcl2DbUserGroup::addUserToGroup('robert', self::$grpId1);\n\n self::$groups[] = array('id_aclgrp'=>self::$grpId7,\n 'name'=>'robert',\n 'grouptype'=>2,\n 'ownerlogin'=>'robert');\n $this->assertTableContainsRecords('jacl2_group', self::$groups);\n\n self::$usergroups=array(\n array('login'=>'laurent', 'id_aclgrp'=>self::$grpId5),\n array('login'=>'max', 'id_aclgrp'=>self::$grpId6),\n array('login'=>'max', 'id_aclgrp'=>self::$defaultGroupId),\n array('login'=>'robert', 'id_aclgrp'=>self::$grpId7),\n array('login'=>'robert', 'id_aclgrp'=>self::$defaultGroupId),\n array('login'=>'robert', 'id_aclgrp'=>self::$grpId1),\n );\n $this->assertTableContainsRecords('jacl2_user_group', self::$usergroups);\n }",
"public function group()\n {\n return $this->belongsTo('Bocapa\\Permissions\\Models\\Group');\n }",
"public static function get_not_logged_in_group($create = true)\n\t{\n\t\tstatic $group;\n\t\tif (null === $group)\n\t\t{\n\t\t\t//TODO: group.aw-s oli sessioonis ka nlg_oid, v6ibolla saidi kiiruse t6stmiseks. m6elda.\n\t\t\t$groups = new object_list(array(\n\t\t\t\t\"class_id\" => group_obj::CLID,\n\t\t\t\t\"site_id\" => aw_ini_get(\"site_id\"),\n\t\t\t\t\"type\" => aw_groups::TYPE_NOT_LOGGED_IN,\n\t\t\t\tnew obj_predicate_limit(2) //XXX: seda pole vaja mujal kui intranetis, kus nliug-e on kolm tuhat, see on nende laadimise v2ltimiseks\n\t\t\t));\n\n\t\t\tif (1 === $groups->count())\n\t\t\t{\n\t\t\t\t$group = $groups->begin();\n\t\t\t}\n\t\t\telseif ($groups->count() > 1)\n\t\t\t{\n\t\t\t\tthrow new awex_obj_invalid_count(sprintf(\"Excessive system groups of type TYPE_NOT_LOGGED_IN (ids: %s).\", implode(\", \", $groups->ids())));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// look for legacy configuration nliug\n\t\t\t\t$c = new config();\n\t\t\t\t$nlg_oid = $c->get_simple_config(\"non_logged_in_users_group_oid\");\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$group = obj($nlg_oid, array(), group_obj::CLID);\n\t\t\t\t\t$group->set_prop(\"type\", aw_groups::TYPE_NOT_LOGGED_IN);\n\t\t\t\t\t$group->save();\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e)\n\t\t\t\t{\n\t\t\t\t}\n\n\t\t\t\tif (!$group and $create)\n\t\t\t\t{\n\t\t\t\t\t$group = obj(null, array(), group_obj::CLID);\n\t\t\t\t\t$group->set_prop(\"type\", aw_groups::TYPE_NOT_LOGGED_IN);\n\t\t\t\t\t$group->save();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $group;\n\t}",
"public function get_group($data)\n\t{\n\t\t$sql=$this->db->get_where('usuarios', $data);\n\t\treturn $sql->result();\n\t}",
"public static function getById( $id ) {\r\n \r\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); \r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n $sql = \"SELECT *, id AS id FROM \" . DB_PREFIX . \"groups WHERE id = :id\";\r\n \r\n $st = $conn->prepare( $sql );\r\n $st->bindValue( \":id\", $id, PDO::PARAM_INT );\r\n $st->execute();\r\n \r\n $row = $st->fetch();\r\n \r\n $conn = null;\r\n \r\n if ( $row ) return new Group( $row );\r\n \r\n }"
] | [
"0.7627634",
"0.73034847",
"0.72861236",
"0.7229572",
"0.68974304",
"0.6880989",
"0.6791159",
"0.67871755",
"0.67670745",
"0.676184",
"0.6642626",
"0.6581714",
"0.6552893",
"0.64736944",
"0.6462298",
"0.6435887",
"0.6404787",
"0.64014363",
"0.63675565",
"0.6359705",
"0.635842",
"0.6306419",
"0.6279478",
"0.627353",
"0.6269381",
"0.6267166",
"0.62421525",
"0.62218094",
"0.6219596",
"0.62117064",
"0.62117064",
"0.62117064",
"0.61884326",
"0.6162296",
"0.6162296",
"0.6162296",
"0.6162296",
"0.6149773",
"0.61467993",
"0.61360717",
"0.6129459",
"0.6127154",
"0.61160594",
"0.61123866",
"0.61123866",
"0.61123866",
"0.61123866",
"0.61123866",
"0.61123866",
"0.6112334",
"0.61116034",
"0.61057997",
"0.6086994",
"0.6080674",
"0.6073289",
"0.60704976",
"0.6068683",
"0.6068214",
"0.6059381",
"0.60543144",
"0.60507715",
"0.60338455",
"0.6023313",
"0.60174674",
"0.60088587",
"0.59924936",
"0.59905684",
"0.59684277",
"0.5966096",
"0.5952727",
"0.59461546",
"0.5921026",
"0.5915585",
"0.5912329",
"0.59085226",
"0.59046996",
"0.5893873",
"0.58925074",
"0.5886359",
"0.5877876",
"0.58774483",
"0.58699673",
"0.58443695",
"0.58367",
"0.5835832",
"0.5828376",
"0.5825544",
"0.58217025",
"0.5814536",
"0.58068526",
"0.58059466",
"0.5805345",
"0.58024436",
"0.5795964",
"0.57959497",
"0.57956433",
"0.5789139",
"0.5772995",
"0.5762618",
"0.5762586"
] | 0.6838569 | 6 |
Returns userid as integer | public function getId()
{
return $this->_uid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUserID() {\n\t\tif (is_numeric($this->user_id)) {\n\t\t\treturn $this->user_id;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }",
"public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }",
"public function getUserId()\n {\n return (int)$this->user_id;\n }",
"private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n }\n return $user_id;\n }",
"public static function getUserId() {\n $returnValue = 0;\n if (isset($_SESSION[\"userid\"])) {\n $returnValue = $_SESSION[\"userid\"];\n }\n return $returnValue;\n }",
"function user_id () {\r\n\t$info = user_info();\r\n\treturn (isset($info[0]) ? $info[0] : 0);\r\n}",
"function getUserId(){\n\t//replace with actual\n\treturn '123';\n}",
"public function get_user_id();",
"public function getUserId() : int\n {\n return $this->userId;\n }",
"public function getUserid()\n {\n return $this->userid;\n }",
"public function getUserId(): int\n {\n return $this->userId;\n }",
"protected static function getUserID()\r\n {\r\n $userID = \\CAT\\Helper\\Validate::sanitizePost('user_id','numeric');\r\n\r\n if(!$userID)\r\n $userID = \\CAT\\Helper\\Validate::sanitizeGet('user_id','numeric');\r\n\r\n if(!$userID)\r\n $userID = self::router()->getParam(-1);\r\n\r\n if(!$userID || !is_numeric($userID) || !\\CAT\\Helper\\Users::exists($userID))\r\n Base::printFatalError('Invalid data')\r\n . (self::$debug ? '(\\CAT\\Backend\\Users::getUserID())' : '');;\r\n\r\n return $userID;\r\n }",
"public function getUserId()\n {\n $this->checkIfKeyExistsAndIsInteger('user_id');\n\n return $this->data['user_id'];\n }",
"public function getUserID(){\n return($this->userID);\n }",
"public function getUserIdUser(): int\n {\n return $this->User_id_user;\n }",
"public function getUserId()\n\t{\n\t\t$column = self::COL_USER_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getUserId()\n\t{\n\t\t$column = self::COL_USER_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getUserId()\n {\n return $this->userid;\n }",
"public function getUserId()\n {\n return $this->userid;\n }",
"public function getUserid()\n {\n if ($this->_userid === false) {\n $this->_userid = Userlogin::find()->where(['id' => Yii::$app->user->identity->id])->one();\n }\n return $this->_userid;\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserId()\n {\n \treturn $this->getCurrentUserid();\n }",
"public function getUserId() \n {\n if (!$this->hasUserId()) \n {\n $this->userId = 0;\n }\n\n return $this->userId;\n }",
"function get_userid() {\n return $this->userid;\n }",
"public function getUserId()\n\t{\n\t\treturn $this->evaluateExpression($this->getUserIdExpression);\n\t}",
"public function getUserId()\n {\n return $this->getValue('nb_user_id');\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId () {\n\t\treturn ($this->userId);\n\t}",
"function getFromUserId()\n {\n return (int) $this->_iFromUserId;\n }",
"public function getUserId ()\n {\n return $this->storage->get(self::$prefix . 'userId');\n }",
"abstract protected function getUserId() ;",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}",
"public function getUserId()\r\n\t{\r\n\t\treturn $this->_userid;\r\n\t}",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId(): string;",
"public function getUserId(): ?int;",
"public function getUserId() {\n\t\t$currentUser = $this->getLoggedUser();\n\t\tif ($currentUser) {\n\t\t\treturn $currentUser->getId();\n\t\t}\n\t}",
"public function getUserID() {\n\t\t\treturn $this->iUser; \t\n\t\t}",
"public function getuserid(){\n // SQL statement\n $sql = \"SELECT user_id FROM user WHERE user_name = '\".$_SESSION['user'].\"'\";\n $value = $this->con->query($sql);\n $value = $value->fetch_assoc();\n return $value['user_id'];\n }",
"public function getUserId()\n {\n if (sfContext::hasInstance())\n {\n if ($userId = sfContext::getInstance()->getUser()->getAttribute('user_id'))\n {\n return $userId;\n }\n }\n return 1;\n }",
"public function getUserId() {\n\t\treturn ($this->userId);\n\t}",
"protected function getUserId() {}",
"protected function getUserId() {}",
"protected function userID ()\n {\n $tokenHeader = apache_request_headers();\n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm);\n //var_dump($datosUsers);\n $user = Model_users::find('all', array\n (\n 'where' => array\n (\n array('nombre'=>$datosUsers->nombre),\n array('password'=>$datosUsers->password)\n )\n ));\n if(!empty($user))\n {\n $id=0;\n foreach ($user as $key => $value)\n {\n $id = $user[$key]->id;\n $username = $user[$key]->nombre;\n $password = $user[$key]->password;\n }\n return $id; \n } \n }",
"private function get_user_id() {\n\t\t//\treturn intval($_POST['s']);\n\t\tif (isset($_GET['user_id']) && is_numeric($_GET['user_id'])) {\n\t\t\t//$_POST['s'] = $_GET['user_id'];\n\t\t\treturn intval($_GET['user_id']);\n\t\t}\n\t}",
"public function getUserId() {\n\t\treturn($this->userId);\n\t}",
"public function getUserId() {\n\t\treturn $this->user_id;\n\t}",
"public function getUserID()\n {\n return $this->userID;\n }",
"public function getUserID()\n {\n return $this->userID;\n }",
"public function getuserId() : Uuid {\n\t\treturn($this->userId);\n\t}",
"function getUserId() {\n\t\treturn $this->getData('userId');\n\t}",
"public function getUserId()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_ID);\n }",
"public function getUserID() {\n\t\treturn $this->_user_id;\n\t}",
"public function getUserID () {\n return $this->id;\n }",
"public function GetUserId($user_data)\n\t{\n\t\t$id = '';\n\t\tif ( !empty($this->user_data_id_key))\n\t\t{\n\t\t\t$aux = $this->GetElementOfKey($this->user_data_id_key, $user_data);\n\t\t\t$id = ($aux != FALSE) ? $aux : '';\n\t\t}\n\t\treturn $id;\n\n\t}",
"public function getUserId() {\n\t\treturn $this->Session->read('UserAuth.User.id');\n\t}",
"public function getUserId() {\n return($this->userId);\n }",
"protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getuserId()\n {\n return $this->userId;\n }",
"public function getIduser()\n {\n return $this->iduser;\n }",
"private function getUserId()\n {\n $company = $this->getCompany();\n\n if (!isset($company['user']['id'])) {\n throw new BiglionException('User \"id\" not defined', 1);\n }\n\n return $company['user']['id'];\n }",
"function get_user_id(){\n\t\t// get the current user details\n\t\t$cookie_id = $this->decrypt($_COOKIE['CakeCookie']['PDCAUSER']);\t\t\n\t\treturn $cookie_id;\n\t}",
"public function getUserId()\n {\n return $this->authenticator->getUserId();\n }",
"public function getUserId() {\n\t\tif ($this->logged()) {\n\t\t\treturn $_SESSION['auth']['id'];\n\t\t}\n\t\treturn false;\n\t}",
"public static function getUserId() {\n if(self::$_identity) {\n return self::$_identity->userid;\n }\n return null;\n }"
] | [
"0.8099202",
"0.8041971",
"0.8030892",
"0.79190314",
"0.77955824",
"0.7761836",
"0.77218616",
"0.77154535",
"0.76581895",
"0.76281166",
"0.7622093",
"0.7578695",
"0.75462484",
"0.7535741",
"0.7482632",
"0.7469782",
"0.7441039",
"0.7441039",
"0.7429418",
"0.7429418",
"0.74245995",
"0.74219155",
"0.74219155",
"0.74219155",
"0.7416954",
"0.74036425",
"0.73866224",
"0.737895",
"0.73746014",
"0.7359437",
"0.7359437",
"0.7359437",
"0.73580736",
"0.7335947",
"0.73306787",
"0.73144096",
"0.7308706",
"0.7304743",
"0.7295757",
"0.72952545",
"0.7262071",
"0.7262071",
"0.7262071",
"0.7262071",
"0.7262071",
"0.7262071",
"0.7262071",
"0.7262071",
"0.7262071",
"0.72597975",
"0.7245359",
"0.72450227",
"0.72326964",
"0.7226738",
"0.72153455",
"0.7192865",
"0.71726406",
"0.71726406",
"0.71653605",
"0.7162665",
"0.71612364",
"0.7159523",
"0.71566314",
"0.71566314",
"0.71330273",
"0.71246374",
"0.71167356",
"0.7116461",
"0.7108859",
"0.70941764",
"0.70925325",
"0.7080631",
"0.70721996",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.7066088",
"0.70592016",
"0.7030381",
"0.7026686",
"0.70239204",
"0.70225793",
"0.7014393",
"0.70109576"
] | 0.0 | -1 |
Returns user's name Either real if known or username. | public function getName($real = false)
{
if (true === $real && !is_null($this->_realName)) {
return $this->_realName;
} else {
return $this->_userName;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n return $this->username;\n } else {\n $init = substr($person->getFirstname(), 0, 1);\n return \"{$init}. {$person->getLastname()}\";\n }\n }",
"public function getNameOrUsername() {\n return $this->getName() ?: $this->username;\n }",
"public function getNameOrUsername() {\n return $this->getName() ? : $this->username;\n }",
"public function usualname()\n\t{\n\t\treturn coalesce(User::info('UsualName'), User::info('Username'));\n\t}",
"function user_name () {\r\n\t$info = user_info();\r\n\treturn (isset($info[1]) ? $info[1] : 'default');\r\n}",
"public function getUserName() {\n if (isset($this->rUser)) {\n return $this->rUser->getFullName();\n }\n return '';\n }",
"function get_user_name() {\n return $this->call('get_user_name', array(), TRUE);\n }",
"public function get_user_name() { \n\n\t\tif ($this->user == '-1') { return _('All'); } \n\t\t\n\t\t$user = new User($this->user);\n\t\treturn $user->fullname . \" (\" . $user->username . \")\";\n\t\t\n\t}",
"public function getName()\n {\n $firstName = $this->getFieldValue(self::FIELD_FIRST_NAME);\n $lastName = $this->getFieldValue(self::FIELD_LAST_NAME);\n // User does not exist.\n if (!$firstName && !$lastName) {\n $name = 'Unknown User';\n } else {\n $name = \"{$firstName} {$lastName}\";\n }\n\n return $name;\n }",
"function getUserName() {\n\t\treturn $this->nickname;\n\t\t/*\n\t\tif(!$this->user_name) {\n\t\t\t$this->sql(\"SELECT nickname FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_name = $this->getQueryResult(0, \"nickname\");\n \t\t}\n\t\treturn $this->user_name;\n\t\t*/\n\t}",
"public function getUserName()\n {\n return $this->user->name;\n }",
"public function getFullName()\n {\n if (! $this->_getVar('user_name')) {\n $name = ltrim($this->_getVar('user_first_name') . ' ') .\n ltrim($this->_getVar('user_surname_prefix') . ' ') .\n $this->_getVar('user_last_name');\n\n if (! $name) {\n // Use obfuscated login name\n $name = $this->getLoginName();\n $name = substr($name, 0, 3) . str_repeat('*', max(5, strlen($name) - 2));\n }\n\n $this->_setVar('user_name', $name);\n\n // \\MUtil_Echo::track($name);\n }\n\n return $this->_getVar('user_name');\n }",
"public function getName()\n {\n // Look for value only if not already set\n if (!isset($this->name)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $user = $us->getUser($this->id);\n $this->name = $user['name'];\n }\n return $this->name;\n }",
"public function name() {\n return isset($this->_adaptee->user_info['user_displayname']) ? $this->_adaptee->user_info['user_displayname'] : null;\n }",
"public function name(): string {\n return (string) $this->user?->first_name;\n }",
"Public Function getUserName()\n\t{\n\t\treturn $this->firstName . ' ' . $this->lastName;\n\t}",
"public function getUserName()\n {\n return $this->user_name;\n }",
"function user_name($user = false)\n{\n $user = $user ? $user : $GLOBALS['user'];\n\n // first check if the name is in the DB\n if ($info = user_info($user))\n return $info['name'];\n\n //no, it isn't. fetch it from the master server\n return master_user_name($user);\n}",
"public function getName() {\n\t\tif($this->_name)\n\t\t\treturn $this->_name;\n\t\tif ($this->first_name != '')\n\t\t\treturn $this->first_name . ($this->last_name ? ' ' . $this->last_name : '');\n\t\telse\n\t\t\treturn $this->username ? $this->username : $this->email;\n\t}",
"public static function getNameIdentification() {\n global $advancedCustomUser;\n if (self::isLogged()) {\n if (!empty(self::getName()) && empty($advancedCustomUser->doNotIndentifyByName)) {\n return self::getName();\n }\n if (!empty(self::getMail()) && empty($advancedCustomUser->doNotIndentifyByEmail)) {\n return self::getMail();\n }\n if (!empty(self::getUserName()) && empty($advancedCustomUser->doNotIndentifyByUserName)) {\n return self::getUserName();\n }\n if (!empty(self::getUserChannelName())) {\n return self::getUserChannelName();\n }\n }\n return __(\"Unknown User\");\n }",
"public function getUserName()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_NAME);\n }",
"public function username() {\n if ($this->proxy_user)\n return $this->proxy_user;\n\n return '';\n }",
"public function getUserDisplayName();",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public function getUserName()\n {\n return $this->formattedData['username'];\n }",
"public function getUserName()\n {\n if (array_key_exists(\"userName\", $this->_propDict)) {\n return $this->_propDict[\"userName\"];\n } else {\n return null;\n }\n }",
"public function getUserName()\r\n {\r\n return $this->user->username;\r\n }",
"public function getUserName() {\n\t\tif(($username=$this->getState('__username'))!==null) return $username;\n\t\telse return NULL;\n\t}",
"public function getFirstNameOrUsername() {\n return $this->first_name ? : $this->username;\n }",
"public function name()\n\t{\n\t\treturn User::info('Username');\n\t}",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername(): string\n {\n return (string) $this->nickname;\n }",
"public function getUserName() {\n\t\treturn ($this->userName);\n\t}",
"final public function getUserName():string \n {\n return $this->userState->getUserName();\n }",
"public function getUsername()\n {\n return empty($this->username) ? 'anonymous' : $this->username;\n }",
"public function getNameForDisplay()\n {\n if (null !== $this->getName() && '' !== $this->getName()) {\n return $this->getName();\n } elseif (1 == $this->getRealUserName()) {\n return $this->getUsername();\n }\n\n return $this->getEmail();\n }",
"public function getUserName()\n {\n return $this->getName();\n }",
"public static function getUserName()\n {\n $user = static::get();\n if (isset($user->noPessoa)) {\n return $user->noPessoa;\n }\n }",
"public function getCurrentUserName()\n {\n $currentUserName = '';\n try {\n $loggedInUser = $this->getLoggedInUser();\n if ($loggedInUser) {\n $currentUserName = $loggedInUser['name'];\n }\n } catch (FamilyGraphException $ex) {\n // ignore error\n }\n \n return $currentUserName;\n }",
"public function username ( $name = null ) {\n\t\t\treturn $this->user_name( $name );\n\t\t}",
"public function getDisplayName() { $n = $this->data->get(\"displayName\", null);\n if (!empty($n)) {\n return $n;\n }\n \n // I have google's name?\n if (($g = $this->getGoogleInfo())) {\n if (isset($g->givenName) && !empty($g->givenName)) {\n return $g->givenName;\n }\n if (isset($g->name) && !empty($g->name)) {\n return $g->name;\n }\n }\n \n // user is current user?? load his name if he is\n $currentUser = JFactory::getUser();\n if ((int)($currentUser->id) == (int)$this->userid) {\n return ucwords(strtolower($currentUser->name));\n }\n \n // load user and get his name\n $user = F_User::getUserById((int)$this->$userid);\n if ($user) {\n return ucwords(strtolower($user->name));\n }\n \n // wtf\n return \"???\";\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUserFullName() {\n return $this->first_name . ' ' . $this->last_name;\n }",
"function getName(): string\n\t{\n\t\treturn $this->username;\n\t}",
"public function getUserName();",
"function get_name() {\n if(is_valid_user()) {\n return $_SESSION['username'];\n } else {\n return null;\n }\n}",
"public function getUsername() : string\n {\n return explode(':', $this->uri->getUserInfo() ?: '')[0];\n }",
"public function getUsername()\n {\n return $this->getName();\n }",
"function userGetName($uid)\n\t{\n\t\t$username = $this->DB->database_select('users', 'username', array('uid' => $uid), 1);\n\t\treturn $username['username'];\n\t}",
"public static function getUserName($user_id);",
"public function getExternalUserName();",
"public function getUserName()\n {\n return $this->userName;\n }",
"public function getUserName()\n {\n return $this->userName;\n }",
"public function getUserName() {}",
"public function username(){\n \treturn $this->users->name.' '.$this->users->ape;\n }",
"function get_user_name() {\n\treturn isset($_SESSION['username']) ? $_SESSION['username'] : null;\n}",
"public function getUsername() {}",
"public function getUserUsername () {\n\t\treturn ($this->userUsername);\n\t}",
"public function getUserNameIdentifier()\n {\n return $this->user_name;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }"
] | [
"0.8529275",
"0.80090934",
"0.7952243",
"0.78205526",
"0.7819316",
"0.7724812",
"0.77069783",
"0.76964736",
"0.76552254",
"0.7628716",
"0.7600707",
"0.76006466",
"0.75921065",
"0.7542373",
"0.75330985",
"0.7530391",
"0.7504881",
"0.74768025",
"0.7452608",
"0.7452132",
"0.7436302",
"0.7412656",
"0.7408576",
"0.73893875",
"0.73893875",
"0.7359279",
"0.73550665",
"0.7349214",
"0.73333323",
"0.7318905",
"0.73162323",
"0.7302341",
"0.7302341",
"0.7302341",
"0.7302341",
"0.7302341",
"0.72997713",
"0.7292104",
"0.72767925",
"0.7270417",
"0.72592354",
"0.72585475",
"0.7238559",
"0.72153825",
"0.7206289",
"0.720093",
"0.7181495",
"0.7181495",
"0.7181495",
"0.7181495",
"0.7169173",
"0.7168596",
"0.71638036",
"0.7154991",
"0.7146681",
"0.7146465",
"0.7131883",
"0.71285367",
"0.71214366",
"0.7119602",
"0.7119602",
"0.71174157",
"0.71143514",
"0.7102277",
"0.7102165",
"0.7101439",
"0.7092564",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253",
"0.7088253"
] | 0.7585468 | 13 |
Mock a class and use the mock in the current request | protected function mock($class) {
$mock = Mockery::mock($class);
$this->app->instance($class, $mock);
return $mock;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function mock(string $class, array $config = null)\n {\n return new self('mock', $class, $config);\n }",
"public function setUp() {\n\t\t$this->mockDecoratedRequestEngine = $this->getMockBuilder('TYPO3\\Flow\\Http\\Client\\RequestEngineInterface')->getMock();\n\t\t$this->cacheAwareRequestEngine = new CacheAwareRequestEngine($this->mockDecoratedRequestEngine);\n\n\t\t$this->mockRequestCache = $this->getMockBuilder('TYPO3\\Flow\\Cache\\Frontend\\VariableFrontend')->disableOriginalConstructor()->getMock();\n\t\t$this->inject($this->cacheAwareRequestEngine, 'requestCache', $this->mockRequestCache);\n\n\t\t# simulating a date in order to test absolute expiration dates\n\t\t$this->mockNow = new Now('Sat, 13 Dec 2014 20:00:00 +0100');\n\t\t$this->inject($this->cacheAwareRequestEngine, 'now', $this->mockNow);\n\n\t\t# we use real request/response objects by intention (otherwise there are too many mocks to create)\n\t\t$this->mockRequest = new Request(array(), array(), array(), array());\n\t\t$this->mockResponse = new Response();\n\t}",
"public function testRedirectReplacesRequestClass()\n {\n $new = $this->getMock('Lunr\\Corona\\RequestInterface');\n\n $this->class->redirect($new);\n\n $this->assertPropertySame('request', $new);\n $this->assertNotSame($new, $this->request);\n }",
"public function testRedirectReplacesRequestClassWithInterRequestClass()\n {\n $new = $this->getMockBuilder('Lunr\\Corona\\InterRequest')\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->class->redirect($new);\n\n $this->assertPropertySame('request', $new);\n $this->assertNotSame($new, $this->request);\n }",
"public function setUp()\n {\n $this->instance = new Request();\n }",
"protected function _useMock() {\n\t\t$request = new CakeRequest(null, false);\n\n\t\t$this->Js = new JsHelper($this->View, array('TestJs'));\n\t\t$this->Js->TestJsEngine = $this->getMock('JsBaseEngineHelper', array(), array($this->View));\n\t\t$this->Js->request = $request;\n\t\t$this->Js->Html = new HtmlHelper($this->View);\n\t\t$this->Js->Html->request = $request;\n\t\t$this->Js->Form = new FormHelper($this->View);\n\t\t$this->Js->Form->request = $request;\n\t\t$this->Js->Form->Html = new HtmlHelper($this->View);\n\t}",
"protected function createHttpRequest()\n {\n return $this->createMock(RequestInterface::class);\n }",
"public function setUp()\n {\n $this->_req = new Mad_Controller_Request_Mock();\n }",
"private function configureMock()\n {\n $this->controller->expects($this->once())->method('doSomething')->with($this->parameters);\n }",
"protected function setUp()\n {\n $this->object = $this->createMock(AbstractRequest::class, [\n $this->getHttpClient(),\n $this->getHttpRequest(),\n self::TOKEN,\n \\Omnipay\\Rede\\Gateway::TEST_ENDPOINT\n ]);\n }",
"public function setUp()\n {\n $this->middleware = new ForbiddenWordsFilterMiddleware(['badword']);\n $this->request = Phake::mock(ServerRequestInterface::class);\n $this->delegate = Phake::mock(DelegateInterface::class);\n\n // the class needs to know which route it matched. Create a fake result and tell the request to return that\n $this->route_result = Phake::mock(RouteResult::class);\n Phake::when($this->request)->getAttribute(RouteResult::class)->thenReturn($this->route_result);\n Phake::when($this->route_result)->getMatchedParams()->thenReturn([]);\n\n // return an empty body stream\n Phake::when($this->request)->getBody()->thenReturn(new BufferStream());\n\n // when try try to replace the body just return the same request as before.\n Phake::when($this->request)->withBody($this->anything())->thenReturn($this->request);\n }",
"private function getMockAuthentication()\n {\n return $this->getMock('Mremi\\UrlShortener\\Provider\\Bitly\\AuthenticationInterface');\n }",
"public function setUp()\n {\n $configuration = $this->getMock('Lunr\\Core\\Configuration');\n\n $map = [\n [ 'default_webpath', '/path' ],\n [ 'default_domain', 'www.domain.com' ],\n [ 'default_port', 666 ],\n [ 'default_url', 'http://www.domain.com:666/path/' ],\n ];\n\n $configuration->expects($this->any())\n ->method('offsetGet')\n ->will($this->returnValueMap($map));\n\n $this->configuration = $configuration;\n\n $this->class = new ResqueRequest($this->configuration);\n $this->reflection = new ReflectionClass('Lunr\\Spawn\\ResqueRequest');\n }",
"public function __construct()\n {\n $this->mock = Mockery::mock('User');\n\n }",
"public function setUp()\r\n {\r\n $this->mockRequest = $this->getMock('stubbles\\input\\web\\WebRequest');\r\n $this->mockRequest->expects($this->any())\r\n ->method('getMethod')\r\n ->will($this->returnValue('GET'));\r\n $this->mockRequest->expects($this->any())\r\n ->method('uri')\r\n ->will($this->returnValue(HttpUri::fromString('http://example.com/hello')));\r\n $this->mockResponse = $this->getMock('stubbles\\webapp\\response\\Response');\r\n $mockResponseNegotiator = $this->getMockBuilder('stubbles\\webapp\\response\\ResponseNegotiator')\r\n ->disableOriginalConstructor()\r\n ->getMock();\r\n $mockResponseNegotiator->expects($this->any())\r\n ->method('negotiateMimeType')\r\n ->will($this->returnValue($this->mockResponse));\r\n $this->routing = $this->getMockBuilder('stubbles\\webapp\\routing\\Routing')\r\n ->disableOriginalConstructor()\r\n ->getMock();\r\n $this->mockExceptionLogger = $this->getMockBuilder('stubbles\\lang\\errorhandler\\ExceptionLogger')\r\n ->disableOriginalConstructor()\r\n ->getMock();\r\n $this->webApp = $this->getMock('stubbles\\webapp\\TestWebApp',\r\n ['configureRouting'],\r\n [$this->mockRequest,\r\n $mockResponseNegotiator,\r\n $this->routing,\r\n $this->mockExceptionLogger\r\n ]\r\n );\r\n $_SERVER['REQUEST_METHOD'] = 'GET';\r\n }",
"public function testClassBasedControllerInvokesCorrectMethod()\n {\n $controller = $this->getMock('SomeClass', ['someMethod']);\n\n $controller->expects($this->once())\n ->method('someMethod')\n ->with($this->equalTo('2'), $this->equalTo('phil'))\n ->will($this->returnValue('hello world'));\n\n $container = $this->getMock('League\\Container\\ContainerInterface');\n\n $container->expects($this->once())\n ->method('get')\n ->with($this->equalTo('SomeClass'))\n ->will($this->returnValue($controller));\n\n $collection = new Route\\RouteCollection($container);\n $collection->setStrategy(new UriStrategy);\n $collection->get('/route/{id}/{name}', 'SomeClass::someMethod');\n\n $dispatcher = $collection->getDispatcher();\n $response = $dispatcher->dispatch('GET', '/route/2/phil');\n\n $this->assertEquals('hello world', $response->getContent());\n }",
"public function calls_are_proxied()\n {\n // Arrange\n $service = new Service;\n $methods = array('get', 'put', 'post', 'patch', 'delete', 'head');\n $url = 'users/me';\n $client = Mockery::mock('GuzzleHttp\\Client');\n $response = Mockery::mock('GuzzleHttp\\Message\\Response');\n\n foreach ($methods as $method) {\n $client->shouldReceive($method)->once()\n ->with($url)->andReturn($response);\n $service->setClient($client);\n\n // Act\n $result = $service->$method($url);\n\n // Assert\n $this->assertEquals($response, $result);\n }\n }",
"private static function mock()\n {\n $files = ['configMocking'];\n $folder = static::$root.'Mocking'.'/';\n\n self::call($files, $folder);\n }",
"public function getMock($originalClassName,\n $methods = array(),\n array $arguments = array(),\n $mockClassName = '',\n $callOriginalConstructor = true,\n $callOriginalClone = true,\n $callAutoload = true\n )\n {\n $originalClassName = Enlight_Class::getClassName($originalClassName);\n return parent::getMock($originalClassName,\n $methods,\n $arguments,\n $mockClassName,\n $callOriginalConstructor,\n $callOriginalClone,\n $callAutoload\n );\n }",
"public function setUp()\n {\n $this->request = Phake::mock('Symfony\\Component\\HttpFoundation\\Request');\n $requestStack = Phake::mock('Symfony\\Component\\HttpFoundation\\RequestStack');\n Phake::when($requestStack)->getMasterRequest()->thenReturn($this->request);\n\n $this->strategy = new CurrentRouteSubQueryStrategy($requestStack);\n }",
"public function testGetRequest()\n {\n $viewCounterServiceMock = $this->getMockBuilder(ViewCounter::class)\n ->setConstructorArgs([$this->counterManagerMock, $this->requestStackMock, $this->viewcounterConfigMock])\n ->getMock();\n\n $this->requestStackMock\n ->expects($this->once())\n ->method('getCurrentRequest')\n ->with()\n ->willReturn($this->request);\n\n $request = $this->invokeMethod($viewCounterServiceMock, 'getRequest', []);\n\n $this->assertTrue($request instanceof Request);\n }",
"protected function createRequestMockWithoutViewState()\n {\n //$request = $this->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Request')->disableOriginalConstructor()->getMock();\n $request = Request::create('');\n $request->query = new ParameterBag(array(\n 'param2' => 'param2_value'\n ));\n\n return $request;\n }",
"protected function mock(string $class): MockObject\n {\n if (!class_exists($class)) {\n throw new InvalidArgumentException(sprintf('Class not found: %s', $class));\n }\n\n $mock = $this->getMockBuilder($class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->container->set($class, $mock);\n\n return $mock;\n }",
"protected function setUp()\n {\n \n\t$this->object = new Request(array(),array());\n }",
"function __construct($class, $mock_class) {\n $this->class = $class;\n $this->mock_class = $mock_class;\n if (! $this->mock_class) {\n $this->mock_class = 'Mock' . $this->class;\n }\n $this->mock_base = SimpleTest::getMockBaseClass();\n $this->reflection = new SimpleReflection($this->class);\n }",
"public function testContainerClassIsPrioritized(): void\n {\n $endpoint = $this->getMockEndpoint();\n $endpoint->expects($this->atLeastOnce())\n ->method('execute')\n ->will($this->returnValue(\n $this->createMock(ResponseInterface::class)\n ));\n $this->executeMockRequestOnEndpoint($endpoint, []);\n $this->markTestIncomplete('This needs reworking');\n }",
"protected function mockSession()\n\t{\n\t\trequire_once ROOTPATH . 'tests/_support/Session/MockSession.php';\n\t\t$config = config('App');\n\t\t$this->session = new MockSession(new ArrayHandler($config, '0.0.0.0'), $config);\n\t\t\\Config\\Services::injectMock('session', $this->session);\n\t}",
"protected function setUp()\n {\n $this->object = new Request;\n }",
"public function testNewInstanceWithDefaultArguments(): void\n {\n $this->assertInstanceOf(Request::class, self::$request);\n }",
"protected function setUp()\n {\n $client = $this->getMockBuilder(ZendClient::class)\n ->setMethods(['doRequest'])\n ->setConstructorArgs(['http://127.0.0.1', []])\n ->getMock();\n // @codingStandardsIgnoreStart\n $response = <<<RESP\nHTTP/1.1 200 OK\nDate: Fri, 13 Nov 2015 15:43:39 GMT\nServer: Apache/2.2.29 (Unix) PHP/5.6.10 mod_ssl/2.2.29 OpenSSL/0.9.8zc\nX-Powered-By: PHP/5.6.9 ZendServer/8.5.0\nX-UA-Compatible: \"IE=edge\"\nContent-Length: 1256\nKeep-Alive: timeout=5, max=99\nConnection: Keep-Alive\nContent-Type: application/hal+json\n\n{\"_links\":{\"self\":{\"href\":\"http:\\/\\/127.0.0.1\\/\"},\"first\":{\"href\":\"http:\\/\\/127.0.0.1\"},\"last\":{\"href\":\"http:\\/\\/127.0.0.1\\u0026page=1\"}},\"_embedded\":{\"items\":[{\"id\":1,\"name\":\"name1\"},{\"id\":2,\"name\":\"name2\"}]},\"page_count\":1,\"page_size\":25,\"total_items\":1,\"page\":1}\nRESP;\n // @codingStandardsIgnoreEnd\n $client->method('doRequest')\n ->willReturn($response);\n\n $this->object = new Client($client, 10);\n }",
"protected function setUp() {\n $this->object = new HttpRequestBuilder();\n }",
"private function createClientInterfaceMock()\n {\n return $this->getMockBuilder(ClientInterface::class)->getMock();\n }",
"function getMockHttpRequest($path)\n{\n if (!file_exists(__DIR__ . '/Mock/' . $path) && file_exists(__DIR__ . '/../Mock/' . $path)) {\n return parse_request(file_get_contents(__DIR__ . '/../Mock/' . $path));\n }\n\n return parse_request(file_get_contents(__DIR__ . '/Mock/' . $path));\n}",
"protected function setUp()\n {\n $this->className = Tigo_TigoMoney_Model_Payment_Redirect_Api_RequestBuilder::class;\n\n $this->subject = $this\n ->getMockBuilder($this->className)\n ->setMethods(null)\n ->getMock();\n\n $this->authorizationRequest = $this->getModelMock(\n 'tigo_tigomoney/payment_redirect_api_authorizationRequest',\n array()\n );\n\n $this->authorizationRequest = $this\n ->getMockBuilder(Tigo_TigoMoney_Model_Payment_Redirect_Api_AuthorizationRequest::class)\n ->setMethods(null)\n ->getMock();\n $this->replaceByMock(\n 'model',\n 'tigo_tigomoney/payment_redirect_api_authorizationRequest',\n $this->authorizationRequest\n );\n\n $this->generateTokenRequest = $this\n ->getMockBuilder(Tigo_TigoMoney_Model_Payment_Redirect_Api_GenerateTokenRequest::class)\n ->setMethods(null)\n ->getMock();\n $this->replaceByMock(\n 'model',\n 'tigo_tigomoney/payment_redirect_api_generateTokenRequest',\n $this->generateTokenRequest\n );\n\n $this->reverseTransactionRequest = $this\n ->getMockBuilder(Tigo_TigoMoney_Model_Payment_Redirect_Api_ReverseTransactionRequest::class)\n ->setMethods(null)\n ->getMock();\n $this->replaceByMock(\n 'model',\n 'tigo_tigomoney/payment_redirect_api_reverseTransactionRequest',\n $this->reverseTransactionRequest\n );\n\n $this->transactionStatusRequest = $this\n ->getMockBuilder(Tigo_TigoMoney_Model_Payment_Redirect_Api_TransactionStatusRequest::class)\n ->setMethods(null)\n ->getMock();\n $this->replaceByMock(\n 'model',\n 'tigo_tigomoney/payment_redirect_api_transactionStatusRequest',\n $this->transactionStatusRequest\n );\n\n $this->payment = $this\n ->getMockBuilder(Mage_Sales_Model_Order_Payment::class)\n ->setMethods(null)\n ->getMock();\n $this->replaceByMock(\n 'model',\n 'sales/order_payment',\n $this->payment\n );\n\n $this->order = $this\n ->getMockBuilder(Mage_Sales_Model_Order::class)\n ->setMethods(array('getPayment'))#, 'getCustomerFirstname', 'getCustomerLastname', 'getCustomerEmail', 'getBaseGrandTotal', 'getIncrementId'))\n ->getMock();\n $this\n ->order\n ->expects($this->any())\n ->method('getPayment')\n ->will($this->returnValue($this->payment));\n $this->replaceByMock(\n 'model',\n 'sales/order',\n $this->order\n );\n\n $this->dataHelper = $this->getHelperMock(\n 'tigo_tigomoney/data',\n array()\n );\n $this->replaceByMock(\n 'helper',\n 'tigo_tigomoney/data',\n $this->dataHelper\n );\n }",
"private function getBaseMockResponse()\n {\n return $this->getMockBuilder('Guzzle\\Http\\Message\\Response')\n ->disableOriginalConstructor()\n ->getMock();\n }",
"protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }",
"protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }",
"protected function createMockClient()\n {\n $mock = new MockHandler([\n new Response(200),\n ]);\n\n $container = [];\n $history = Middleware::history($container);\n\n $stack = HandlerStack::create($mock);\n $stack->push($history);\n\n $this->mockedClient = new Client(['handler' => $stack]);\n $this->container = $container;\n }",
"protected function prepareViewMock()\n {\n /** @var Mockery\\Mock $viewMock */\n $viewMock = Mockery::mock(Factory::class);\n $viewMock->shouldReceive('make')->andReturn('testing');\n $viewMock->shouldReceive('share')->andReturnSelf();\n\n $this->app->instance(Factory::class, $viewMock);\n }",
"protected function setUp()\n {\n $this->object = new Request('','','');\n }",
"private function create_s3_client_partial_mock( $expected, $response ) {\n\t\t$s3_helper = new S3_helper();\n\t\t$mock_s3_client = Mockery::mock( $s3_helper->init_s3( '', '' ) );\n\t\t$mock_s3_client->shouldReceive( 'putObject' )\n\t\t->with( $expected )\n\t\t->andReturn( $response );\n\t\treturn $mock_s3_client;\n\t}",
"private function mockCache()\n {\n $this->objectManager->configure([\n 'preferences' => [\n Cache::class => DummyCache::class\n ]\n ]);\n }",
"private function setRequest() {\n // Create request object\n $this->request = Request::createFromGlobals();\n // Check caching and exit if so\n // - create a dummy response for possible 304\n $response = new Response();\n $seconds = Config::get()->pagecachetime;\n $response->setLastModified(new DateTime('-' . $seconds . ' seconds'));\n if ($response->isNotModified($this->getRequest())) {\n $response\n ->setSharedMaxAge($seconds)\n ->send();\n exit();\n }\n // Add better json request support\n // check request Content-Type\n $ctCheck = 0 === strpos(\n $this->request->headers->get('CONTENT_TYPE')\n , 'application/json'\n );\n // check request Method\n $methodCheck = in_array(\n strtoupper($this->request->server->get('REQUEST_METHOD', 'GET'))\n , array('PUT', 'DELETE', 'POST')\n );\n if ($ctCheck && $methodCheck) {\n $params = (array) json_decode($this->request->getContent());\n $this->request->request = new ParameterBag($params);\n }\n }",
"private function getMockGuzzle()\n {\n $mock = new MockHandler(array_merge([\n new Response(200, [], json_encode([]))\n ]));\n\n $stack = HandlerStack::create($mock);\n return new Guzzle(['handler' => $stack]);\n }",
"private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }",
"public function testClassname()\n {\n $input = Request::all();\n\n //path params validation\n\n\n //not path params validation\n if (!isset($input['client'])) {\n throw new \\InvalidArgumentException('Missing the required parameter $client when calling testClassname');\n }\n $client = $input['client'];\n\n\n return response('How about implementing testClassname as a patch method ?');\n }",
"public function setUp(): void\n {\n $this->request = $this->createMock(RequestInterface::class);\n\n $this->userService = $this->createMock(UserServiceInterface::class);\n }",
"public function createMock($originalClassName) {\n $mock = parent::createMock($originalClassName);\n $this->addMockedMethods($mock, $originalClassName);\n return $mock;\n }",
"private function createHttpHandler()\n {\n $this->httpMock = new MockHandler();\n\n $handlerStack = HandlerStack::create($this->httpMock);\n $handlerStack->push(Middleware::history($this->curlHistory));\n\n $this->client = new Client(['handler' => $handlerStack]);\n\n app()->instance(Client::class, $this->client);\n }",
"public function setUp(): void\n {\n parent::setUp();\n\n $this->buildRequestMock();\n }",
"public function setUp()\n {\n $this->stream = Phake::mock(StreamInterface::CLASS);\n $response = Phake::mock(ResponseInterface::CLASS);\n Phake::when($response)->getBody()->thenReturn($this->stream);\n $client = Phake::mock(Client::CLASS);\n Phake::when($client)->post(Phake::anyParameters())->thenReturn($response);\n Phake::when($client)->get(Phake::anyParameters())->thenReturn($response);\n\n $this->manager = new AutopilotManager('foo', null, $client);\n }",
"final protected function mockRequest(string $filename): void\n {\n $mockResponse = $this->loadMockResponse($filename);\n $parsedResponse = Message::parseResponse($mockResponse);\n $this->mockHandler->append($parsedResponse);\n }",
"public function setUp() {\n $this->request = $this->getMock('Imbo\\Http\\Request\\RequestInterface');\n $this->response = $this->getMock('Imbo\\Http\\Response\\ResponseInterface');\n $this->database = $this->getMock('Imbo\\Database\\DatabaseInterface');\n $this->storage = $this->getMock('Imbo\\Storage\\StorageInterface');\n $this->event = $this->getMock('Imbo\\EventManager\\EventInterface');\n $this->manager = $this->getMock('Imbo\\EventManager\\EventManager');\n $this->event->expects($this->any())->method('getRequest')->will($this->returnValue($this->request));\n $this->event->expects($this->any())->method('getResponse')->will($this->returnValue($this->response));\n $this->event->expects($this->any())->method('getDatabase')->will($this->returnValue($this->database));\n $this->event->expects($this->any())->method('getStorage')->will($this->returnValue($this->storage));\n $this->event->expects($this->any())->method('getManager')->will($this->returnValue($this->manager));\n\n $this->resource = $this->getNewResource();\n }",
"public function setUp()\n {\n parent::setUp();\n $this->mock = $this->initMock(TodayService::class);\n $this->target = $this->app->make(TodayController::class);\n }",
"protected function _prepareMockObjects()\n {\n $this->requestMock = $this->getMockBuilder(\\Magento\\Framework\\App\\Request\\Http::class)\n ->disableOriginalConstructor()\n ->getMock();\n $this->objectManagerMock = $this->createMock(\\Magento\\Framework\\ObjectManagerInterface::class);\n $this->storeManagerMock = $this->getMockForAbstractClass(\\Magento\\Store\\Model\\StoreManagerInterface::class);\n $this->storeModelMock = $this->createPartialMock(\\Magento\\Store\\Model\\Store::class, ['__wakeup', 'getId']);\n $this->reviewMock = $this->createPartialMock(\n \\Magento\\Review\\Model\\Review::class,\n ['__wakeup', 'create', 'save', 'getId', 'getResource', 'aggregate', 'getEntityIdByCode']\n );\n $this->reviewFactoryMock = $this->createPartialMock(\\Magento\\Review\\Model\\ReviewFactory::class, ['create']);\n $this->ratingMock = $this->createPartialMock(\n \\Magento\\Review\\Model\\Rating::class,\n ['__wakeup', 'setRatingId', 'setReviewId', 'addOptionVote']\n );\n $this->ratingFactoryMock = $this->createPartialMock(\\Magento\\Review\\Model\\RatingFactory::class, ['create']);\n $this->resultFactoryMock = $this->getMockBuilder(\\Magento\\Framework\\Controller\\ResultFactory::class)\n ->disableOriginalConstructor()\n ->getMock();\n $this->resultRedirectMock = $this->getMockBuilder(\\Magento\\Backend\\Model\\View\\Result\\Redirect::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->resultFactoryMock->expects($this->any())\n ->method('create')\n ->with(ResultFactory::TYPE_REDIRECT, [])\n ->willReturn($this->resultRedirectMock);\n }",
"public function setUp() {\n $this->container = $this->getMock('Imbo\\Container');\n $this->model = $this->getMock('Imbo\\Model\\ModelInterface');\n $this->request = $this->getMock('Imbo\\Http\\Request\\Request');\n $this->responseHeaders = $this->getMock('Symfony\\Component\\HttpFoundation\\HeaderBag');\n $this->requestHeaders = $this->getMock('Symfony\\Component\\HttpFoundation\\HeaderBag');\n $this->response = $this->getMock('Imbo\\Http\\Response\\Response');\n $this->response->headers = $this->responseHeaders;\n $this->request->headers = $this->requestHeaders;\n\n $this->responseWriter = new ResponseWriter();\n $this->responseWriter->setContainer($this->container);\n }",
"protected function getClientMock()\n {\n $clientMock = $this->getMockBuilder('GuzzleHttp\\ClientInterface')\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->responseMock = $this->getMockBuilder('GuzzleHttp\\Message\\Response')\n ->disableOriginalConstructor()\n ->getMock();\n\n $clientMock->expects($this->any())->method('get')->will($this->returnValue($this->responseMock));\n\n return $clientMock;\n }",
"public function testSimple() {\n// $default = $this->getMock(\"\\Bonder\\Controller\");\n// $cp = new \\Bonder\\Controllers\\RegexControllerProvider($multiplexor, $default);\n }",
"private function getBaseMockLink()\n {\n return $this->getMock('Mremi\\UrlShortener\\Model\\LinkInterface');\n }",
"protected function setUp()\n {\n //$this->object = new Middleware;\n }",
"public function testMethods()\n {\n $mock = $this->getMock(\n 'Yoozi\\Notification\\Transport\\Realtime', \n array('send'),\n array('http://localhost')\n );\n\n // Configure the stub.\n $mock->expects($this->once())\n ->method('send')\n ->will($this->returnValue(new Response));\n\n $this->assertEquals(new Response, $mock->send('foo'));\n $this->assertTrue($mock->isValid('inbox.unread'));\n $this->assertFalse($mock->isValid('inbox.read'));\n }",
"protected function mockTokenManager()\n {\n $tokenManager = $this\n ->getMockBuilder('Symfony\\\\Component\\\\Security\\\\Csrf\\\\CsrfTokenManagerInterface')\n ->setMethods(['getToken'])\n ->getMockForAbstractClass()\n ;\n\n $tokenManager\n ->expects($this->any())\n ->method('getToken')\n ->willReturn(new CsrfToken('_csrf', 'testValue'))\n ;\n\n $tokenManager\n ->expects($this->any())\n ->method('refreshToken')\n ->willReturn(new CsrfToken('_csrf', 'testValue'))\n ;\n\n return $tokenManager;\n }",
"public static function setUpBeforeClass(){\n self::$urlify=m::mock('alias:URLify');\n }",
"private function mockClass( $return ): \\PHPUnit\\Framework\\MockObject\\MockObject\n {\n $mock = $this->createMock('\\db\\Connect');\n $mock->expects($this->exactly( 2 ))\n ->method('single')\n ->will($this->returnValue( $return[0] ));\n $mock->expects($this->once())\n ->method('bind_multiple');\n $mock->expects($this->once())\n ->method('query')\n ->will($this->returnValue( $return[1] ));\n\n return $mock;\n }",
"public function testGetClass()\n {\n $viewCounterServiceMock = $this->getMockBuilder(ViewCounter::class)\n ->setConstructorArgs([$this->counterManagerMock, $this->requestStackMock, $this->viewcounterConfigMock])\n ->setMethods(['getClass'])\n ->getMock();\n\n $viewCounterServiceMock\n ->expects($this->once())\n ->method('getClass')\n ->with()\n ->willReturn($this->viewCounterEntityMock);\n\n $viewCounterObject = $this->invokeMethod($viewCounterServiceMock, 'getClass', []);\n\n $this->assertTrue($viewCounterObject instanceof ViewCounterInterface);\n }",
"public function setUp(): void\n {\n parent::setUp();\n $this->createMockRequest('confirm_payment_response', __DIR__);\n }",
"public function testNewInstance()\n {\n $className = 'TechDivision\\ApplicationServer\\Api\\Mock\\MockService';\n $instance = $this->service->newInstance($className, array(\n $this->service->getInitialContext(),\n \\Mutex::create(false)\n ));\n $this->assertInstanceOf($className, $instance);\n }",
"protected function setUp(): void\n {\n $this->dispatcher = $this->getMockBuilder(Dispatcher::class)->disableOriginalConstructor()->setMethods(['resolveController'])->getMock();\n\n $this->mockActionRequest = $this->getMockBuilder(ActionRequest::class)->disableOriginalConstructor()->getMock();\n $this->mockActionRequest->method('isMainRequest')->willReturn(false);\n\n $this->mockParentRequest = $this->getMockBuilder(ActionRequest::class)->disableOriginalConstructor()->getMock();\n $this->mockActionRequest->method('getParentRequest')->willReturn($this->mockParentRequest);\n\n $this->mockMainRequest = $this->getMockBuilder(ActionRequest::class)->disableOriginalConstructor()->getMock();\n $this->mockActionRequest->method('getMainRequest')->willReturn($this->mockMainRequest);\n\n $this->mockHttpRequest = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();\n $this->mockActionRequest->method('getHttpRequest')->willReturn($this->mockHttpRequest);\n\n $this->actionResponse = new ActionResponse();\n\n $this->mockController = $this->getMockBuilder(ControllerInterface::class)->setMethods(['processRequest'])->getMock();\n $this->dispatcher->method('resolveController')->willReturn($this->mockController);\n\n $this->mockSecurityContext = $this->getMockBuilder(Context::class)->disableOriginalConstructor()->getMock();\n\n $this->mockFirewall = $this->getMockBuilder(FirewallInterface::class)->getMock();\n\n $this->mockSecurityLogger = $this->getMockBuilder(LoggerInterface::class)->getMock();\n $mockLoggerFactory = $this->getMockBuilder(PsrLoggerFactoryInterface::class)->getMock();\n $mockLoggerFactory->expects(self::any())->method('get')->with('securityLogger')->willReturn($this->mockSecurityLogger);\n\n $this->mockObjectManager = $this->getMockBuilder(ObjectManagerInterface::class)->getMock();\n $this->mockObjectManager->method('get')->will(self::returnCallBack(function ($className) use ($mockLoggerFactory) {\n if ($className === PsrLoggerFactoryInterface::class) {\n return $mockLoggerFactory;\n }\n return null;\n }));\n\n $this->dispatcher->injectObjectManager($this->mockObjectManager);\n $this->dispatcher->injectSecurityContext($this->mockSecurityContext);\n $this->dispatcher->injectFirewall($this->mockFirewall);\n }",
"public function setUp()\n {\n $this->app = new Container();\n $this->client = m::mock('\\Orchestra\\FtpUpdater\\Client\\Ftp');\n }",
"protected function setUp(): void\n {\n $this->object = new OpenID_Extension_Mock(OpenID_Extension::REQUEST);\n }",
"public function testAdditionalGettersAndSetters()\n {\n $this->assertSame($this->request->setCurrency('RUB'), $this->request);\n $this->assertEquals($this->request->getCurrency(), 'RUB');\n\n $this->assertSame($this->request->setFailUrl('http://test.test/error'), $this->request);\n $this->assertEquals($this->request->getFailUrl(), 'http://test.test/error');\n\n $this->assertSame($this->request->setDescription('Order Description'), $this->request);\n $this->assertEquals($this->request->getDescription(), 'Order Description');\n\n $this->assertSame($this->request->setLanguage('ru'), $this->request);\n $this->assertEquals($this->request->getLanguage(), 'ru');\n\n $this->assertSame($this->request->setPageView('DESKTOP'), $this->request);\n $this->assertEquals($this->request->getPageView(), 'DESKTOP');\n\n $this->assertSame($this->request->setClientId(123456), $this->request);\n $this->assertEquals($this->request->getClientId(), 123456);\n\n $this->assertSame($this->request->setMerchantLogin('test_login'), $this->request);\n $this->assertEquals($this->request->getMerchantLogin(), 'test_login');\n\n $this->assertSame($this->request->setJsonParams('{\"param\":\"value\"}'), $this->request);\n $this->assertEquals($this->request->getJsonParams(), '{\"param\":\"value\"}');\n\n $this->assertSame($this->request->setSessionTimeoutSecs(1800), $this->request);\n $this->assertEquals($this->request->getSessionTimeoutSecs(), 1800);\n\n $this->assertSame($this->request->setExpirationDate('2017-12-12T12:12:12'), $this->request);\n $this->assertEquals($this->request->getExpirationDate(), '2017-12-12T12:12:12');\n\n $this->assertSame($this->request->setBindingId(654321), $this->request);\n $this->assertEquals($this->request->getBindingId(), 654321);\n }",
"private function createRewriterInterfaceMock()\n {\n return $this->getMockBuilder(RewriterInterface::class)->getMock();\n }",
"public function testHandleWithMockServices(): void\n {\n $this->mockService(stdClass::class, function () {\n return json_decode('{\"mock\":true}');\n });\n $this->get('/dependencies/requiredDep');\n $this->assertResponseOk();\n $this->assertResponseContains('\"mock\":true', 'Contains the data from the stdClass mock container.');\n }",
"private function getNewUserMock() {\n $user_mock = $this->getMockForAbstractClass('\\Drupal\\Core\\Session\\AccountProxyInterface', ['id']);\n $user_mock->method('id')->willReturn(1);\n return $user_mock;\n }",
"public function getDetectorMock()\n {\n return $this->getMockBuilder('Eko\\GoogleTranslateBundle\\Translate\\Method\\Detector')\n ->disableOriginalConstructor()\n ->getMock();\n }",
"private function prepareContainer() {\n $container_class = 'Drupal\\Core\\DependencyInjection\\Container';\n $methods = get_class_methods($container_class);\n /** @var ContainerInterface $container */\n $this->containerMock = $container = $this->getMockBuilder($container_class)\n ->disableOriginalConstructor()\n ->setMethods($methods)\n ->getMock();\n \\Drupal::setContainer($container);\n\n $this->containerMock->method('get')->willReturnCallback([\n $this,\n 'containerMockGetServiceCallback'\n ]);\n }",
"protected function mockTargetPage() {\n\t\t$target = $this->createMock( TargetPage::class );\n\t\t$target->method( 'toDbArray' )\n\t\t\t->willReturn( [] );\n\t\t$target->method( 'getPageId' )\n\t\t\t->willReturn( 2 );\n\t\t$target->method( 'getEventId' )\n\t\t\t->willReturn( 3 );\n\n\t\treturn $target;\n\t}",
"public function test_dispatch_js()\n {\n\n $debugbar = m::spy('Recca0120\\LaravelTracy\\Debugbar');\n $storeWrapper = m::spy('Recca0120\\LaravelTracy\\Session\\StoreWrapper');\n $responseFactory = m::spy('Illuminate\\Contracts\\Routing\\ResponseFactory');\n $request = m::spy('Illuminate\\Http\\Request');\n $response = m::spy('Symfony\\Component\\HttpFoundation\\Response');\n $next = function () use ($response) {\n return $response;\n };\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $request\n ->shouldReceive('has')->with('_tracy_bar')->andReturn(true)\n ->shouldReceive('get')->with('_tracy_bar')->andReturn('js');\n\n $debugbar\n ->shouldreceive('dispatchAssets')->andReturn('foo.content');\n\n $responseFactory\n ->shouldReceive('make')->andReturn('foo.response');\n\n $dispatch = new Dispatch($debugbar, $storeWrapper, $responseFactory);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $this->assertSame('foo.response', $dispatch->handle($request, $next));\n\n $request->shouldHaveReceived('has')->with('_tracy_bar')->once();\n $request->shouldHaveReceived('get')->with('_tracy_bar')->once();\n // $storeWrapper->shouldHaveReceived('start')->once();\n // $storeWrapper->shouldHaveReceived('restore')->once();\n $debugbar->shouldHaveReceived('dispatchAssets')->once();\n $responseFactory->shouldHaveReceived('make')->with('foo.content', 200, [\n 'content-type' => 'text/javascript; charset=utf-8',\n 'cache-control' => 'max-age=86400',\n 'content-length' => strlen('foo.content'),\n ]);\n }",
"protected function setUp()\n\t{\n\t\t$this->object = new Response;\n\t}",
"public static function mock($class, $method, $result)\n\t{\n\t\t$mocks = Config::get('aopmock.mockable_methods');\n\t\tif (isset($mocks[$class])) {\n\t\t\t$mocks[$class][$method] = $result;\n\t\t\tConfig::set('aopmock.mockable_methods', $mocks);\n\t\t\treturn;\n\t\t}\n\t\t$mocks[$class] = array(\n\t\t\t$method => $result\n\t\t);\n\t\tConfig::set('aopmock.mockable_methods', $mocks);\n\t}",
"protected function setUp()\n {\n $this->object = new HttpParams();\n\n }",
"public function testGetUrlParams()\n {\n //Mock request\n $request = Mockery::mock('Request');\n $request->shouldReceive(\"get\")->andReturn([\n 'test1' => '11111',\n 'test2' => '22222',\n '_url' => 'http://www.test.com/',\n ]);\n\n //register\n $this->di->set('request', $request, true);\n\n //create class\n $class = new ControllerBase();\n\n $result = $this->callMethod(\n $class,\n 'getUrlParams',\n []\n );\n\n //check result\n $this->assertInternalType('array', $result);\n $this->assertEquals($result['test1'], '11111');\n $this->assertEquals($result['test2'], '22222');\n }",
"private function mockEmployee()\n {\n $this->employeeS = $this->getMockBuilder('Employee')\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->employeeS\n ->method('can')\n ->willReturn(true);\n }",
"protected function getTransportMock()\n {\n $guzzle = \\Mockery::mock('\\GuzzleHttp\\ClientInterface');\n $handler = \\Mockery::mock('\\WalmartApiClient\\Exception\\Handler\\ExceptionHandlerInterface');\n $apiUrl = 'http://api.walmartlabs.com/v1/';\n $apiKey = 'walmartapikey';\n return \\Mockery::mock('\\WalmartApiClient\\Http\\TransportService', [$guzzle, $handler, $apiUrl, $apiKey]);\n }",
"public function getDecoratedAppMock()\n {\n $decoratedApp = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\HttpKernelInterface')->getMock();\n $decoratedApp->expects($this->once())->method('handle')->will($this->returnValue(new Response()));\n\n return $decoratedApp;\n }",
"public function testWhatHappensWhenRequestBreaks() \n {\n $mock = Mockery::mock('ZafBoxRequest');\n\n $test_result = new stdClass;\n $test_result->status_code = 404;\n $test_result->body = '404 error';\n $mock->shouldReceive('get')->andReturn($test_result);\n\n // set the requests object to be our stub\n IoC::instance('requests', $mock);\n\n $tester = IoC::resolve('tester');\n $result = $tester->test('element', 'http://google.com', array(\n 'tag' => 'h1',\n ));\n $this->assertFalse($result);\n }",
"public function mocked_returns_set_value_test()\n {\n $mocked = new Mocked('user', VarStore::singleton());\n // what would be set in a class when using Mocked::class\n $mocked->name->class = 'test';\n\n $this->assertContains('=> [\"test\"]', (string)$mocked->name->class);\n $this->assertSame('user->name->class => [\"test\"]', (string)$mocked->name->class);\n $this->assertNotSame('user->name->class => [\"test\"]', (string)$mocked->name->class->data);\n }",
"private function runInvoke(array $settings)\n {\n if (false === isset($settings['method']) || false === isset($settings['setHeaders'])\n || false === isset($settings['configuration'])\n ) {\n throw new \\Exception('Missing settings');\n }\n\n $sut = new MiddlewareCors($settings['configuration']);\n // sanity check\n $this->assertInstanceOf('Bairwell\\MiddlewareCors', $sut);\n $sutSettings = array_merge($this->defaults, $settings['configuration']);\n $this->arraysAreSimilar($sutSettings, $sut->getSettings(), 'Matching internal settings');\n // setup the logger\n $this->logger = new Logger('test');\n $this->testLogger = new TestHandler();\n $this->logger->pushHandler($this->testLogger);\n $sut->setLogger($this->logger);\n // set up the request\n $request = $this->getMockForAbstractClass('\\Psr\\Http\\Message\\ServerRequestInterface');\n $request->expects($this->any())\n ->method('getMethod')\n ->willReturn($settings['method']);\n $request->expects($this->any())\n ->method('getHeaderLine')\n ->willReturnCallback(\n function ($headerName) use ($settings) {\n if (true === isset($settings['setHeaders'][$headerName])) {\n return $settings['setHeaders'][$headerName];\n } else {\n return '';\n }\n }\n );\n // now setup the response stack.\n $responseCalls = [];\n $response = $this->getMockForAbstractClass('\\Psr\\Http\\Message\\ResponseInterface');\n $response->expects($this->any())\n ->method('withAddedHeader')\n ->will(\n $this->returnCallback(\n function ($k, $v) use (&$responseCalls, $response) {\n $responseCalls['withAddedHeader:'.$k] = $v;\n\n return $response;\n }\n )\n );\n $response->expects($this->any())\n ->method('withHeader')\n ->will(\n $this->returnCallback(\n function ($k, $v) use (&$responseCalls, $response) {\n $responseCalls['withHeader:'.$k] = $v;\n\n return $response;\n }\n )\n );\n $response->expects($this->any())\n ->method('withoutHeader')\n ->will(\n $this->returnCallback(\n function ($k) use (&$responseCalls, $response) {\n $responseCalls['withoutHeader:'.$k] = true;\n\n return $response;\n }\n )\n );\n $response->expects($this->any())\n ->method('withStatus')\n ->will(\n $this->returnCallback(\n function ($k, $v) use (&$responseCalls, $response) {\n $responseCalls['withStatus'] = $k.':'.$v;\n\n return $response;\n }\n )\n );\n $next = function ($req, $res) use (&$responseCalls, $response) {\n $responseCalls['calledNext'] = 'called';\n\n return $response;\n };\n $returnedResponse = $sut->__invoke($request, $response, $next);\n\n return $responseCalls;\n }",
"public static function mock($_regex,array $_params=NULL) {\n\t\t// Override PHP globals\n\t\tlist($_method,$_uri)=self::checkRoute($_regex);\n\t\t$_query=explode('&',parse_url($_uri,PHP_URL_QUERY));\n\t\tforeach ($_query as $_pair)\n\t\t\tif (strpos($_pair,'=')) {\n\t\t\t\tlist($_var,$_val)=explode('=',$_pair);\n\t\t\t\tself::set($_method.'.'.$_var,$_val);\n\t\t\t\tself::set('REQUEST.'.$_var,$_val);\n\t\t\t}\n\t\tif (is_array($_params))\n\t\t\tforeach ($_params as $_var=>$_val) {\n\t\t\t\tself::set($_method.'.'.$_var,$_val);\n\t\t\t\tself::set('REQUEST.'.$_var,$_val);\n\t\t\t}\n\t\tself::set('SERVER.REQUEST_METHOD',$_method);\n\t\tself::set('SERVER.REQUEST_URI',$_uri);\n\t}",
"public function test_dispatch_assets()\n {\n\n $debugbar = m::spy('Recca0120\\LaravelTracy\\Debugbar');\n $storeWrapper = m::spy('Recca0120\\LaravelTracy\\Session\\StoreWrapper');\n $responseFactory = m::spy('Illuminate\\Contracts\\Routing\\ResponseFactory');\n $request = m::spy('Illuminate\\Http\\Request');\n $response = m::spy('Symfony\\Component\\HttpFoundation\\Response');\n $next = function () use ($response) {\n return $response;\n };\n\n /*\n |------------------------------------------------------------\n | Act\n |------------------------------------------------------------\n */\n\n $request\n ->shouldReceive('has')->with('_tracy_bar')->andReturn(true)\n ->shouldReceive('get')->with('_tracy_bar')->andReturn('assets');\n\n $debugbar\n ->shouldreceive('dispatchAssets')->andReturn('foo.content');\n\n $responseFactory\n ->shouldReceive('make')->andReturn('foo.response');\n\n $dispatch = new Dispatch($debugbar, $storeWrapper, $responseFactory);\n\n /*\n |------------------------------------------------------------\n | Assert\n |------------------------------------------------------------\n */\n\n $this->assertSame('foo.response', $dispatch->handle($request, $next));\n\n $request->shouldHaveReceived('has')->with('_tracy_bar')->once();\n $request->shouldHaveReceived('get')->with('_tracy_bar')->once();\n // $storeWrapper->shouldHaveReceived('start')->once();\n // $storeWrapper->shouldHaveReceived('restore')->once();\n $debugbar->shouldHaveReceived('dispatchAssets')->once();\n $responseFactory->shouldHaveReceived('make')->with('foo.content', 200, [\n 'content-type' => 'text/javascript; charset=utf-8',\n 'cache-control' => 'max-age=86400',\n 'content-length' => strlen('foo.content'),\n ]);\n }",
"public function setUp(): void\n {\n $body = $this->getMockBuilder(Stream::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $body->method('__toString')->willReturn('test body');\n $body->method('isSeekable')->willReturn(false);\n\n $uri = $this->getMockBuilder(UriInterface::class)->getMock();\n $uri->method('getHost')->willReturn('localhost');\n $uri->method('getPort')->willReturn(80);\n $uri->method('getPath')->willReturn('/');\n $uri->method('getScheme')->willReturn('http');\n $uri->method('__toString')->willReturn('localhost');\n\n $this->request = $this->getMockBuilder(RequestInterface::class)->getMock();\n $this->request->method('getUri')->willReturn($uri);\n $this->request->method('getHeaders')->willReturn($this->headers);\n $this->request->method('getProtocolVersion')->willReturn('1.1');\n $this->request->method('getMethod')->willReturn('GET');\n $this->request->method('getBody')->willReturn($body);\n }",
"public function testInit()\n {\n $request = new Request();\n $obj = $request->init();\n $this->assertEquals($request, $obj);\n }",
"public function setUp()\n {\n parent::setUp();\n\n $this->requestMock = Mockery::mock(Request::class);\n $this->twoFactorAuthRepository = Mockery::mock(TwoFactorAuthRepository::class);\n $this->twoFactorBackupRepository = Mockery::mock(TwoFactorBackupRepository::class);\n $this->googleTwoFactor = Mockery::mock(Google2FA::class);\n\n $this->googleTwoFactor->shouldReceive('setAllowInsecureCallToGoogleApis')\n ->with(true);\n\n $this->twoFactorAuthService = new TwoFactorAuthService(\n $this->twoFactorAuthRepository,\n $this->googleTwoFactor,\n $this->twoFactorBackupRepository\n );\n }",
"function setMockSession() {\n if (!class_exists('\\RightNow\\Libraries\\MockSession')) {\n Mock::generate('\\RightNow\\Libraries\\Session');\n }\n $session = new \\RightNow\\Libraries\\MockSession;\n $this->realSession = $this->CI->session;\n $this->CI->session = $session;\n $session->setSessionData(array('sessionID' => 'garbage'));\n }",
"private function createVehicleVariantsFetcherInterfaceMock()\n {\n return $this->getMockBuilder(VehicleVariantsFetcherInterface::class)->getMock();\n }",
"function makeMockHttpClient(\n \\GuzzleHttp\\Psr7\\Response ...$responses\n): GuzzleHttp\\Client {\n $mock = new GuzzleHttp\\Handler\\MockHandler($responses);\n $handlerStack = GuzzleHttp\\HandlerStack::create($mock);\n return new GuzzleHttp\\Client(['handler' => $handlerStack]);\n}",
"protected function mockUser() {\n\t\t$user = $this->createMock( User::class );\n\t\t$user->method( 'getID' )\n\t\t\t->willReturn( 1 );\n\n\t\treturn $user;\n\t}",
"protected function createMock($originalClassName)\n {\n if (is_callable('parent::createMock')) {\n return parent::createMock($originalClassName);\n }\n\n return $this->getMock($originalClassName);\n }",
"protected function perform_mock_request( $method, $route, $body = array(), $query = array(), $headers = array() ) {\n\n\t\t$request = new WP_REST_Request( $method, $route );\n\t\tif ( $body ) {\n\t\t\t$request->set_body_params( $body );\n\t\t}\n\t\tif ( $query ) {\n\t\t\t$request->set_query_params( $query );\n\t\t}\n\t\tif ( $headers ) {\n\t\t\t$request->set_headers( $headers );\n\t\t}\n\t\treturn $this->server->dispatch( $request );\n\n\t}",
"public function setUp()\n {\n // Create a mock handler\n $this->mock = new MockHandler();\n $handler = HandlerStack::create($this->mock);\n\n // Add history middleware to the client for inspecting requests\n $this->history = [];\n $handler->push(Middleware::history($this->history));\n\n // Create a Guzzle client whose requests can be inspected and responses\n // are mocked\n $this->guzzle = new Client(['handler' => $handler]);\n\n // Create faker instance for faking data\n $this->faker = \\Faker\\Factory::create();\n\n // Create an event loop\n $this->loop = Factory::create();\n\n // Create the API client\n $this->client = new ApiClient($this->loop, $this->guzzle);\n\n // Initialize exception queue\n $this->exceptionQueue = new \\SplQueue();\n }"
] | [
"0.649648",
"0.6462462",
"0.6446028",
"0.63226396",
"0.6316294",
"0.6187786",
"0.61703694",
"0.6125306",
"0.6095034",
"0.60701096",
"0.6046694",
"0.6015498",
"0.5999807",
"0.5988255",
"0.5941094",
"0.5897924",
"0.5884926",
"0.5876863",
"0.57910377",
"0.57659394",
"0.5741918",
"0.573117",
"0.5721576",
"0.56885195",
"0.5682434",
"0.56711644",
"0.5662703",
"0.5662436",
"0.5657989",
"0.55910134",
"0.55751795",
"0.5541768",
"0.5529944",
"0.55295086",
"0.5514692",
"0.5501496",
"0.5501496",
"0.54939276",
"0.548928",
"0.5480402",
"0.54777586",
"0.5477629",
"0.5465168",
"0.5463168",
"0.5461821",
"0.54596245",
"0.54588",
"0.54575026",
"0.54557925",
"0.54412615",
"0.54394007",
"0.54356533",
"0.54248923",
"0.5417931",
"0.53904265",
"0.53890395",
"0.53829867",
"0.53687066",
"0.53602165",
"0.53575176",
"0.53537637",
"0.5352119",
"0.53444576",
"0.53404284",
"0.5331738",
"0.5326189",
"0.53166753",
"0.53117555",
"0.5305405",
"0.52936095",
"0.52914274",
"0.5289218",
"0.52863294",
"0.52838194",
"0.52807933",
"0.5270258",
"0.5263709",
"0.52549094",
"0.5252277",
"0.5243566",
"0.52400035",
"0.5238185",
"0.5233895",
"0.5233001",
"0.52320296",
"0.52264583",
"0.52198833",
"0.5218746",
"0.52183044",
"0.52081925",
"0.5202547",
"0.52023643",
"0.51972413",
"0.51921016",
"0.51899135",
"0.51870185",
"0.51817906",
"0.5179974",
"0.51795554",
"0.5179411"
] | 0.6734826 | 0 |
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed. | protected function setUp() {
$this->response = new Response();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }",
"public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}",
"protected function setUp()\n {\n $this->fixture = new Record();\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->load();\n }",
"protected function setUp()\n {\n\t global $sys_datacite_username, $sys_datacite_password, $sys_datacite_url ;\n\n\t $this->client = new DataCiteClient($sys_datacite_username, $sys_datacite_password);\n $this->client->setDataciteUrl($sys_datacite_url);\n }",
"protected function setUp()\n {\n $this->fixture = new Configuration();\n }",
"public function setUp() {\r\n // and doing it every test slows the tests down to a crawl\r\n $this->sharedFixture = new MovieLensDataSet(DATA_DIR);\r\n }",
"public function setUp()\n {\n parent::setUp();\n $this->prepareForTests();\n }",
"protected function setUp() {\n\n $this->client = new Client(['base_uri' => getenv('API_ADDR')]);\n $this->locIDs = $this->insertTestLocations();\n reuse_generateXML();\n }",
"protected function setUp(): void\n {\n $servername = '18.222.31.30';\n $username = 'phpclient';\n $password = 'leftoverkillerphp';\n $dbname = 'leftover_killer';\n self::$RecipeModel = new GetRecipeDetails($servername, $username, $password, $dbname);\n }",
"public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }",
"protected function setUp() {\n parent::setUp ();\n $this->storage = new Storage();\r\n $this->connectDB();\r\n $this->cleanDB();\r\n $this->createUser();\n $this->storage->connect($this->dbh);\n }",
"protected function setUp() {\r\n\t\tparent::setUp ();\r\n\t\t$this->storage = new Storage ( );\r\n\t\t$this->connectDB();\r\n\t\t$this->cleanDB ();\r\n\t\t$this->createUser ();\r\n\t\t$this->storage->connect ( $this->dbh );\n\t}",
"public function setUp() {\n $this->fixture= new FreeTdsLookup($this->getClass()->getPackage()->getResourceAsStream('freetds.conf'));\n }",
"public static function setUpBeforeClass(): void\r\n {\r\n self::$MemoryTestAsset = new MemoryTestAsset();\r\n\r\n self::$clients = self::$MemoryTestAsset->getClients();\r\n self::$ClientsStorage = self::$MemoryTestAsset->getClientsStorage();\r\n }",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"protected function setUp()\n {\n parent::setUp();\n $config = new LocalConfiguration();\n $this->local = new Local($config);\n }",
"function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t\n\t\t// Set up fixture\n\t\tif($fixtureFile) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(),0,5) != 'tmpdb') {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\t// This code is a bit misplaced; we want some way of the whole session being reinitialised...\n\t\t\tVersioned::reading_stage(null);\n\n\t\t\tsingleton('DataObject')->flushCache();\n\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// We have to disable validation while we import the fixtures, as the order in\n\t\t\t// which they are imported doesnt guarantee valid relations until after the\n\t\t\t// import is complete.\n\t\t\t$validationenabled = DataObject::get_validation_enabled();\n\t\t\tDataObject::set_validation_enabled(false);\n\t\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t\t$this->fixture->saveIntoDatabase();\n\t\t\tDataObject::set_validation_enabled($validationenabled);\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t}",
"protected function setUp() {\n\t\tparent::setUp();\n\n\t\t$this->object = new ControllerFixture([\n\t\t\t'module' => 'module',\n\t\t\t'controller' => 'controller',\n\t\t\t'action' => 'action',\n\t\t\t'args' => [100, 25]\n\t\t]);\n\n\t\t// Used by throwError()\n\t\tTiton::router()->initialize();\n\t}",
"protected function setUp(): void\n {\n \tparent::setUp();\n\n \t$this->authorize();\n\n \t$this->loadFixtures([\n \t\t'product'=>ProductFixture::class\n \t]);\n }",
"protected function setUp()\n {\n $this->fixture = new NamespaceDescriptor();\n }",
"protected function setUp(): void\n {\n $this->fixture = new TestSubjectDescriptor();\n }",
"public function setUp()\n {\n $this->fixture = new Finder();\n }",
"function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}",
"public function setUp(): void\n {\n $this->fixture = new Finder();\n }",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}"
] | [
"0.75935996",
"0.71713233",
"0.69275117",
"0.6909655",
"0.6891774",
"0.68835247",
"0.6815039",
"0.68027806",
"0.6753642",
"0.6753079",
"0.67463374",
"0.6733237",
"0.6714164",
"0.6707088",
"0.6702115",
"0.6683724",
"0.6683724",
"0.6683724",
"0.6683724",
"0.6683724",
"0.6678992",
"0.6678068",
"0.66731095",
"0.66698766",
"0.6647561",
"0.66456485",
"0.66454023",
"0.66376066",
"0.66177845",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.66176254",
"0.6617294",
"0.6617294",
"0.66170704",
"0.66170704",
"0.66170704",
"0.66170704",
"0.66170704",
"0.66170704",
"0.66170704",
"0.66170704",
"0.66170704",
"0.66170704",
"0.66170704",
"0.66170704"
] | 0.0 | -1 |
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed. | protected function tearDown() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }",
"public function teardown()\n {\n //\n }",
"protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}",
"public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }",
"public function teardown()\n {\n }",
"public function _after(TestCase $test)\n {\n $this->unloadFixtures();\n }",
"public function tearDown()\n {\n unset($this->app);\n unset($this->client);\n\n m::close();\n }",
"protected function tearDown(): void\n {\n self::$driver->close();\n }",
"public function tearDown()\n\t{\n\t\tm::close();\n\t}",
"protected function tearDown()\n {\n if ($this->databaseTester !== null) {\n if (method_exists($this, 'getTearDownOperation')) {\n $this->getDatabaseTester()->setTearDownOperation($this->getTearDownOperation());\n }\n if (method_exists($this, 'getDataSet')) {\n $this->getDatabaseTester()->setDataSet($this->getDataSet());\n }\n $this->getDatabaseTester()->onTearDown();\n }\n\n $this->databaseTester = null;\n\n set_time_limit(0);\n }",
"function teardown() {\n // close database connection\n $this->conn = null;\n }",
"public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}",
"protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }",
"protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}",
"protected function tearDown(): void\n {\n $this->closeDatabase();\n }",
"protected function tearDown() {\n\t\tm::close();\n\t}",
"public function tearDown()\n\t{\n\t\t$this->beforeApplicationDestroyed(function () {\n\t\t\tDB::disconnect();\n\t\t});\n\t\n\t\t\tparent::tearDown();\n\t\t\t// \t\tMockery::close();\n\t}",
"public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }",
"protected function tearDown() {\n\t\tparent::tearDown();\n\n\t\t$this->cleanupTestDirectory();\n\t}",
"protected function tearDown()\n {\n $this->testData = null;\n parent::tearDown();\n }",
"protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }",
"protected function tearDown(): void\n {\n $client = $this->getProvidedData()[0] ?? null;\n if ($client instanceof Client) {\n $this->logout($client);\n }\n }",
"public function teardown()\n {\n parent::teardown();\n }",
"protected function doTearDown(): void\n {\n }",
"protected function tearDown()\n\t{\n\t\tunset($GLOBALS['__DB__']);\n\n\t\tparent::tearDown();\n\t}",
"public function teardown() {\n m::close();\n }",
"public function tearDownFixtures()\n {\n if (is_array($this->_fixtures)) {\n /** @var ActiveRecordFixture $object */\n foreach ($this->_fixtures as $object) {\n $object->cleanup();\n }\n }\n }",
"protected function tearDown()\n {\n // Make sure any test entities created are deleted\n foreach ($this->testEntities as $entity)\n {\n // Second param is a 'hard' delete which actually purges the data\n $this->entityLoader->delete($entity, true);\n }\n }",
"public function teardown()\n {\n m::close();\n }",
"public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}",
"protected function tearDown ()\n {\n $this->downTest();\n\n parent::tearDown();\n }",
"public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeTestFileDir);\n\n unset($this->builder);\n unset($this->builder);\n unset($this->fs);\n m::close();\n }",
"protected function tearDown(): void\n {\n $this->tearDownTheTestEnvironment();\n }",
"protected function tearDown() {\r\n\t\tunset ( $this->configReader );\r\n\t}",
"protected function tearDown() {\n\t\t$this->sql->Disconnect(__FILE__, __LINE__);\n\t\tsqlsolution_unlink_sqlite($this->sql);\n\t\t$this->sql = null;\n\t}",
"protected function tearDown()\n {\n parent::tearDown();\n\n $this->em->close();\n $this->em = null; // avoid memory leaks\n }",
"protected function tearDown()\n {\n $this->testDBConnector->clearDataFromTables();\n }",
"public function tearDown() {\n\n\t\tparent::tearDown();\n\t\tMockery::close();\n\t}",
"public function tearDown()\n {\n $this->stop();\n }",
"public function tearDown()\n {\n m::close();\n }",
"public function tearDown()\n {\n m::close();\n }",
"public function tearDown()\n {\n m::close();\n }",
"protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }",
"public function tearDown()\n {\n unset($this->helper);\n }",
"public function tearDown()\n\t{\n\t\tunset($this->stub);\n\t}",
"protected function tearDown()\n\t {\n\t\tunset($this->object);\n\n\t\t$conn = $this->getConnection();\n\t\t$db = $conn->getConnection();\n\t\t$db->exec(\"DROP TABLE IF EXISTS `MySQLdatabase`;\");\n\n\t\tunset($GLOBALS[\"errstr\"]);\n\t\tunset($GLOBALS[\"stuckerror\"]);\n\t }",
"protected function tearDown()\n {\n $this->local = null;\n parent::tearDown();\n }",
"protected function tear_down()\n {\n }",
"protected function tear_down()\n {\n }",
"protected function tear_down()\n {\n }",
"protected function tear_down()\n {\n }",
"protected function tear_down()\n {\n }",
"protected function tearDown() {\n $this->dbh = null;\n $this->storage = null;\n parent::tearDown ();\n }",
"protected function tearDown()\n {\n $this->kernel->shutdown();\n $this->kernel = null;\n parent::tearDown();\n }",
"public function tear_down()\n {\n }",
"public function tear_down()\n {\n }",
"public function tear_down()\n {\n }",
"public function tearDown()\n\t{\n\t\t\\Orchestra\\Core::shutdown();\n\n\t\tunset($this->user);\n\t\tunset($this->stub);\n\n\t\tparent::tearDown();\n\t}",
"public function tearDown()\n {\n unset($this->VenusFuelDepot);\n }",
"protected function tearDown()\n\t{\n\t\tunset($this->_instance);\n\t\tparent::tearDown();\n\t}",
"public function tearDown()\n {\n parent::tearDown();\n\n if ((bool) getenv('CLEANUP_TEST_DOCKER_SECRETS')) {\n DockerSecretFile::cleanup();\n }\n }",
"protected function tearDown()\n\t{\n\t\t$this->restoreFactoryState();\n\t}",
"public function tearDown()\n {\n unset($this->app);\n unset($_SERVER['RouteManagerTest@callback']);\n m::close();\n }",
"protected function tearDown()\n {\n $this->dataCollector = null;\n parent::tearDown();\n }",
"public function tearDown(){\n\t\t$this->container->get('doctrine')->getConnection()->close();\n\t\n\t\tparent::tearDown();\n\t}",
"protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }",
"protected function tearDown()\n {\n unset($this->app);\n\n m::close();\n }",
"protected function tearDown(): void\n {\n $this->_connection->dropTable($this->_tableName);\n $this->_connection->resetDdlCache($this->_tableName);\n $this->_connection = null;\n }",
"public function tearDown()\n {\n if (null !== $this->ldap) {\n $this->ldap->unbind();\n }\n }",
"public function tearDown()\n {\n $this->deleteAdminUserFixture();\n }",
"public function tearDown()\n {\n $this->flushModelEventListeners();\n parent::tearDown();\n unset($this->app);\n\n /*\n * Restore environment\n */\n if (file_exists(base_path($this->envTestingFile())) && file_exists(base_path('.env.backup'))) {\n $this->restoreEnvironment();\n }\n }",
"public function tearDown()\n {\n unset($this->commonDataClassRepository);\n }",
"protected function tearDown()\n\t{\n\t\tparent::tearDown();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t\tFragseizeObj::release( $this->uid );\n\t}",
"protected function tearDown()\n {\n $this->client = null;\n }",
"public function tearDown() \n {\n $this->flushSession();\n \n $this->inactiveUser->delete();\n $this->basicUser->delete();\n $this->contactManager->delete();\n $this->projectManager->delete();\n $this->administrator->delete();\n\n parent::tearDown();\n Mockery::close();\n }",
"public function tearDown() {\n // tests using these functions.\n \\mod_forum\\subscriptions::reset_forum_cache();\n\n $this->messagesink->clear();\n $this->messagesink->close();\n unset($this->messagesink);\n\n $this->mailsink->clear();\n $this->mailsink->close();\n unset($this->mailsink);\n }",
"public function tearDown()\n\t{\n\t\tparent::tearDown();\n\t\t$this->databaseTester = NULL;\n\t}",
"public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }",
"public function tearDown()\n {\n $this->client = null;\n }",
"protected function tearDown()\n {\n $this->helper = null;\n parent::tearDown();\n }",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown()\n\t{\n\t\t$this->instance = null;\n\t}",
"public static function tearDownAfterClass(): void\n {\n if (file_exists(static::$ou)) {\n unlink(static::$ou);\n }\n }",
"protected function tearDown()\r\n {\r\n $application = new Application(self::$kernel);\r\n $application->setAutoExit(false);\r\n\r\n $options = array('command' => 'doctrine:database:drop', '--force' => true);\r\n $application->run(new ArrayInput($options));\r\n\r\n parent::tearDown();\r\n\r\n $this->em->close();\r\n $this->em = null;\r\n }",
"protected function tearDown()\n {\n parent::tearDown();\n if (!is_null($this->em)) {\n $this->em->getConnection()->close();\n }\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown()\n {\n $this->deleteTemporaryFiles();\n }",
"public function tearDown()\n {\n Resistance::reset();\n }",
"protected function tearDown()\n {\n $this->clock = NULL;\n }",
"public function tearDown()\n\t{\n\t\tMockery::close();\n\t}",
"protected function tearDown()\n\t{\n\t\tparent::tearDown ();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t}"
] | [
"0.7306208",
"0.72364795",
"0.722002",
"0.71867394",
"0.71861356",
"0.71476674",
"0.7140671",
"0.7134978",
"0.7120237",
"0.710423",
"0.7080303",
"0.70796925",
"0.70759535",
"0.7052445",
"0.7048992",
"0.70331645",
"0.70227814",
"0.7014337",
"0.7000383",
"0.6999935",
"0.69994307",
"0.6992254",
"0.6990219",
"0.69804406",
"0.6957973",
"0.6956992",
"0.69537884",
"0.69451267",
"0.6938876",
"0.6933866",
"0.6928068",
"0.6925707",
"0.69220245",
"0.69183815",
"0.6910415",
"0.69097877",
"0.6906503",
"0.68995863",
"0.68925947",
"0.6890087",
"0.6890087",
"0.6890087",
"0.68881536",
"0.6888143",
"0.68828315",
"0.68631077",
"0.68611383",
"0.6857846",
"0.6857846",
"0.6857846",
"0.6857846",
"0.6857846",
"0.68540823",
"0.68519497",
"0.68516403",
"0.68516403",
"0.68516403",
"0.6850874",
"0.68434286",
"0.68388563",
"0.68378174",
"0.68328935",
"0.68296057",
"0.6829553",
"0.6811072",
"0.68110013",
"0.6808143",
"0.680753",
"0.6806766",
"0.68012327",
"0.6799777",
"0.67919636",
"0.67912745",
"0.67886096",
"0.6778745",
"0.6774225",
"0.6769777",
"0.6767876",
"0.6767613",
"0.6766739",
"0.67605966",
"0.67605966",
"0.67605966",
"0.67605966",
"0.67605966",
"0.67605966",
"0.6759285",
"0.67590594",
"0.6757625",
"0.6755355",
"0.6753692",
"0.6753692",
"0.6753692",
"0.6753692",
"0.6753692",
"0.6753692",
"0.6753124",
"0.6750597",
"0.67489463",
"0.67484695",
"0.67479205"
] | 0.0 | -1 |
Get all contacts of a list | public function get_contacts($list_id = self::SENDGRID_FXPROTOOLS_LIST_ID)
{
$sg = new \SendGrid( self::SENDGRID_API_KEY );
$query_params = json_decode('{"page": 1, "page_size": 1, }');
$response = $sg->client->contactdb()->lists()->_($list_id)->recipients()->get(null, $query_params);
return $response->body();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getContactsList() {\n return $this->_get(7);\n }",
"public function getContacts();",
"public function getContactsList() {\n return $this->_get(6);\n }",
"public function getContactList()\r\n {\r\n return $this->exec('contact_list');\r\n }",
"public abstract function get_list_contacts($list_id);",
"function get_all_contacts() {\n //get all the users\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n //return the array of contacts\n return $contacts;\n\n }",
"public function getContacts(){\n\t\n\t\t$db\t\t= $this->getDbo();\n\t\t\n\t\t$query\t= $db->getQuery( true );\n\t\t$query->select( '*' );\n\t\t$query->from( '#__zbrochure_providers_contacts as c' );\n\t\t$query->join( 'LEFT','#__zbrochure_providers as p on p.provider_id = c.provider_id' );\n\t\t\n\t\t$db->setQuery( $query );\n\t\t$contacts = $db->loadObjectList();\n\t\t\n\t\treturn $contacts;\n\t}",
"public function fetchContacts()\n {\n return $this->contacts;\n }",
"public function getAll()\r\n {\r\n // Query the database and return an array of contacts\r\n return $this->getEntityManager()\r\n ->createQuery(\r\n 'SELECT c FROM AppBundle:Contact c ORDER BY c.firstName, c.lastName ASC'\r\n )\r\n ->getResult();\r\n }",
"public function getContacts() {\n $sforce = $this->getDataSource();\n $SOQL = $sforce->getConfigSOQL();\n $resultSet = $this->queryBatch($SOQL);\n \n return $resultSet;\n }",
"public function getContacts(){\n\t\t$db = Dbconn::getDB();\n\t\t$sql = \"SELECT * FROM contacts\";\n\t\t$result = $db->query($sql);\n\n\t\t$contacts = array();\n\n\t\tforeach ($result as $row){\n\t\t\t$contact = new Contact(\n\t\t\t\t$row['contact_fname'],\n\t\t\t\t$row['contact_lname'],\n\t\t\t\t$row['contact_email'],\n\t\t\t\t$row['contact_phone'],\n\t\t\t\t$row['contact_msg']\n\t\t\t\t);\n\t\t\t$contacts[] = $contact;\n\t\t}\n\n\t\treturn $contacts;\n\t}",
"public function getContacts()\n\t{\n\t\treturn $this->contacts; \n\n\t}",
"public function getContacts() {\n return $this->contacts;\n }",
"public function getAll()\r\n {\r\n return $this->contactManager->fetchAll(true, null, null);\r\n }",
"public function getContacts()\r\n {\r\n return $this->_contacts;\r\n }",
"public function list()\n {\n $contact = ContactService::getList(Input::all());\n return response()->json(array(\n 'contacts' => $contact\n ),200);\n }",
"public function getContacts(){\n\t\t// ***\n\t\t// the following code should be ported\n\t\t// so multiple backends are allowed\n\t\t$userOnlineMapper = $this->app['UserOnlineMapper'];\n\t\t$usersOnline = $userOnlineMapper->getOnlineUsers();\n\t\t$syncOnline = $this->app['SyncOnlineCommand'];\n\t\t$syncOnline->execute();\n\t\t// ***\n\n\t\tif(count(self::$contacts) == 0){\n\t\t\t$cm = \\OC::$server->getContactsManager();\n\n\t\t\t$result = $cm->search('',array('FN'));\n\t\t\t$receivers = array();\n\t\t\t$contactList = array();\n\t\t\t$contactsObj = array();\n\t\t\tforeach ($result as $r) {\n\t\t\t\t$data = array();\n\n\t\t\t\t$contactList[] = $r['FN'];\n\n\t\t\t\t$data['id'] = $r['id'];\n\t\t\t\t$data['online'] = in_array($r['id'], $usersOnline);\n\t\t\t\t$data['displayname'] = $r['FN'];\n\n\t\t\t\tif(!isset($r['EMAIL'])){\n\t\t\t\t\t$r['EMAIL'] = array();\n\t\t\t\t}\n\n\t\t\t\tif(!isset($r['IMPP'])){\n\t\t\t\t\t$r['IMPP'] = array();\n\t\t\t\t}\n\t\t\t\t$data['backends'] = $this->contactBackendToBackend($r['EMAIL'], $r['IMPP']);\n\t\t\t\tlist($addressBookBackend, $addressBookId) = explode(':', $r['addressbook-key']);\n\t\t\t\t$data['address_book_id'] = $addressBookId;\n\t\t\t\t$data['address_book_backend'] = $addressBookBackend;\n\t\t\t\t$receivers[] = $data;\n\t\t\t\t$contactsObj[$r['id']] = $data;\n\t\t\t}\n\t\t\tself::$contacts = array('contacts' => $receivers, 'contactsList' => $contactList, 'contactsObj' => $contactsObj);\n\t\t}\n\t\treturn self::$contacts;\n\t}",
"public function getContacts()\n {\n // Perform query\n $this->connect();\n $result = $this->conn -> query(\"SELECT * FROM contatti ORDER BY nome\");\n if($result==false){\n echo \"getItems fallita\";\n $this->disconnect();\n return false;\n }\n $rows = array();\n while ($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n $this->disconnect();\n return $rows;\n }",
"public function list(?string $query = ''): Collection\n {\n $contacts = $this->request(\n method: 'get',\n path: 'contacts?'.$query,\n responseKey: 'contacts'\n );\n\n return collect($contacts)\n ->map(fn ($contact) => ContactFactory::make($contact));\n }",
"public function getMyContacts()\r\n {\r\n $contacts=$this->plugin->getMyContacts();\r\n //if ($contacts!==false) $this->statsRecordImport(count($contacts));\r\n return $contacts;\r\n }",
"public function get_contacts()\n {\n \t$query=$this->db->query(\"SELECT A.*,B.Client_Company_Name FROM ibt_client_contacts A INNER JOIN ibt_client B on A.Contact_Client_Icode = B.Client_Icode \"); \n return $query->result_array();\n }",
"public function all()\n {\n\n $this->authorize('all', Contact::class);\n\n $data = [];\n\n $contacts = Auth::user()->account->contacts();\n\n jqxFilters($contacts, function (Builder $q, $filter) {\n switch ($filter['field']) {\n case 'name':\n $filter['field'] = DB::raw(\"CONCAT(first_name, ' ' ,last_name)\");\n break;\n }\n\n return $filter;\n });\n\n $data['TotalRows'] = $contacts->count();\n\n $contacts->orderBy(request('sortdatafield', 'id'), request('sortorder', 'asc'))\n ->skip(request('recordstartindex', 0))\n ->take(request('recordendindex', 50));\n\n $data['Rows'] = $contacts->get(['*', DB::raw(\"CONCAT(first_name, ' ' ,last_name) as 'name'\")]);\n\n return response()->json($data);\n }",
"public function getContacts(): Collection\n {\n return $this->hasMany(UserContact::class, 'user_id', 'id')->get();\n }",
"function contacts_getList ($per_page = 25, $page = 1, $filter = NULL) {\n $response = $this->execute(array('method' => 'flickr.contacts.getList', 'per_page' => $per_page, 'page' => $page, 'filter' => $filter));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['contacts'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}",
"public function contactsAction()\n {\n $this->view->pageTitle = 'Member Contact List';\n\t$service = new App_Service_Member();\n $users = $service->getActiveUsers();\n\n $this->view->users = array();\n $lastRowLetter = null;\n\t\n\t// remove inactive memebers\n\t$users = array_filter($users, function($usr) { return $usr->isActive();} );\n\t\n foreach ($users as $userId => $user) {\n $firstName = $user->getFirstName();\n\n if ($lastRowLetter !== $firstName[0]) {\n $lastRowLetter = $rowLetter = $firstName[0];\n } else {\n $rowLetter = null;\n }\n\n $this->view->users[$userId] = array(\n 'user' => $user,\n 'rowLetter' => $rowLetter,\n );\n }\n }",
"public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}",
"function getcontacts() {\n \t\t\n \t\t$this->checkAccess('bulksms');\n \t\t\n \t\t$group_id = filter_var(trim($_POST['group_id']), FILTER_SANITIZE_STRING);\n \t\t$c['conditions']['BulkAddressbook.status'] = '0';\n\t\t$c['conditions']['BulkAddressbook.bulk_group_id'] = $group_id;\n\t\t$c['fields'] = array('BulkAddressbook.id', 'BulkAddressbook.mobile', 'CONCAT(BulkAddressbook.firstname, \\' \\', BulkAddressbook.lastname) as full_name');\n\t\t$data = $this->BulkAddressbook->find('all', $c);\n \t\tforeach($data as $v) {\n \t\t\t$return_data[$v['BulkAddressbook']['id']]['name'] = (empty($v['0']['full_name'])) ? 'no name' : $v['0']['full_name'];\n \t\t\t$return_data[$v['BulkAddressbook']['id']]['mobile'] = $v['BulkAddressbook']['mobile'];\n \t\t}\n \t\techo json_encode($return_data);\n \t\t\n \t\t$this->autoRender = false;\n \t}",
"function get_all_online_contacts() {\n //get the table and select everything.\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.status != 0')\n ->andWhere('user.status != 3')\n ->andWhere('user.timedout != 1');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n\n foreach ($contacts as $key => $contact) {\n //if the contacts username is not set then get it from Zikula\n if (!isset($contact['uname']) || empty($contact['uname'])) {\n $contacts[$key]['uname'] = UserUtil::getVar('uname', $contact['uid']);\n }\n }\n\n //return the array of contacts\n return $contacts;\n }",
"public function getContacts(){\n $contacts = [];\n if ($this->data instanceof IPPCustomer){\n $newContact = $this->parseData($this->data);\n $contacts[] = $newContact;\n }\n else {\n foreach ($this->data as $contact) {\n $newContact = $this->parseData($contact);\n $contacts[] = $newContact;\n }\n }\n\n return $contacts;\n }",
"public function getContacts()\n {\n if (! isset($this->contacts)) {\n $this->contacts = new AddressBook\\Model\\Collection\\ContactCollection();\n }\n return $this->contacts;\n }",
"function cmail_contacts_list($attrib)\n {\n global $CONTACTS, $OUTPUT;\n \n // count contacts for this user\n $result = $CONTACTS->list_records();\n \n // add id to message list table if not specified\n if (!strlen($attrib['id']))\n $attrib['id'] = 'rcmAddressList';\n \n // define list of cols to be displayed\n $a_show_cols = array('name');\n\n // create XHTML table\n $out = cmail_table_output($attrib, $result->records, $a_show_cols, $CONTACTS->primary_key);\n \n // set client env\n $OUTPUT->add_gui_object('contactslist', $attrib['id']);\n $OUTPUT->set_env('current_page', (int)$CONTACTS->list_page);\n $OUTPUT->set_env('pagecount', ceil($result->count/$CONTACTS->page_size));\n $OUTPUT->include_script('list.js');\n \n // add some labels to client\n $OUTPUT->add_label('deletecontactconfirm');\n \n return $out;\n }",
"public function exportContacts() {\n\t\n\t\t$mlistqry=$this->getContactName();\n\t\t$rs=$mlistqry->getQuery()->getResult();\n\t\t\n\t\t$listArray[]=array(\"FirstName\",\"LastName\",\"Email\");\n\t\tforeach($rs as $result)\n\t\t{\n\t\t\t//$title=$result['title'];\n\t\t\t$fname=$result['firstName'];\n\t\t\t$lname=$result['lastName'];\n\t\t\t$email=$result['email'];\n\t\t\t$listArray[]=array($fname,$lname,$email);\n\t\t}\n\t\t\n\t\treturn $listArray;\n}",
"public function getMyContacts()\n\t\t{\n\t\tif (!$this->login_ok)\n\t\t\t{\n\t\t\t$this->debugRequest();\n\t\t\t$this->stopPlugin();\n\t\t\treturn false;\n\t\t\t}\n\t\telse $url=$this->login_ok;\n\t\t$res=$this->get($url,true);\n\t\tif ($this->checkResponse(\"get_friends\",$res))\n\t\t\t$this->updateDebugBuffer('get_friends',\"{$url}\",'GET');\n\t\telse\n\t\t\t{\n\t\t\t$this->updateDebugBuffer('get_friends',\"{$url}\",'GET',false);\n\t\t\t$this->debugRequest();\n\t\t\t$this->stopPlugin();\n\t\t\treturn false;\n\t\t\t}\n\n\t\t$res=str_replace(PHP_EOL,\"\",$res);\n\t\tpreg_match_all(\"#mailto\\:(.+)\\\"#U\",$res,$emails);\n\t\tpreg_match_all(\"#252Fcontacts\\\"\\>(.+)\\<\\/#U\",$res,$names);\t\t\n\t\t$contacts=array();\n\t\tif (!empty($emails[1])) foreach($emails[1] as $key=>$email) if (!empty($names[1][$key])) $contacts[$email]=$names[1][$key];\t\t\t\t\n\t\tforeach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);\n\t\treturn $contacts;\n\t\t}",
"public function get_contacts($domain) {\n \n }",
"public function getLists()\n {\n return $this->makeRequest('contacts/list/segments');\n }",
"function getUserContacts()\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\n\t\t$parameters = array();\n\t\t$parameters['format']\t= 'json';\n\t\t$parameters['count'] = 'max';\n\t\t\n\t\t$response = $this->api->get('user/' . $userId . '/contacts', $parameters);\n\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\t\t\tthrow new Exception( 'User contacts request failed! ' . $this->providerId . ' returned an error: ' . $this->errorMessageByStatus( $this->api->http_code ) );\n\t\t}\n\n\t\tif ( !$response->contacts->contact && ( $response->errcode != 0 ) )\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$contacts = array();\n\n\t\tforeach( $response->contacts->contact as $item ) {\n\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t$uc->identifier = $this->selectGUID( $item );\n\t\t\t$uc->email = $this->selectEmail( $item->fields );\n\t\t\t$uc->displayName = $this->selectName( $item->fields );\n\t\t\t$uc->photoURL = $this->selectPhoto( $item->fields );\n\n\t\t\t$contacts[] = $uc;\n\t\t}\n\t\t\n\t\treturn $contacts;\n\t}",
"public function get_contacts($contacts)\n {\n $query = $this->db->from('users');\n $query = $this->db->where_in('mobile', $contacts);\n $query = $this->db->get();\n \n return $query->result_array();\n }",
"public function contacts($parameters = array())\n {\n $url = self::contacts_uri(self::id());\n $response = new Response(ContactList::get($url, $parameters));\n foreach ($response->items as &$value) {\n $value = new Contact(new Response($value));\n }\n return $response;\n }",
"function getAllContacts() {\n global $db;\n $returnValue = array();\n $result = $db->query(\"SELECT * FROM contacts\");\n if (false !== $result) {\n $returnValue = $result->fetchAll();\n }\n return $returnValue;\n}",
"public function getContacts(): stdClass {\n\n\t\treturn $this->greenApi->request( 'GET',\n\t\t\t'{{host}}/waInstance{{idInstance}}/GetContacts/{{apiTokenInstance}}' );\n\t}",
"public function getContacts( $params = array() ) {\n\t\treturn $this->call( 'contacts?' . $this->setParams( $params ) );\n\t}",
"public function contacts()\n {\n return $this->morphedByMany('App\\Contact', 'taggable');\n }",
"public function index(Request $request)\n {\n return $request->user()->contacts;\n }",
"function getUserContacts()\n\t{\n\t\t$parameters = array( 'page' => 1 );\n\t\t$response = $this->api->get( 'user/list_friends.json', $parameters );\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User contacts request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ) );\n\t\t}\n\n\t\tif( ! $response || ! count( $response->friends ) ){\n\t\t\treturn ARRAY();\n\t\t}\n\n\t\t$max_page = (property_exists($response,'max_page'))?$response->max_page:1;\n\t\tfor ($i = 0; $i<$max_page; $i++) {\n\t\t\tif( $i > 0 ) {\n\t\t\t\t$parameters = array( 'page' => $i );\n\t\t\t\t$response = $this->api->get( 'user/list_friends.json', $parameters );\n\t\t\t\t// check the last HTTP status code returned\n\t\t\t\tif ( $this->api->http_code != 200 ){\n\t\t\t\t\tthrow new Exception( \"User contacts request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $response && count( $response->friends ) ){\n\t\t\t\tforeach( $response->friends as $item ){\n\t\t\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t\t\t$uc->identifier = (property_exists($item,'id_user'))?$item->id_user:\"\";\n\t\t\t\t\t$uc->displayName = (property_exists($item,'username'))?$item->username:\"\";\n\t\t\t\t\t$uc->profileURL = (property_exists($item,'user_url'))?$item->user_url:\"\";\n\t\t\t\t\t$uc->photoURL = (property_exists($item,'avatar_url'))?$item->avatar_url:\"\";\n\t\t\t\t\t//$uc->description = (property_exists($item,'description'))?$item->description:\"\";\n\n\t\t\t\t\t$contacts[] = $uc;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $contacts;\n\t}",
"public function getContacts(){\n // $contacts = DB::table('contacts')->get(); /* -->Query Builder */\n\t\t\t$contacts = DB::select('SELECT * FROM contacts'); /* -->Query Builder Select */\n return response()->json(['contacts' => $contacts], 200);\n }",
"function get_contacts_by_company($id) {\n return get_view_data_where('org_contact_list', $id);\n}",
"public function getContacts()\n {\n if (array_key_exists(\"contacts\", $this->_propDict)) {\n return $this->_propDict[\"contacts\"];\n } else {\n return null;\n }\n }",
"function getAllContact() \n\t\t{\n\t\t\t\n\t\t\ttry{\n\n\t\t\t\t$query = $this->_db->prepare( \"SELECT * FROM contacts ORDER BY contact_date DESC\" );\n\n\t\t\t\t$query->execute();\n\n\t\t\t\t$data = $query->fetchAll();\n\t\t\t\t\n\t\t\t\treturn $data;\n\n\t\t\t} catch ( PDOException $e ) {\n\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\t\t\t\n\t\t}",
"public function getContacts($options = null){\n $email = isset($options[\"email\"]) ? $options[\"email\"] : null;\n $tag = isset($options[\"tag\"]) ? $options[\"tag\"] : null;\n $ids = isset($options[\"ids\"]) ? $options[\"ids\"] : null;\n\n $request = $this->GET(\"/v2.1/Contacts\");\n\n // handle standard OData options\n $this->buildODataQuery($request, $options);\n\n // handle other options\n if($email != null){\n $request->queryParam(\"email\", $email);\n }\n if($tag != null){\n $request->queryParam(\"tag\", $tag);\n }\n if($ids != null){\n $s = \"\";\n foreach($ids as $key => $value){\n if($key > 0){\n $s = $s . \",\";\n }\n $s = $s . $value;\n }\n $request->queryParam(\"ids\", $s);\n }\n\n return $request->asJSON();\n }",
"public static function getAccessContacts($list_id = 0)\n {\n $wcr = new waContactRightsModel();\n $query = \"\n SELECT DISTINCT\n group_id\n FROM wa_contact_rights\n WHERE \"\n .self::haveFullAdminSQL()\n .\" OR \"\n .self::haveFullAccessSQL()\n .\" OR \"\n .($list_id ? self::haveAccessToListSQL($list_id) : self::haveAccessSQL());\n $contact_ids = $wcr->query($query)->fetchAll();\n\n $contact_ids = array_unique(self::getContactIds($contact_ids));\n\n return $contact_ids;\n }",
"public function contact_get_list($ews,$intail_name, $final_name){\n\t\t$request = new EWSType_FindItemType();\n\t\t\n\t\t$request->ItemShape = new EWSType_ItemResponseShapeType();\n\t\t$request->ItemShape->BaseShape = EWSType_DefaultShapeNamesType::ALL_PROPERTIES;\n\t\t\n\t\t$request->ContactsView = new EWSType_ContactsViewType();\n\t\t$request->ContactsView->InitialName = $intail_name;\n\t\t$request->ContactsView->FinalName = $final_name;\n\t\t\n\t\t$request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();\n\t\t$request->ParentFolderIds->DistinguishedFolderId = new EWSType_DistinguishedFolderIdType();\n\t\t$request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CONTACTS;\n\t\t\n\t\t$request->Traversal = EWSType_ItemQueryTraversalType::SHALLOW;\n\t\t\n\t\t$response = $ews->FindItem($request);\n\t\t\n\t\t// Add Contacts to array if contact(s) were found\n\t\tif ($response->ResponseMessages->FindItemResponseMessage->RootFolder->TotalItemsInView > 0){\n\t\t $contact_data = $response->ResponseMessages->FindItemResponseMessage->RootFolder->Items->Contact;\t\n\t\t}\n\t\telse{\n\t\t\tif(empty($contact_data)){\n\t\t\t\t$contact_data = \"No Contacts Found\"; \t\n\t\t\t}\n\t\t}\n\t\treturn $contact_data;\n\t\t//return $contact_data; //remember to use the php function urlencode on the id and changekey else it will not work when sent to other EWS functions\n\t }",
"public function index()\n {\n // Get the authenticated user\n $user = auth()->user();\n\n // Get contacts for the authenticated user\n $contacts = Contact::where('user_id', $user->id)->get();\n\n return response($contacts, 200);\n }",
"public function getAllContacts($view_type = FALSE)\n\t{\n\t\t$sql = $this->db->select();\n\t\t\n\t\tif(is_numeric($view_type))\n\t\t{\n\t\t\t$sql = $sql->where(array('type' => $view_type));\n\t\t}\n\t\t\n\t\treturn $this->getRows($sql);\t\t\n\t}",
"public function list(Query $body = null)\n {\n $domainrobotPromise = $this->listAsync($body);\n $domainrobotResult = $domainrobotPromise->wait();\n\n Domainrobot::setLastDomainrobotResult($domainrobotResult);\n \n $data = $domainrobotResult->getResult()['data'];\n $contacts = array();\n\n foreach ($data as $d) {\n $c = new SslContact($d);\n array_push($contacts, $c);\n }\n return $contacts;\n }",
"public function get()\n {\n $contacts = $this->contact->orderBy('name', 'asc')->get();\n\n foreach ($contacts as $contact){\n array_add($contact, 'get_company', $contact->getCompany);\n }\n\n return json_encode($contacts);\n }",
"public function findContactsBy(array $criteria);",
"public function getInfosContact() {\n $listeInfos = $this->getInfos(\"contact\");\n return $listeInfos;\n }",
"function get_contacts($action = 'contacts')\n\t{\n\t\t$xml = $this->load_url($action);\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t// parse into nicer array\n\t\t$contacts = array();\n\t\t$_contacts = (isset($xml['feed']['entry'])) ? $xml['feed']['entry'] : false;\n\n\n\t\tif(isset($xml['feed']['link']['2_attr']['rel']) && $xml['feed']['link']['2_attr']['rel'] == 'first'):\n\t\t\t$this->contact_meta_data->first_page = $this->get_id_from_link($xml['feed']['link']['2_attr']['href']);\n\t\t\t$this->contact_meta_data->current_page = $this->get_id_from_link($xml['feed']['link']['3_attr']['href']);\n\t\t\t$this->contact_meta_data->next_page = '';\n\t\telseif(isset($xml['feed']['link']['2_attr']['rel']) && $xml['feed']['link']['2_attr']['rel'] == 'next'):\n\t\t\t$this->contact_meta_data->next_page = $this->get_id_from_link($xml['feed']['link']['2_attr']['href']);\n\t\t\t$this->contact_meta_data->current_page = $this->get_id_from_link($xml['feed']['link']['3_attr']['href']);\n\t\t\t$this->contact_meta_data->first_page = $this->get_id_from_link($xml['feed']['link']['4_attr']['href']);\n\t\tendif;\n\n\n\t\tif(is_array($_contacts)):\n\t\t\tif(isset($_contacts[0]['link_attr']['href'])):\n\t\t\t\tforeach($_contacts as $k => $v):\n\t\t\t\t\t$id = $this->get_id_from_link($v['link_attr']['href']);\n\t\t\t\t\t$contact = $v['content']['Contact'];\n\t\t\t\t\t$contact['id'] = $id;\n\t\t\t\t\t$contacts[] = $contact;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$id = $this->get_id_from_link($_contacts['link_attr']['href']);\n\t\t\t\t$contact = $_contacts['content']['Contact'];\n\t\t\t\t$contact['id'] = $id;\n\t\t\t\t$contacts[] = $contact;\n\t\t\tendif;\n\t\tendif;\n\n\t\treturn $contacts;\n\t}",
"function get_all_contacts_of_client($client_id) {\n\n $client_access_info = $this->get_access_info(\"client\");\n if ($client_id && ($this->login_user->is_admin || $client_access_info->access_type == \"all\")) {\n $client_contacts = $this->Users_model->get_all_where(array(\"status\" => \"active\", \"client_id\" => $client_id, \"deleted\" => 0))->getResult();\n $client_contacts_array = array();\n\n if ($client_contacts) {\n foreach ($client_contacts as $contacts) {\n $client_contacts_array[] = array(\"type\" => \"contact\", \"id\" => \"contact:\" . $contacts->id, \"text\" => $contacts->first_name . \" \" . $contacts->last_name);\n }\n }\n echo json_encode($client_contacts_array);\n }\n }",
"public function get_list_contacts( $args = [], $list_id = '' ) {\n if ( ! is_array( $args ) || empty( $args ) ) {\n return false;\n }\n $list_id = $this->sanitize_list_id( $list_id );\n if ( empty( $list_id ) ) {\n return false;\n }\n $endpoint = \"/lists/$list_id/members\";\n return $this->get_request( $endpoint, $args );\n }",
"public function contacts()\n {\n return $this->hasManyThrough(Contact::class, Profile::class);\n }",
"public function index(Request $request)\n {\n $contacts = $request->user()->contacts()->orderBy('updated_at', 'DESC')->get();\n return ContactResource::collection($contacts);\n }",
"public function contactList(Request $request)\n {\n $order = explode(\" \", $request->get('jtSorting', 'id asc'));\n\n $data = $this->contact->orderBy($order[0], $order[1])\n ->take($request->get('jtPageSize', 10))\n ->skip($request->get('jtStartIndex', 0));\n\n return response()->json([\n 'Result' => 'OK',\n 'TotalRecordCount' => $data->count(),\n 'Records' => $data->get()->toArray()\n ]);\n }",
"public function searchMyContacts() {\n $criteria = new CDbCriteria;\n\n $accessLevel = Yii::app()->user->checkAccess('ContactsView') ? 1 : 0;\n $conditions = $this->getAccessConditions($accessLevel);\n foreach ($conditions as $arr) {\n $criteria->addCondition($arr['condition'], $arr['operator']);\n $criteria->params = array_merge($criteria->params, $arr['params']);\n }\n\n // $condition = 'assignedTo=\"'.Yii::app()->user->getName().'\"';\n // $parameters=array('limit'=>ceil(Profile::getResultsPerPage()));\n // $parameters['condition']=$condition;\n // $criteria->scopes=array('findAll'=>array($parameters));\n\n return $this->searchBase($criteria);\n }",
"public function all($parameters = array())\n {\n $response = new Response(ContactList::get(self::base_uri(), $parameters));\n self::handle_collection($response);\n return $response;\n }",
"public function all()\n\t{\n\t\treturn $this->contact->currentUser()->orderBy('lastName', 'asc')->orderBy('email', 'asc')->paginate( $this->perPage );\n\t}",
"function contactListing()\n {\n if($this->isAbleToAccessContacts() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('contact_mgt_model');\n \n $searchText = $this->input->post('searchText');\n $data['searchText'] = $searchText;\n \n $this->load->library('pagination');\n \n $count = $this->contact_mgt_model->contactListingCount($searchText); \n \n\t\t\t$returns = $this->paginationCompress ( \"contactListing/\", $count, 5 );\n \n $data['contactRecords'] = $this->contact_mgt_model->contactListing($searchText, $returns[\"page\"], $returns[\"segment\"]);\n \n $this->global['pageTitle'] = 'contacts'; \n \n $this->loadViews(\"manageContacts\", $this->global, $data, NULL); \n }\n }",
"public function getContacts($value)\n {\n $contacts = Contact::getContacts($value);\n\n if ($contacts->count() > 0) {\n return new ContactResource($contacts);\n }\n\n return response()->json([\"status\" => \"error\", \"message\" => \"No se encontraron resultados!\"]);\n }",
"public function all()\n\t{\t\n\t\t$counts = $this->contact_model->get_conatct_counts();\n\t\t$this->load->library('pagination');\n\t\t$config['base_url'] = base_url().'/Company/index';\n\t\t$config['total_rows'] = $counts;\n\t\t$this->pagination->initialize($config);\n\t\t\n\t\t$contacts = $this->contact_model->get_all_conatct();\n\t\t\n\t\t$response = array('total' => $counts,\n\t\t\t\t\t\t'contacts' => $contacts);\n\t\techo json_encode($response);\n\t}",
"public function getContacts($id) {\n\n $contacts = DB::table('contacts')\n ->select('contacts.*', 'social_contacts.*')\n ->join('social_contacts','contacts.id','=','social_contacts.id')\n ->where('social_contacts.id', '=', $id)\n ->first();\n\n return $contacts;\n }",
"public function contacts()\n {\n return $this->hasMany(Contact::class);\n }",
"public function listAll()\n {\n return $this->contractor->all()->pluck('name', 'id')->all();\n }",
"public static function findContactsAndEmailsInList(Contactlist $list, $conditions = null, $bind = null, $limits = null) \n\t{\n\t\t$mm = Phalcon\\DI::getDefault()->get('modelsManager');\n\t\t\n\t\t$phql = 'SELECT Contact.*, Email.* FROM Contact JOIN Email JOIN Coxcl WHERE idContactlist = :idcontactlist:';\n\t\tif ($conditions != null) {\n\t\t\t$phql .= ' AND ' . $conditions;\n\t\t\t$options = $bind;\n\t\t}\n\t\tif ($limits != null && is_array($limits) && isset($limits['number']) ) {\n\t\t\t$number = $limits['number'];\n\t\t\t$start = isset($limits['offset'])?$limits['offset']:0;\n\t\t\t$phql .= ' LIMIT ' . $number . ' OFFSET ' . $start;\n\t\t}\n\t\t$options['idcontactlist'] = $list->idContactlist;\n\t\t$query = $mm->executeQuery($phql, $options);\n\t\t\n\t\treturn $query;\n\t\t\n\t}",
"public function index()\n {\n return Contact::latest()->get();\n }",
"public function showMyContacts()\n {\n $myContacts = $this->userRequest->userContacts();\n return response()->json($myContacts);\n }",
"public function getContactAllEmail()\n\t{\n\t\t$emails = 'nothing';\n\n\t\tif( $this->token != '' )\n\t\t{\n\t\t\t$url = $this->url . \"/Contacts/filter\";\n\t\t\t$filter_arguments = array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"fields\" => \"id,portal_name\",\n\t\t\t);\n\n\t\t\t$response = self::call($url, $this->token, 'GET',$filter_arguments);\n\n\t\t\t$email_records = $response->records;\n\n\t\t\tforeach($email_records as $record)\n\t\t\t{\n\t\t\t\t$emails[] = $record->portal_name;\n\t\t\t}\n\t\t}\n\n\t\treturn $emails;\n\t}",
"function user_get_contacts($uid){\n\t\t$queryText = 'SELECT user_accounts.first_name, user_accounts.last_name FROM user_accounts INNER JOIN user_contacts ON user_contacts.uid = :uid AND user_contacts.contact_uid = user_accounts.Uid';\n\t\t\n\t\t$query = $this->connection->prepare($queryText);\n\t\t$query->execute(array(':uid'=>$uid));\n\t\t\n\t\treturn $query;\n\t}",
"function getContacts(){\n\t$query = \"SELECT sc_contacts.*, sc_science.id AS sci_id, sc_science.name \n\t\tFROM sc_contacts JOIN sc_science ON sc_contacts.refer_science_id = sc_science.id\n\t\tORDER BY sc_contacts.last_name;\";\n\t$result = mysql_query($query);\t\n\tif (!$result) {\n\t die('Invalid query: ' . mysql_error());\n\t} else {\n\t\treturn $result;\n\t}\t\n}",
"protected function getContactsByToken($token)\n {\n $response = $this->getHttpClient()\n ->setRequestUrl(\n sprintf(\n 'https://social.yahooapis.com/v1/user/me/contacts', $this->storage->get('xoauth_yahoo_guid')\n )\n )\n ->setMethod('get')\n ->setFields('format=json')\n ->setHeaders(\n [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer '.$token\n ]\n )\n ->send();\n\n return $this->parseContacts($response);\n }",
"public function getMyContacts()\n\t\t{\n\t\tif (!$this->login_ok)\n\t\t\t{\n\t\t\t$this->debugRequest();\n\t\t\t$this->stopPlugin();\n\t\t\treturn false;\n\t\t\t}\n\t\telse $user_id=$this->login_ok;\n\t\t$url_request_friends=\"http://www.plurk.com/Friends/getFriendsByOffset\";\n\t\t$post_elements=array('offset'=>0,'user_id'=>$user_id);\n\t\t$res=$this->post($url_request_friends,$post_elements,true);\n\t\tif ($this->checkResponse(\"get_contacts\",$res))\n\t\t\t$this->updateDebugBuffer('get_contacts',$url_request_friends,'POST',true,$post_elements);\n\t\telse\n\t\t\t{\n\t\t\t$this->updateDebugBuffer('get_contacts',$url_request_friends,'POST',false,$post_elements);\n\t\t\t$this->debugRequest();\n\t\t\t$this->stopPlugin();\n\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t$contacts=array();\n\t\twhile(strpos($res,'\"nick_name\": \"')!==false)\n\t\t\t{\n\t\t\t$name=$this->getElementString($res,'\"nick_name\": \"','\"');\n\t\t\t$name_delete='\"nick_name\": \"'.$name;\n\t\t\t$uid=$this->getElementString($res,'\"uid\": ',',');\n\t\t\t$uid_delete='\"uid\": '.$uid;\n\t\t\t$res=str_replace($name_delete,'',str_replace($uid_delete,'',$res));\n\t\t\tif(isset($uid)) $contacts[$uid]=(isset($name)?$name:false);\n\t\t\t}\n\t\treturn $contacts;\t\n\t\t}",
"public function details($parameters = array())\n {\n // Let's make a request to get the details of the list\n $response = self::get($this->response->url, $parameters);\n // Return the details as a list object\n return new ContactList($response);\n }",
"public function getcontactUsList()\n {\n $queries = Query::query()->orderBy('id', 'DESC');\n return \\ DataTables::of($queries)->editColumn('status', 'admin.queries.datatables.status_column')->addColumn('actions', 'admin.queries.datatables.action_buttons ')->addColumn('setting', 'admin.queries.datatables.setting_buttons ')->rawColumns(['actions','status','setting'])->addIndexColumn()->make(true);\n }",
"public function listAllCustomers();",
"public static function getAll() {\n $list = array(); //create list\n //get connection\n\t\t\t$connection = MySqlConnection::getConnection();\n\t\t\t//query\n\t\t\t$query = 'select id, description, availableToAnswer from statusCall';\n\t\t\t//prepare statement\n\t\t\t$command = $connection->prepare($query);\n\t\t\t//execute\n\t\t\t$command->execute();\n\t\t\t//bind results\n\t\t\t$command->bind_result($id, $description, $availableToAnswer);\n\t\t\t//fetch data\n\t\t\twhile ($command->fetch()) {\n\t\t\t\t//add contact to list\n\t\t\t\tarray_push($list, new CallStatus($id, $description, $availableToAnswer));\n\t\t\t}\n return $list; //return list\n }",
"function query_contacts($email)\n\t{\n\t\t$xml = $this->load_url('contacts?email=' . strtolower(urlencode($email)));\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t$contact = false;\n\t\t$_contact = (isset($xml['feed']['entry'])) ? $xml['feed']['entry'] : false;\n\n\t\t// parse into nicer array\n\t\tif(is_array($_contact)):\n\t\t\t$id = $this->get_id_from_link($_contact['link_attr']['href']);\n\n\t\t\t$contact = $_contact['content']['Contact'];\n\t\t\t$contact['id'] = $id;\n\t\tendif;\n\n\t\treturn $contact;\n\t}",
"public function getAllContacts(): array\n {\n @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use list() instead.', __METHOD__), \\E_USER_DEPRECATED);\n\n return $this->list();\n }",
"public function getList();",
"public function getList();",
"public function getContacts(array $filters = array())\n {\n $data = array();\n\n if (!empty($filters)) {\n $data['filter'] = $filters;\n }\n\n return $this->_execute('/contact/', self::METHOD_GET, $data);\n }",
"public function contacts()\n {\n return $this->hasMany('Contact');\n }",
"public function list(int $offset = 0, int $limit = self::MAX_ITEMS_PER_REQUEST, array $fields = []): array\n {\n /** @var Contact[] $contacts */\n $contacts = [];\n $response = $this->client->get($this->prepareUrlForKey('get-contacts'), [\n '_skip' => $offset,\n '_limit' => $limit,\n '_fields' => $fields,\n ]);\n\n $responseData = $response->getDecodedBody();\n\n foreach ($responseData['data'] as $contact) {\n $contacts[] = new Contact($contact);\n }\n\n return $contacts;\n }",
"public function contacts()\n {\n return $this->hasMany('App\\Models\\User\\Contact', 'user_id');\n }",
"public function index()\n {\n //$contacts = Contact::paginate(5);\n $contacts = Contact::orderBy('firstName', 'asc')->paginate(5);\n return ContactResource::collection($contacts);\n }",
"public static function getContacts($customerid){\n\t\t$dq = Doctrine_Query::create ()\n ->select ( 'c.contact_id, c.contact, ct.name as type' )\n ->from ( 'Contacts c' )\n ->leftJoin ( 'c.ContactsTypes ct ON ct.type_id = c.type_id' )\n ->where('c.customer_id = ' . $customerid);\n \n\t return $dq->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\n\t}",
"public function getContactsByPhone(string $phone)\n {\n return $this->doRequest('GET', \"contacts/{$phone}\", []);\n }",
"public function getContactsForAdding()\n {\n return $this->contactsForAdding;\n }",
"public function getForList(int $listId, int $page): OperationResult\n {\n $overrideResource = \"lists/{$listId}\";\n\n return $this->_get('contacts', ['page' => $page], $overrideResource);\n }",
"public function getPeopleList()\n {\n //db object\n $db = JFactory::getDBO();\n //gen query\n $query = $db->getQuery(true);\n $query->select(\"DISTINCT(p.id),p.first_name,p.last_name\");\n $query->from(\"#__people AS p\");\n $query->leftJoin(\"#__users AS u ON u.id = p.owner_id\");\n $query->leftJoin(\"#__people_cf AS dcf ON dcf.person_id = p.id AND dcf.association_type='deal'\");\n\n //filter based on member access roles\n $user_id = UsersHelper::getUserId();\n $member_role = UsersHelper::getRole();\n $team_id = UsersHelper::getTeamId();\n\n if ($member_role != 'exec') {\n\n if ($member_role == 'manager') {\n $query->where(\"u.team_id=$team_id\");\n } else {\n $query->where(\"(p.owner_id=$user_id OR p.assignee_id=$user_id )\");\n }\n\n }\n\n $query->where(\"p.published=\".$this->published);\n\n $associationType = $this->app->input->get('association');\n $associationId = $this->app->input->get('association_id');\n\n if ($associationType == \"company\") {\n $query->where(\"p.company_id=\".$associationId);\n }\n if ($associationType == \"deal\") {\n $query->where(\"dcf.association_id=\".$associationId.\" AND dcf.association_type='deal'\");\n }\n\n //set query\n $db->setQuery($query);\n\n //load list\n $row = $db->loadAssocList();\n $blank = array(array('first_name'=>TextHelper::_('COBALT_NONE'),'last_name'=>'','id'=>0));\n $return = array_merge($blank,$row);\n\n //return results\n return $return;\n\n }",
"public function listAll();",
"public function listAll();"
] | [
"0.8119534",
"0.8112432",
"0.8090667",
"0.7910372",
"0.786432",
"0.7675143",
"0.7629985",
"0.7605466",
"0.75427717",
"0.7514731",
"0.73729944",
"0.73159415",
"0.7295968",
"0.7267743",
"0.72498906",
"0.72162354",
"0.7180445",
"0.7032053",
"0.6987499",
"0.6973628",
"0.69224906",
"0.69154185",
"0.6913405",
"0.68526244",
"0.6850756",
"0.6845974",
"0.6823586",
"0.67755485",
"0.6741544",
"0.6720133",
"0.6711519",
"0.67096144",
"0.67049986",
"0.6689325",
"0.66840076",
"0.66820717",
"0.6662705",
"0.6629972",
"0.66251355",
"0.6614047",
"0.6606034",
"0.6515339",
"0.6486394",
"0.64587116",
"0.64249253",
"0.6378876",
"0.63499403",
"0.63488644",
"0.6341647",
"0.6329595",
"0.63059056",
"0.63023376",
"0.6300733",
"0.6277016",
"0.62711775",
"0.626704",
"0.6259488",
"0.62482584",
"0.6239965",
"0.62339234",
"0.6233358",
"0.6228826",
"0.6209837",
"0.61935484",
"0.6179145",
"0.61703306",
"0.61702204",
"0.6166436",
"0.61653054",
"0.61499536",
"0.61477125",
"0.6144615",
"0.61396736",
"0.61387295",
"0.61351997",
"0.61313146",
"0.6117525",
"0.6095842",
"0.60827136",
"0.60783154",
"0.6045119",
"0.60442597",
"0.6038028",
"0.6033527",
"0.6028168",
"0.60096073",
"0.5983443",
"0.5983443",
"0.5977369",
"0.5976878",
"0.5973342",
"0.5972607",
"0.59644973",
"0.5962297",
"0.5956377",
"0.59522045",
"0.59505343",
"0.5942006",
"0.5938669",
"0.5938669"
] | 0.7197231 | 16 |
Convert Gregorian to Hijri. | private static function gth($year, $month, $day)
{
$year = (int) $year;
$month = (int) $month - 1; // Month start with Zero
$day = (int) $day;
$y = $year;
$m = $month + 1;
// append January and February to the previous year (i.e. regard March as
// the first month of the year in order to simplify leapday corrections)
$y = $m < 3 ? --$y : $y;
$m = $m < 3 ? $m += 12 : $m;
// determine offset between Julian and Gregorian calendar
$a = floor($y / 100.);
$jgc = $a - floor($a / 4.) - 2;
// compute Chronological Julian Day Number (CJDN)
$cjdn = floor(365.25 * ($y + 4716)) + floor(30.6001 * ($m + 1)) + $day - $jgc - 1524;
$a = floor(($cjdn - 1867216.25) / 36524.25);
$jgc = $a - floor($a / 4.) + 1;
$b = $cjdn + $jgc + 1524;
$c = floor(($b - 122.1) / 365.25);
$d = floor(365.25 * $c);
$month = floor(($b - $d) / 30.6001);
// compute Modified Chronological Julian Day Number (MCJDN)
$mcjdn = $cjdn - 2400000;
// the MCJDN's of the start of the lunations in the Umm al-Qura calendar are stored in 'islamcalendar_dat.js'
$count = count(self::$UQD);
for ($i = 0; $i < $count; ++$i) {
if (self::$UQD[$i] > $mcjdn) {
break;
}
}
// compute and output the Umm al-Qura calendar date
$iln = $i + 16260;
$ii = floor(($iln - 1) / 12);
$iy = $ii + 1;
$im = $iln - 12 * $ii;
$id = $mcjdn - self::$UQD[$i - 1] + 1;
return self::$date->setYear($iy)->setMonth($im)->setDay($id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function hijri($format = 'f' ,$date = null)\n {\n return Tawkit::fullHijri($date,$format); \n }",
"public function ToHijri()\n {\n\n\n }",
"public function getHijriFromGregorian(Carbon $gregorian): HijriDate\n {\n $gregorian->setTimezone('+5:00'); // Ensure it is in MVT\n $gregorian->startOfDay(); // Ensure it is at midnight (so time does not affect diffInDays())\n $formatter = IntlDateFormatter::create(\n 'en_US',\n IntlDateFormatter::FULL,\n IntlDateFormatter::FULL,\n 'Indian/Maldives',\n IntlCalendar::createInstance('Indian/Maldives', \"en_US@calendar=islamic\"),\n 'yyyy-MM-dd'\n );\n return HijriDate::parse($formatter->format($gregorian));\n }",
"public function getGregorianFromHijri(HijriDate $hijri): Carbon\n {\n $hijriYear = $hijri->getYear();\n $hijriMonth = $hijri->getMonth();\n $hijriDay = $hijri->getDay();\n\n // Hijri to Julian\n $julianDay = floor((11 * $hijriYear + 3) / 30) + floor(354 * $hijriYear) + floor(30 * $hijriMonth)\n - floor(($hijriMonth - 1) / 2) + $hijriDay + 1948440 - 386;\n\n // Julian to Gregorian\n $b = 0;\n if ($julianDay > 2299160) {\n $a = floor(($julianDay - 1867216.25) / 36524.25);\n $b = 1 + $a - floor($a / 4.0);\n }\n\n $bb = $julianDay + $b + 1524;\n $cc = floor(($bb - 122.1) / 365.25);\n $dd = floor(365.25 * $cc);\n $ee = floor(($bb - $dd) / 30.6001);\n\n $gregorianDay = ($bb - $dd) - floor(30.6001 * $ee);\n $gregorianMonth = $ee - 1;\n\n if ($ee > 13) {\n $cc += 1;\n $gregorianMonth = $ee - 13;\n }\n\n $gregorianYear = $cc - 4716;\n\n return Carbon::create($gregorianYear, $gregorianMonth, $gregorianDay, 0, 0, 0, '+5:00');\n }",
"static function jdToHijri($jd) {\n $jd = floor($jd) + 0.5;\n $year = floor(((30 * ($jd - HIJRI_EPOCH)) + 10646) / 10631);\n $month = min(12, ceil(($jd - (29 + self::hijriToJulian(1, 1, $year))) / 29.5) + 1);\n $day = ($jd - self::hijriToJulian($month, 1, $year)) + 1;\n\n return [\n 'Month' => $month,\n 'Day' => $day,\n 'Year' => $year\n ];\n }",
"public static function createFromGregorian($gregorian = null): HijriDate\n {\n if (is_null($gregorian)) $gregorian = now();\n if (is_string($gregorian)) $gregorian = Carbon::parse($gregorian);\n\n $hijri = self::getConverter()->getHijriFromGregorian($gregorian);\n $hijri->setGregorianDate($gregorian);\n return $hijri;\n }",
"function jd_to_hebrew($jd, &$mo, &$da, &$yr) {\n\n\t\t$jd = floor($jd) + 0.5;\n\n\t\t$count = floor((($jd - HEBREW_EPOCH) * 98496.0) / 35975351.0);\n\t\t$yr = $count - 1;\n\n\t\t$jdtest = hebrew_to_jd(7,1,$count);\n\t\tfor ( $i = $count; $jd >= $jdtest; ) {\n\t\t\t$yr++;\n\t\t\t$jdtest = hebrew_to_jd(7,1,++$i);\n\t\t}\n\n\t\t$first = ($jd < hebrew_to_jd(1,1,$yr)) ? 7 : 1;\n\t\t$mo = $first;\n\n\t\t$jdtest = hebrew_to_jd($mo, hebrew_month_days($mo,$yr), $yr);\n\t\tfor ( $i = $first; $jd > $jdtest; ) {\n\t\t\t$mo++;\n\t\t\t$jdtest = hebrew_to_jd(++$i, hebrew_month_days($i,$yr), $yr);\n\t\t}\n\n\n\t\t$da = $jd - hebrew_to_jd($mo, 1, $yr) +1;\n\t}",
"function mc_gregorian_to_jalali($gy,$gm,$gd,$mod=''){\n $g_d_m=array(0,31,59,90,120,151,181,212,243,273,304,334);\n if($gy>1600){\n $jy=979;\n $gy-=1600;\n }else{\n $jy=0;\n $gy-=621;\n }\n $gy2=($gm>2)?($gy+1):$gy;\n $days=(365*$gy) +((int)(($gy2+3)/4)) -((int)(($gy2+99)/100)) +((int)(($gy2+399)/400)) -80 +$gd +$g_d_m[$gm-1];\n $jy+=33*((int)($days/12053)); \n $days%=12053;\n $jy+=4*((int)($days/1461));\n $days%=1461;\n if($days > 365){\n $jy+=(int)(($days-1)/365);\n $days=($days-1)%365;\n }\n $jm=($days < 186)?1+(int)($days/31):7+(int)(($days-186)/30);\n $jd=1+(($days < 186)?($days%31):(($days-186)%30));\n return($mod=='')?array($jy,$jm,$jd):$jy.$mod.$jm.$mod.$jd;\n}",
"function gregorian_to_jalali ($g_y, $g_m, $g_d)\n\t{\n\t\t$g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n\t\t$j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n\t\t$gy = $g_y-1600;\n\t\t$gm = $g_m-1;\n\t\t$gd = $g_d-1;\n\t\t$g_day_no = 365*$gy+$this->div($gy+3,4)-$this->div($gy+99,100)+$this->div($gy+399,400);\n\n\t\tfor ($i=0; $i < $gm; ++$i)\n\t\t\t$g_day_no += $g_days_in_month[$i];\n\t\t\n\t\tif ($gm>1 && (($gy%4==0 && $gy%100!=0) || ($gy%400==0)))\n\t\t\t$g_day_no++; /* leap and after Feb */\n\t\t\n\t\t$g_day_no += $gd;\n\t\t$j_day_no = $g_day_no-79;\n\t\t$j_np = $this->div($j_day_no, 12053); /* 12053 = 365*33 + 32/4 */\n\t\t$j_day_no = $j_day_no % 12053;\n\t\t$jy = 979+33*$j_np+4*$this->div($j_day_no,1461); /* 1461 = 365*4 + 4/4 */\n\t\t$j_day_no %= 1461;\n\t\t\n\t\tif($j_day_no >= 366)\n\t\t{\n\t\t\t$jy += $this->div($j_day_no-1, 365);\n\t\t\t$j_day_no = ($j_day_no-1)%365;\n\t\t}\n\t\t\n\t\tfor($i = 0; $i < 11 && $j_day_no >= $j_days_in_month[$i]; ++$i)\n\t\t\t$j_day_no -= $j_days_in_month[$i];\n\t\t\n\t\t$jm = $i+1;\n\t\t$jd = $j_day_no+1;\n\t\t\n\t\treturn array($jy, $jm, $jd);\n\t}",
"static function hijriToJulian($month, $day, $year) {\n return ($day + ceil(29.5 * ($month - 1)) + ($year - 1) * 354 + floor((3 + (11 * $year)) / 30) + HIJRI_EPOCH) - 1;\n }",
"public function toLunarHijriString($date, $format=\"YYYY/MM/DD\") {\n\t\t\t$DateConverter = new Hijri_GregorianConvert;\n\t\t\treturn $DateConverter->GregorianToHijri($date->format(\"Y-m-d\"),$format);\n\t\t}",
"public function gregorian_to_jalali($gy, $gm, $gd, $mod = '')\n {\n list($gy, $gm, $gd) = explode('_', tr_num($gy . '_' . $gm . '_' . $gd));/* <= Extra :اين سطر ، جزء تابع اصلي نيست */\n $g_d_m = array(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334);\n if ($gy > 1600) {\n $jy = 979;\n $gy -= 1600;\n } else {\n $jy = 0;\n $gy -= 621;\n }\n $gy2 = ($gm > 2) ? ($gy + 1) : $gy;\n $days = (365 * $gy) + ((int)(($gy2 + 3) / 4)) - ((int)(($gy2 + 99) / 100)) + ((int)(($gy2 + 399) / 400)) - 80 + $gd + $g_d_m[$gm - 1];\n $jy += 33 * ((int)($days / 12053));\n $days %= 12053;\n $jy += 4 * ((int)($days / 1461));\n $days %= 1461;\n $jy += (int)(($days - 1) / 365);\n if ($days > 365) $days = ($days - 1) % 365;\n if ($days < 186) {\n $jm = 1 + (int)($days / 31);\n $jd = 1 + ($days % 31);\n } else {\n $jm = 7 + (int)(($days - 186) / 30);\n $jd = 1 + (($days - 186) % 30);\n }\n return ($mod === '') ? array($jy, $jm, $jd) : $jy . $mod . $jm . $mod . $jd;\n }",
"public function toHours($time) {\n \treturn intval($time / 3600000) % 60;\n }",
"function gregorianToHuman($day=0, $month=0, $year=0)\n {\n /**\n * Check to see if any of the arguments are empty\n * If they are then populate the $dateinfo array\n * Then check to see which arguments are empty and fill\n * those with the current date info\n */\n if ((empty($day) || (empty($month)) || empty($year))) {\n $dateinfo = getdate(time());\n }\n if (empty($day)) {\n $day = $dateinfo[\"mday\"];\n }\n if (empty($month)) {\n $month = $dateinfo[\"mon\"];\n }\n if (empty($year)) {\n $year = $dateinfo[\"year\"];\n }\n /**\n * We need to know how many days into the year we are\n */\n $dateinfo = getdate(mktime(0, 0, 0, $month, $day, $year));\n $dayofyear = $dateinfo[\"yday\"];\n /**\n * Human Calendar starts at 0 for months and the first day of the year\n * is designated 00, so we need to start our day of the year at 0 for\n * these calculations.\n * Also, the day of the month is calculated with a modulus of 28.\n * Because a day is 28 days, the last day of the month would have a\n * remainder of 0 and not 28 as it should be. Decrementing $dayofyear\n * gets around this.\n */\n $dayofyear--;\n /**\n * 28 days in a month...\n */\n $humanMonthOfYear = floor($dayofyear / 28);\n /**\n * If we are in the first month then the day of the month is $dayofyear\n * else we need to find the modulus of 28.\n */\n if ($humanMonthOfYear == 0) {\n $humanDayOfMonth = $dayofyear;\n } else {\n $humanDayOfMonth = ($dayofyear) % 28;\n }\n /**\n * Day of the week is modulus 7\n */\n $humanDayOfWeek = $dayofyear % 7;\n /**\n * We can now increment $dayofyear back to it's correct value for\n * the remainder of the calculations\n */\n $dayofyear++;\n /**\n * $humanDayOfMonth needs to be incremented now - recall that we fudged\n * it a bit by decrementing $dayofyear earlier\n * Same goes for $humanDayOfWeek\n */\n $humanDayOfMonth++;\n $humanDayOfWeek++;\n /**\n * Week of the month is day of the month divided by 7, rounded up\n * Same for week of the year, but use $dayofyear instead $humanDayOfMonth\n */\n $humanWeekOfMonth = ceil($humanDayOfMonth / 7);\n $humanWeekOfYear = ceil($dayofyear / 7);\n /**\n * Return an associative array of the values\n */\n return array(\n \"hdom\" => $humanDayOfMonth,\n \"hdow\" => $humanDayOfWeek,\n \"hwom\" => $humanWeekOfMonth,\n \"hwoy\" => $humanWeekOfYear,\n \"hmoy\" => $humanMonthOfYear );\n }",
"public static function getGregorian($j_y, $j_m, $j_d) {\n $jy = $j_y - 979;\n $jm = $j_m - 1;\n $j_day_no = (365 * $jy + static::div($jy, 33) * 8 + static::div($jy % 33 + 3, 4));\n for ($i = 0; $i < $jm; ++$i) {\n $j_day_no += static::$daysMonthJalali[$i];\n }\n $j_day_no += $j_d - 1;\n $g_day_no = $j_day_no + 79;\n $gy = (1600 + 400 * static::div($g_day_no, 146097)); # 146097 = (365 * 400 + 400 / 4 - 400 / 100 + 400 / 400)\n $g_day_no = $g_day_no % 146097;\n $leap = 1;\n if ($g_day_no >= 36525) { # 36525 = (365 * 100 + 100 / 4)\n $g_day_no --;\n $gy += (100 * static::div($g_day_no, 36524)); # 36524 = (365 * 100 + 100 / 4 - 100 / 100)\n $g_day_no = $g_day_no % 36524;\n if ($g_day_no >= 365) {\n $g_day_no ++;\n } else {\n $leap = 0;\n }\n }\n $gy += (4 * static::div($g_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)\n $g_day_no %= 1461;\n if ($g_day_no >= 366) {\n $leap = 0;\n $g_day_no --;\n $gy += static::div($g_day_no, 365);\n $g_day_no = ($g_day_no % 365);\n }\n for ($i = 0; $g_day_no >= (static::$daysMonthGregorian[$i] + ($i == 1 && $leap)); $i ++) {\n $g_day_no -= (static::$daysMonthGregorian[$i] + ($i == 1 && $leap));\n }\n return array($gy, $i + 1, $g_day_no + 1);\n }",
"function jd_to_gregorian($jd, &$mo, &$da, &$yr) {\n\n\t\t$wjd = floor($jd - 0.5) + 0.5;\n\t\t$depoch = $wjd - GREGORIAN_EPOCH;\n\t\t$quadricent = floor($depoch / 146097);\n\t\t$dqc = $depoch % 146097;\n\t\t$cent = floor($dqc / 36524);\n\t\t$dcent = $dqc % 36524;\n\t\t$quad = floor($dcent / 1461);\n\t\t$dquad = $dcent % 1461;\n\t\t$yindex = floor($dquad / 365);\n\t\t$yr = $quadricent * 400 + $cent * 100 + $quad * 4 + $yindex;\n\n\t\tif (!(($cent == 4) || ($yindex == 4))) $yr++;\n\n\t\t$yearday = $wjd - gregorian_to_jd(1,1,$yr);\n\t\t$leapadj = (($wjd < gregorian_to_jd(3,1,$yr)) ? 0 : (leap_gregorian($yr) ? 1 : 2));\n\t\t$mo = floor(((($yearday + $leapadj) * 12) + 373) / 367);\n\t\t$da = $wjd - gregorian_to_jd($mo, 1, $yr) + 1;\n\n\t}",
"function get_hora_meridiano($hora){\n\t$hora = explode(\":\",$hora);\n\t$h = $hora[0];\n\t$m = $hora[1];\n\tif($h > 12){\n\t\t$h = $h - 12;\n\t\tif($h < 10){\n\t\t\t$h = '0'.$h;\n\t\t}\n\t\t$h = $h.':'.$m.' pm';\t\t\n\t}else{\n\t\tif($h == 12){\n\t\t\t$h = $h.':'.$m.' m';\n\t\t}else{\n\t\t\t$h = $h.':'.$m.' am';\n\t\t}\t\t\n\t}\n\treturn $h;\n}",
"public function getHour(): string\n {\n return $this->toLocalizedString('H');\n }",
"public function dayToHari($str)\n {\n $strTotime = strtotime($str);\n $tentukanHari = date('D', $strTotime);\n $day = array(\n 'Sun' => 'AKHAD',\n 'Mon' => 'SENIN',\n 'Tue' => 'SELASA',\n 'Wed' => 'RABU',\n 'Thu' => 'KAMIS',\n 'Fri' => 'JUMAT',\n 'Sat' => 'SABTU'\n );\n\n $hari = $day[$tentukanHari];\n return $hari;\n }",
"public function gregorian_to_jalali( $gy, $gm, $gd, $mod = '' ) {\n\t\t$g_d_m = array( 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 );\n\t\tif ( $gy > 1600 ) {\n\t\t\t$jy = 979;\n\t\t\t$gy -= 1600;\n\t\t} else {\n\t\t\t$jy = 0;\n\t\t\t$gy -= 621;\n\t\t}\n\t\t$gy2 = ( $gm > 2 ) ? ( $gy + 1 ) : $gy;\n\t\t$days = ( 365 * $gy ) + ( (int) ( ( $gy2 + 3 ) / 4 ) ) - ( (int) ( ( $gy2 + 99 ) / 100 ) ) + ( (int) ( ( $gy2 + 399 ) / 400 ) ) - 80 + $gd + $g_d_m[ $gm - 1 ];\n\t\t$jy += 33 * ( (int) ( $days / 12053 ) );\n\t\t$days %= 12053;\n\t\t$jy += 4 * ( (int) ( $days / 1461 ) );\n\t\t$days %= 1461;\n\t\tif ( $days > 365 ) {\n\t\t\t$jy += (int) ( ( $days - 1 ) / 365 );\n\t\t\t$days = ( $days - 1 ) % 365;\n\t\t}\n\t\t$jm = ( $days < 186 ) ? 1 + (int) ( $days / 31 ) : 7 + (int) ( ( $days - 186 ) / 30 );\n\t\t$jd = 1 + ( ( $days < 186 ) ? ( $days % 31 ) : ( ( $days - 186 ) % 30 ) );\n\n\t\treturn ( $mod == '' ) ? array( $jy, $jm, $jd ) : $jy . $mod . $jm . $mod . $jd;\n\t}",
"private static function htg($year, $month, $day)\n {\n $year = (int) $year;\n $month = (int) $month;\n $day = (int) $day;\n\n $ii = $year - 1;\n $iln = ($ii * 12) + 1 + ($month - 1);\n $i = $iln - 16260;\n $mcjdn = $day + self::$UQD[$i - 1] - 1;\n $cjdn = $mcjdn + 2400000;\n\n return self::jtg($cjdn);\n }",
"function horaire($horaire) {\r\n\t// affiche un nombre d'heures correctement formatté\r\n\t$horaire = ($horaire && $horaire !=='')? $horaire.\" h\":\"\";\r\n\treturn $horaire;\r\n}",
"public static function parse(string $hijri): HijriDate\n {\n if (!self::isParsable($hijri))\n throw new InvalidArgumentException(\"This date cannot be parsed as a Hijri date: $hijri\");\n\n $dateParts = explode(\"-\", $hijri);\n $hYear = (int) $dateParts[0];\n $hMonth = (int) $dateParts[1];\n $hDay = (int) $dateParts[2];\n\n return new self($hYear, $hMonth, $hDay);\n }",
"function hitung_hari($awal,$akhir){\n\t\t$tglAwal = strtotime($awal);\n\t\t$tglAkhir = strtotime($akhir);\n\t\t$jeda = abs($tglAkhir - $tglAwal);\n\t\treturn floor($jeda/(60*60*24));\n\t}",
"function convertir_hora_militar($seg_ini) {\n\n\t\t\t$horas = floor($seg_ini/3600);\n\t\t\t$minutos = floor(($seg_ini-($horas*3600))/60);\n\t\t\t\t\t\t\t\n\t\t\treturn $horas.\":\".$minutos;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"function Hora_prog($valor){\t\n\n return date(\"H:i\", strtotime($valor));\n\n}",
"public static function dayOfYearToJStime($year, $day, $hour = 12) {\n\t\treturn mktime($hour,0,0,1,$day,$year).'000';\n\t}",
"public function getHours() : string\n {\n return date('H', $this->getUnixTimestamp());\n }",
"function HumanToGregorian($day, $month, $year=0)\n {\n /**\n * Check to see if the year has been passed through.\n * If not get current year\n */\n if (empty($year)) {\n $dateinfo = getdate(time());\n $year = $dateinfo[\"year\"];\n }\n /**\n * We need to get the day of the year that we are currently at so that\n * we can work out the Gregorian Month and day\n */\n $DayOfYear = $month * 28;\n $DayOfYear += $day;\n /**\n * Human Calendar starts at 0, so we need to increment $DayOfYear\n * to take into account the day 00\n */\n $DayOfYear++;\n /**\n * the mktime() function will correctly calculate the date for out of\n * range values, so putting $DayOfYear instead of the day of the month\n * will work fine.\n */\n $GregorianTimeStamp = mktime(0, 0, 0, 1, $DayOfYear, $year);\n return $GregorianTimeStamp;\n }",
"public function getKieGuruHaid()\n {\n return $this->kie_guru_haid;\n }",
"function hrdi(DateInterval $diff)\n{\n\t$str = \"\";\n\tif ($diff->y > 1) return $str . $diff->y . ' years';\n\tif ($diff->y == 1) return $str . ' 1 year and ' . $diff->m . ' months';\n\tif ($diff->m > 1) return $str . $diff->m . ' months';\n\tif ($diff->m == 1) return $str . ' 1 month and ' . $diff->d . ($diff->d > 1 ? ' days' : ' day');\n\tif ($diff->d > 1) return $str . $diff->d . ' days';\n\tif ($diff->d == 1) return $str . ' 1 day and ' . $diff->h . ($diff->h > 1 ? ' hours' : ' hour');\n\tif ($diff->h > 1) return $str . $diff->h . ' hours';\n\tif ($diff->h == 1) return $str . ' 1 hour and ' . $diff->i . ($diff->i > 1 ? ' minutes' : ' minute');\n\tif ($diff->i > 1) return $str . $diff->i . ' minutes';\n\tif ($diff->i == 1) return $str . ' 1 minute';\n\treturn $str . ' a few secondes';\n}",
"function formatear_hora($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$hora = substr($parametro, 11, 2);\n\t\t$minuto = substr($parametro, 14, 2);\n\t\t$dia = substr($parametro, 8, 2);\n\t\t$mes = substr($parametro, 5, 2);\n\t\t\n\t\t/* Generamos el formato */\n\t\t$temp = $hora.\":\".$minuto;\n\t\t\n\t\treturn $temp;\n\t}",
"function convertTime($time){\n return date(\"H:i\", strtotime($time));\n}",
"private function GetTimeHHMM() : string {\n\t\t\t$dt = new DateTime();\n\t\t\t$dtz = new DateTimeZone(\"EUROPE/Berlin\");\n\t\t\t$dt->setTimezone($dtz);\n\t\t\treturn $dt->format(\"H:i\");\n\t\t}",
"function obtener_hora($fecha) {\r\nreturn(substr($fecha,11,2));\r\n}",
"public function convertTime($time)\n\t{\n\t\t\tif (date('Y-m-d', $time) == date('Y-m-d')) {\n $timeConverted = strftime('<span class=\"timeRange\">Heute</span>, %H:%M', $time);\n } elseif (date('Y-m-d', $time) == date('Y-m-d', strtotime(\"Yesterday\"))) {\n $timeConverted = strftime('<span class=\"timeRange\">Gestern</span>, %H:%M', $time);\n } elseif (date('Y-m-d', $time) < date('Y-m-d', strtotime(\"Yesterday\"))) {\n $timeConverted = strftime(\"%A, %d %B %Y %H:%M\", $time);\n }\n\t\t\t\n\t\treturn utf8_encode($timeConverted);\n\t}",
"function getJulianDate()\r\n {\r\n return Data_Calc::dataJuliana($this->dia, $this->mes, $this->ano);\r\n }",
"function getHour()\r\n {\r\n return $this->hora;\r\n }",
"function jd2date($jd)\n{\n\t$x0 = (int)( $jd+68570.0);\n\t$x1 = (int)( $x0/36524.25 );\n\t$x2 = $x0 - (int)( 36524.25*$x1 + 0.75 );\n\t$x3 = (int)( ( $x2+1 )/365.2425 );\n\t$x4 = $x2 - (int)( 365.25*$x3 )+31.0;\n\t$x5 = (int)( (int)($x4) / 30.59 );\n\t$x6 = (int)( (int)($x5) / 11.0 );\n\n\t$time[2] = $x4 - (int)( 30.59*$x5 );\n\t$time[1] = $x5 - 12*$x6 + 2;\n\t$time[0] = 100*( $x1-49 ) + $x3 + $x6;\n\n\t// Compensation on February 30\n\tif ($time[1] == 2 && $time[2] > 28) {\n\t\tif ($time[0] % 100 == 0 && $time[0] % 400 == 0) {\n\t\t\t$time[2] = 29;\n\t\t} elseif ($time[0] % 4 == 0) {\n\t\t\t$time[2] = 29;\n\t\t} else {\n\t\t\t$time[2] = 28;\n\t\t}\n\t}\n\n\t$tm = 86400.0*( $jd - (int)( $jd ) );\n\t$time[3] = (int)( $tm/3600.0 );\n\t$time[4] = (int)( ($tm - 3600.0*$time[3]) / 60.0 );\n\t$time[5] = (int)( $tm - 3600.0*$time[3] - 60*$time[4] );\n\n\treturn($time);\n}",
"private function getEristerMeeusJulian($year)\n {\n $a = $year % 4;\n $b = $year % 7;\n $c = $year % 19;\n $d = (19 * $c + 15) % 30;\n $e = (2 * $a + 4 * $b - $d + 34) % 7;\n\n $month = (int)floor(($d + $e + 114) / 31);\n $day = (int)(($d + $e + 114) % 31) + 1;\n\n return array($month, $day);\n }",
"function reservation_min_to_hours($value,$type=\"H:i\"){\n return gmdate($type,$value*60);\n}",
"public function getHourUTC()\n {\n $dateTime = $this->getDatetime();\n $hourInTz = Date::factory($dateTime, 'UTC')->toString('G');\n\n return $hourInTz;\n }",
"function jours($date1, $date2){\n\t\t\t$diff = abs($date1 - $date2); \n\t\t\t$retour = array();\n\t\t \n\t\t\t$tmp = $diff;\n\t\t\t$retour['second'] = $tmp % 60;\n\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['second']) /60 );\n\t\t\t$retour['minute'] = $tmp % 60;\n\t\t\t\n\t\t\t$tmp = floor( ($tmp - $retour['minute'])/60 );\n\t\t\t$retour['hour'] = $tmp % 24;\n\t\t\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['hour']) /24 );\n\t\t\t$retour['day'] = $tmp;\n\t\t\t\t \n\t\t\treturn $retour['day'];\n\t\t}",
"function jours($date1, $date2){\n\t\t\t$diff = abs($date1 - $date2); \n\t\t\t$retour = array();\n\t\t \n\t\t\t$tmp = $diff;\n\t\t\t$retour['second'] = $tmp % 60;\n\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['second']) /60 );\n\t\t\t$retour['minute'] = $tmp % 60;\n\t\t\t\n\t\t\t$tmp = floor( ($tmp - $retour['minute'])/60 );\n\t\t\t$retour['hour'] = $tmp % 24;\n\t\t\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['hour']) /24 );\n\t\t\t$retour['day'] = $tmp;\n\t\t\t\t \n\t\t\treturn $retour['day'];\n\t\t}",
"function jd_to_islamic($jd, &$mo, &$da, &$yr) {\n\t\t$jd = floor($jd)+0.5;\n\t\t$yr = floor(((30*($jd-ISLAMIC_EPOCH)) + 10646) / 10631);\n\n\t\t$mo = min(12, ceil(($jd-(29+islamic_to_jd(1,1,$yr)))/29.5)+1);\n\n\t\t$da = $jd - islamic_to_jd($mo,1,$yr) + 1;\n\n\t}",
"function hebrew_year_days($yr) {\n\t\treturn ( hebrew_to_jd(7, 1, $yr + 1) - hebrew_to_jd(7, 1, $yr) );\n\t}",
"function hour()\r\n {\r\n $value = $this->SecondsElapsed;\r\n\r\n $second = $value % 60;\r\n $value = ( $value - $second ) / 60;\r\n\r\n $minute = $value % 60;\r\n $value = ( $value - $minute ) / 60;\r\n\r\n $hour = $value % 24;\r\n\r\n return $hour;\r\n }",
"function minutos2horas($mins) {\nif ($mins < 0)\n\t$min = abs($mins);\nelse\n\t$min = $mins;\n \n$h = floor($min / 60);\n$m = ($min - ($h * 60)) / 100;\n$horas = $h + $m;\n \nif ($mins < 0)\n\t$horas *= -1;\n\n$sep = explode('.', $horas);\n$h = $sep[0];\nif (empty($sep[1]))\n\t$sep[1] = 00;\n\t$m = $sep[1];\n \nif (strlen($m) < 2)\n\t$m = $m . 0;\nreturn $h.':'.$m;\n }",
"function holiday ($yr=0)\n\t{\n\t\tif ($yr==0) $yr = (int)date(\"Y\");\n\t\t$this->bjd = gregorian_to_jd(1,1,$yr);\n\t\t$this->ejd = gregorian_to_jd(12,31,$yr);\n\n\t\t//add holidays easily define in the gregorian calendar\n\t\t$this->holidays = Array(\n\t\t\t\"newyearseve\" => gregorian_to_jd(12,31,$yr),\n\t\t\t\"valentinesday\"=> gregorian_to_jd(2,14,$yr),\n\t\t\t\"presidentsday\" => nth_weekday_jd(3,dMONDAY,2,$yr),\n\t\t\t\"stpatricksday\" => gregorian_to_jd(3,17,$yr),\n\t\t\t\"aprilfoolsday\" => gregorian_to_jd(4,1,$yr),\n\t\t\t\"cincodemayo\" => gregorian_to_jd(5,5,$yr),\n\t\t\t\"mothersday\" => nth_weekday_jd(2,dSUNDAY,5,$yr),\n\t\t\t\"memorialday\" => $this->memorialDay($yr),\n\t\t\t\"fathersday\" => nth_weekday_jd(3,dSUNDAY,6,$yr),\n\t\t\t\"fourthofjuly\" => gregorian_to_jd(7,4,$yr),\n\t\t\t\"laborday\" => nth_weekday_jd(1,dMONDAY,9,$yr),\n\t\t\t\"columbusday\" => nth_weekday_jd(2,dMONDAY,10,$yr),\n\t\t\t\"halloween\" => gregorian_to_jd(10,31,$yr), \n\t\t\t\"thanksgiving\" => nth_weekday_jd(4, dTHURSDAY, 11,$yr),\n\t\t\t\"christmas\" => gregorian_to_jd(12,24,$yr),\n\t\t\t\"christmasday\" => gregorian_to_jd(12,25,$yr),\n\t\t\t\"mardigras\" => easter_jd($yr,-47),\n\t\t\t\"easter\" =>\teaster_jd($yr)\n\t\t);\n\t\t\t\n\t\tasort($this->holidays);\n\t}",
"function to24hour($hour2){\n\t\treturn DATE(\"H:i\", STRTOTIME($hour2));\n\t}",
"function get_hora_bd($hora){\n\t$h = substr($hora,0,2);\n\t$m = substr($hora,3,2);\n\t$meridiano = substr($hora,-2,2);\n\tif($meridiano == 'pm'){\n\t\t$h = $h + 12;\n\t\t$h = $h.':'.$m.':00';\n\t}else{\n\t\t$h = $h.':'.$m.':00';\n\t}\n\treturn $h;\n}",
"function hari($tanggal)\n{\n $hari = [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"];\n // tentukan nama hari\n $nama_hari = date('w', strtotime($tanggal));\n // kembalikan nama hari\n return $hari[$nama_hari];\n}",
"function IntToJs ($i) {\n\tGlobal $iTimeType;\n\tif ($iTimeType == 1) return $i;\n\t\n\t$n = $i % 100;\n\t$i = (int)($i / 100);\n\t$h = $i % 100;\n\t$i = (int)($i / 100);\n\t$d = $i % 50;\n\t$i = (int)($i / 50);\n\t$m = ($i % 20) -1;\n\t$i = (int)($i / 20);\n\t$y = ($i % 1000) + 2000;\n\treturn mktime($h,$n,0,$m,$d,$y);\n}",
"public static function getJalali($g_y, $g_m, $g_d) {\n $gy = $g_y - 1600;\n $gm = $g_m - 1;\n $g_day_no = (365 * $gy + static::div($gy + 3, 4) - static::div($gy + 99, 100) + static::div($gy + 399, 400));\n for ($i = 0; $i < $gm; ++$i) {\n $g_day_no += static::$daysMonthGregorian[$i];\n }\n if ($gm > 1 && (($gy % 4 == 0 && $gy % 100 != 0) || ($gy % 400 == 0)))\n # leap and after Feb\n $g_day_no ++;\n $g_day_no += $g_d - 1;\n $j_day_no = $g_day_no - 79;\n $j_np = static::div($j_day_no, 12053); # 12053 = (365 * 33 + 32 / 4)\n $j_day_no = $j_day_no % 12053;\n $jy = (979 + 33 * $j_np + 4 * static::div($j_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)\n $j_day_no %= 1461;\n if ($j_day_no >= 366) {\n $jy += static::div($j_day_no - 1, 365);\n $j_day_no = ($j_day_no - 1) % 365;\n }\n for ($i = 0; ($i < 11 && $j_day_no >= static::$daysMonthJalali[$i]); ++$i) {\n $j_day_no -= static::$daysMonthJalali[$i];\n }\n return array($jy, $i + 1, $j_day_no + 1);\n }",
"function p2g($j_y, $j_m, $j_d){\n $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $jy = $j_y-979;\n $jm = $j_m-1;\n $jd = $j_d-1;\n $j_day_no = 365*$jy + floor($jy/33)*8 + floor(($jy%33+3)/4);\n for ($i=0; $i < $jm; ++$i){\n $j_day_no += $j_days_in_month[$i];\n }\n $j_day_no += $jd;\n $g_day_no = $j_day_no+79;\n $gy = 1600 + 400*floor($g_day_no/146097);\n $g_day_no = $g_day_no % 146097;\n $leap = true;\n if ($g_day_no >= 36525){\n $g_day_no--;\n $gy += 100*floor($g_day_no/36524);\n $g_day_no = $g_day_no % 36524;\n if ($g_day_no >= 365){\n $g_day_no++;\n }else{\n $leap = false;\n }\n }\n $gy += 4*floor($g_day_no/1461);\n $g_day_no %= 1461;\n if ($g_day_no >= 366){\n $leap = false;\n $g_day_no--;\n $gy += floor($g_day_no/365);\n $g_day_no = $g_day_no % 365;\n }\n for ($i = 0; $g_day_no >= $g_days_in_month[$i] + ($i == 1 && $leap); $i++){\n $g_day_no -= $g_days_in_month[$i] + ($i == 1 && $leap);\n }\n $gm = $i+1;\n $gd = $g_day_no+1;\n\n return array($gy, $gm, $gd);\n}",
"function hari_ini($hari){\n \n switch($hari){\n case 'Sun':\n $hari_ini = \"Ahad\";\n break;\n \n case 'Mon':\t\t\t\n $hari_ini = \"Senin\";\n break;\n \n case 'Tue':\n $hari_ini = \"Selasa\";\n break;\n \n case 'Wed':\n $hari_ini = \"Rabu\";\n break;\n \n case 'Thu':\n $hari_ini = \"Kamis\";\n break;\n \n case 'Fri':\n $hari_ini = \"Jumat\";\n break;\n \n case 'Sat':\n $hari_ini = \"Sabtu\";\n break;\n \n default:\n $hari_ini = \"Tidak di ketahui\";\t\t\n break;\n }\n \n return $hari_ini;\n \n }",
"function hebrew_to_jd($mo, $da, $yr) {\n\n\t\t$mos = hebrew_year_months($yr);\n\n\t\t$jd = HEBREW_EPOCH + hebrew_delay_1($yr) + hebrew_delay_2($yr) + $da + 1;\n\n\t\tif ($mo < 7 ) {\n\t\t\tfor ($m = 7; $m <= $mos; $m++) $jd += hebrew_month_days($m, $yr);\n\t\t\tfor ($m = 1; $m < $mo; $m++) $jd += hebrew_month_days($m, $yr);\n\t\t} else {\n\t\t\tfor ($m = 7; $m < $mo; $m++ ) $jd += hebrew_month_days($m, $yr);\n\t\t}\n\n\t\treturn ($jd);\n\t}",
"function dia ($hra){\r\t\tif ($hra==1 || $hra==7 || $hra==13 || $hra==19 || $hra==25 || $hra==31 || $hra==37 || $hra==43 || $hra==49)\r\t\t{\r\t\treturn 'Lunes';\t\r\t\t}else {\r\t\t\tif ($hra==2 || $hra==8 || $hra==14 || $hra==20 || $hra==26 || $hra==32 || $hra==38 || $hra==44 || $hra==50)\r\t\t{\r\t\treturn 'Martes';\t\r\t\t}else {\r\t\t\tif ($hra==3 || $hra==9 || $hra==15 || $hra==21 || $hra==27 || $hra==33 || $hra==39 || $hra==45 || $hra==51)\r\t\t{\r\t\treturn 'Miercoles';\t\r\t\t}else {\r\t\t\tif ($hra==4 || $hra==10 || $hra==16 || $hra==22 || $hra==28 || $hra==34 || $hra==340 || $hra==46 || $hra==52)\r\t\t{\r\t\treturn 'Jueves';\t\r\t\t}else {\r\t\t\tif ($hra==5 || $hra==11 || $hra==17 || $hra==23 || $hra==29 || $hra==35 || $hra==41 || $hra==47 || $hra==53)\r\t\t{\r\t\treturn 'Viernes';\t\r\t\t}else {\r\t\t\tif ($hra==6 || $hra==12 || $hra==18 || $hra==24 || $hra==30 || $hra==36 || $hra==42 || $hra==48 || $hra==54)\r\t\t{\r\t\treturn 'Sabado';\t\r\t\t}\r\t\t}\r\t\t}\r\t\t}\r\t\t}\r\t\t}\r\t}",
"function get_cell_hours($hour)\n\t{\n\t\t$hour = ($hour-1)%12+1;\n\t\t$am = $hour > 7 ? 'AM' : 'PM';\n\t\t\n\t\treturn \"<td class='hour' rowspan='4'>\n\t\t\t\t\t<p class='hour'>$hour</p>\n\t\t\t\t\t<p class='$am'>$am</p>\n\t\t\t\t</td>\";\n\t}",
"public function get_time_hour() {\n return sprintf( '%02d', (int) edd_get_option( 'edd_commissions_payout_schedule_time_hr', '' ) );\n }",
"function to12hour($hour1){\n\t\treturn DATE(\"g:i a\", STRTOTIME($hour1));\n\t}",
"function secs_to_h($secs)\n{\n$units = array(\n\"week\" => 7*24*3600,\n\"day\" => 24*3600,\n\"hour\" => 3600,\n\"minute\" => 60,\n\"second\" => 1);\n// specifically handle zero, or a value less than 1 if it's a floating point number\n//Trying out handling anything less than a minute.\nif ($secs < 60)\nreturn \"$secs seconds\";\n$s = \"\";\nforeach ( $units as $name => $divisor )\n{\nif ($name == \"second\")\n{\n$quot = round($secs / $divisor, 2);\n}\nelse\n{\n$quot = intval($secs / $divisor);\n}\nif ($quot)\n{\n$s .= \"$quot $name\";\n$s .= (abs($quot) > 1 ? \"s\" : \"\") . \", \";\n$secs -= $quot * $divisor;\n}\n}\nreturn substr($s, 0, -2);\n}",
"public function vr_hora()\n {\n\n $valor=$this->vr_hora;\n\n if ($this->id_tipotitulo == 3)\n {\n $valor='10208';\n } elseif ($this->id_tipotitulo == 4) {\n $valor='15122';\n } elseif ($this->id_tipotitulo == 5) {\n $valor='19096';\n } elseif ($this->id_tipotitulo == 7) {\n $valor='23252';\n } elseif ($this->id_tipotitulo == 10) {\n $valor='27014';\n } elseif ($this->id_tipotitulo == 9) {\n $valor='10208';\n } elseif ($this->id_tipotitulo == 11) {\n $valor='10208'; }\n elseif ($this->id_tipotitulo == 12) {\n $valor='0';\n }\n\n\n return $valor;\n\n }",
"public function generate_hours() {\n\n\t\t\t$schema = get_theme_mod( 'schema' );\n\n\t\t\t$hours = isset( $schema['openingHoursSpecification'] ) ? $schema['openingHoursSpecification'] : false;\n\n\t\t\tif ( !$hours ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$DAYS = array( 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' );\n\t\t\t\n\t\t\tforeach( $DAYS as $day ) {\n\t\t\t\tforeach( $hours as $period ) {\n\t\t\t\t\tif ( in_array( $day, $period['dayOfWeek'] ) ) {\n\t\t\t\t\t\tif ( '00:00' === $period['opens'] ) {\n\t\t\t\t\t\t\tif ( '00:00' === $period['closes'] ) {\n\t\t\t\t\t\t\t\t$return[$day][0] = 'Closed';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( '23:59' === $period['closes'] ) {\n\t\t\t\t\t\t\t\t$return[$day][0] = 'Open 24 hours';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$return[$day][0] = $period['opens'];\n\t\t\t\t\t\t$return[$day][1] = $period['closes'];\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\treturn $return;\n\t\t}",
"function get_hour()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"hours\"];\n }",
"public static function gengo($year)\n {\n if ($year >= 1911 && $year <= 1925) {\n $no = $year - 1911;\n\n return \"大正\" . $no;\n }\n\n // tinh nam shouwa ex: value - 1925\n if ($year > 1925 && $year <= 1988) {\n $no = $year - 1925;\n\n return \"昭和\" . $no;\n }\n // tinh nam heisei\n if ($year >= 1989) {\n $no = $year - 1988;\n\n return \"平成\" . $no;\n }\n\n return $year;\n }",
"function stampToHour($stamp)\n {\n $date = Calendar_Engine_PearDate::stampCollection($stamp);\n return (int)$date->hour;\n }",
"public static function minutesToHours($mins){\n \t\n\t $hours = floor($mins / 60);\n\t $minutes = $mins - ($hours * 60);\n\n\t if (!$minutes) {\n\t \t$minutes = \"00\";\n\t }elseif ($minutes <= 9) {\n\t \t$minutes = \"0\" . $minutes;\n\t }\n\n \treturn (\"$hours:$minutes\");\n \t\n }",
"function convertToHoursMins($time, $format = '%02d:%02d') \n {\n if ($time < 1) {\n return;\n }\n $hours = floor($time / 60);\n $minutes = ($time % 60);\n $result['hours'] = $hours;\n $result['minutes'] = $minutes;\n return $result;\n }",
"public function _convertToHours($minutes = 0) {\n if ($minutes == 0) {\n return '0';\n }\n $hours = $minutes / 60;\n $hours = round($hours, 2);\n return $hours;\n }",
"function exibirDataHoraBr($data){\n\t$timestamp = strtotime($data); \n\treturn date('d/m/y - H:i:s', $timestamp);\t\n}",
"private function getTijd($datum_tijd) {\n date_default_timezone_set('Europe/London');\n $tijd = date('H:i', strtotime($datum_tijd));\n return $tijd;\n }",
"function convert_date_to_kh_date($date_string, $splitted_by = '.')\n{\n if (odm_language_manager()->get_current_language() == 'km') {\n $splitted_date = explode($splitted_by, $date_string);\n $joined_date = '';\n if (count($splitted_date) > 1) {\n if (strlen($date_string) == 7) {\n $month_year = $splitted_date;\n if ($month_year[0] != '00') {\n $joined_date .= ' ខែ'.convert_to_kh_month($month_year[0]);\n }\n if ($month_year[1] != '0000') {\n $joined_date .= ' ឆ្នាំ'.convert_to_kh_number($month_year[1]);\n }\n } else {\n $day_month_year = $splitted_date;\n if ($day_month_year[0] != '00') {\n $joined_date .= 'ថ្ងៃទី '.convert_to_kh_number($day_month_year[0]);\n }\n if ($day_month_year[1] != '00') {\n $joined_date .= ' ខែ'.convert_to_kh_month($day_month_year[1]);\n }\n if ($day_month_year[2] != '0000') {\n $joined_date .= ' ឆ្នាំ'.convert_to_kh_number($day_month_year[2]);\n }\n }\n } else {\n if (strlen($date_string) == 4) {\n $joined_date = ' ឆ្នាំ'.convert_to_kh_number($date_string);\n }\n }\n\n return $joined_date;\n } else {\n $return_date = date('d F Y', strtotime($date_string));\n\n return $my_date;\n }\n}",
"function implode_date($h, $i=0, $s=0, $m=0, $d=0, $y=0)\n\t{\n\t\t$xtime = $this->cast($h, $i, $s, $m, $d, $y);\n\t\treturn ($xtime['y'] < 0 ? '-' : '') . str_pad((string) abs($xtime['y']), 4, '0', STR_PAD_LEFT) . sprintf('%02d%02d', $xtime['m'], $xtime['d']);\n\t}",
"function parse_minutes_to_hours($minutes) {\n $h = floor($minutes / 60);\n $m = $minutes % 60;\n $m = $m < 10 ? '0' . $m : $m;\n\n return $h . \"h\" . $m;\n}",
"public static function timeToInt($hora) {\n $hr = explode(':', $hora);\n return ($hr[0] * 3600) + ($hr[1] * 60) + $hr[2];\n }",
"function m2h($mins) {\n if ($mins < 0)\n $min = abs($mins); \n else\n $min = $mins; \n \n // Arredonda a hora\n $h = floor($min / 60); \n $m = ($min - ($h * 60)) / 100; \n $horas = $h + $m; \n \n // Matemática da quinta série\n // Detalhe: Aqui também pode se usar o abs()\n if ($mins < 0)\n $horas *= -1; \n \n // Separa a hora dos minutos\n $sep = explode('.', $horas); \n $h = $sep[0]; \n if (empty($sep[1]))\n $sep[1] = 0; \n \n $m = $sep[1]; \n \n // Aqui um pequeno artifício pra colocar um zero no final\n if (strlen($m) < 2)\n $m = $m . 0; \n if($h > 0){\n\t\t\treturn sprintf('%2dh e %2dm', $h, $m);\n }else{\n\t\t\treturn sprintf('%2dm', $m);\n\t\t}\t\n}",
"public function finishPersian()\n {\n $verta = new \\Verta($this->finish);\n\n $result = $verta->format('Y-n-j H:i');\n\n return $result;\n }",
"function jd_to_weekday($jd) {\n\t\treturn ( floor( ($jd+8.5) % 7 ) );\n\t}",
"function persian_date_utf($format, $timestamp='') {\n\n if($timestamp==''){\n $timestamp = mktime();\n }\n\n $g_d=date('j', $timestamp);\n $g_m=date('n', $timestamp);\n $g_y=date('Y', $timestamp);\n\n list($jy, $jm, $jd, $j_all_days) = g2p($g_y, $g_m, $g_d);\n\n $j_days_in_month = array(0, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $leap = 0;\n if ($g_m>1 && (($g_y%4==0 && $g_y%100!=0) || ($g_y%400==0))){\n $j_days_in_month[12]++;\n $leap = 1;\n }\n\n $j_month_name = array('', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر',\n 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند');\n $j_week_name = array('Saturday' => 'شنبه',\n 'Sunday' => 'یک شنبه',\n 'Monday' => 'دوشنبه',\n 'Tuesday' => 'سه شنبه',\n 'Wednesday' => 'چهارشنبه',\n 'Thursday' => 'پنج شنبه',\n 'Friday' => 'جمعه',\n 'Sat' => 'ش',\n 'Sun' => 'ی',\n 'Mon' => 'د',\n 'Tue' => 'س',\n 'Wed' => 'چ',\n 'Thu' => 'پ',\n 'Fri' => 'ج');\n $j_week_number = array('Sat' => '1',\n 'Sun' => '2',\n 'Mon' => '3',\n 'Tue' => '4',\n 'Wed' => '5',\n 'Thu' => '6',\n 'Fri' => '7');\n\n // calculate string\n $output_str='';\n\n for ($i=0; $i<strlen($format); $i++){\n\n if($format[$i]!='\\\\'){\n switch($format[$i]){\n case 'd':\n if($jd<10) $output_str.='0'.$jd; else $output_str.=$jd;\n break;\n case 'j':\n $output_str.=$jd;\n break;\n case 'D':\n case 'S':\n $output_str.=$j_week_name[date('D', $timestamp)];\n break;\n case 'l':\n $output_str.=$j_week_name[date('l', $timestamp)];\n break;\n case 'w':\n case 'N':\n $output_str.=$j_week_number[date('D', $timestamp)];\n break;\n case 'z':\n $output_str.=sprintf('%03d', $j_all_days);\n break;\n case 'W':\n $output_str.=floor(($j_all_days+1)/7);\n break;\n case 'F':\n case 'M':\n $output_str.=$j_month_name[$jm];\n break;\n case 'm':\n if($jm<10) $output_str.='0'.$jm; else $output_str.=$jm;\n break;\n case 'n':\n $output_str.=$jm;\n break;\n case 't':\n $output_str.=$j_days_in_month[$jm];\n break;\n case 'L':\n $output_str.=$leap;\n break;\n case 'o':\n case 'Y':\n $output_str.=$jy;\n break;\n case 'y':\n $output_str.=$jy-(floor($jy/100)*100);\n break;\n case 'a':\n case 'A':\n if(date('a', $timestamp)=='pm') $output_str.='بعد از ظهر'; else $output_str.='قبل از ظهر';\n break;\n case 'B':\n $output_str.=date('B', $timestamp);\n break;\n case 'g':\n $output_str.=date('g', $timestamp);\n break;\n case 'G':\n $output_str.=date('G', $timestamp);\n break;\n case 'h':\n $output_str.=date('h', $timestamp);\n break;\n case 'H':\n $output_str.=date('H', $timestamp);\n break;\n case 'i':\n $output_str.=date('i', $timestamp);\n break;\n case 's':\n $output_str.=date('s', $timestamp);\n break;\n case 'e':\n $output_str.=date('e', $timestamp);\n break;\n case 'I':\n $output_str.=date('I', $timestamp);\n break;\n case 'O':\n $output_str.=date('O', $timestamp);\n break;\n case 'Z':\n $output_str.=date('Z', $timestamp);\n break;\n case 'c':\n $output_str.=persian_date_utf('d-m-Y\\TH:i:sO', $timestamp);\n break;\n case 'r':\n $output_str.=persian_date_utf('D، j F Y H:i:s O', $timestamp);\n break;\n case 'U':\n $output_str.=date('U', $timestamp);\n break;\n default:\n $output_str.=$format[$i];\n break;\n }\n } else {\n $i++;\n $output_str.=$format[$i];\n }\n }\n\n return $output_str;\n}",
"public function getKieToiletHaid()\n {\n return $this->kie_toilet_haid;\n }",
"function persian_strftime_utf($format, $timestamp='') {\n\n if($timestamp==''){\n $timestamp = mktime();\n }\n\n $g_d=date('j', $timestamp);\n $g_m=date('n', $timestamp);\n $g_y=date('Y', $timestamp);\n\n list($jy, $jm, $jd, $j_all_days) = g2p($g_y, $g_m, $g_d);\n\n $j_month_name = array('', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر',\n 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند');\n $j_week_name = array('Saturday' => 'شنبه',\n 'Sunday' => 'یک شنبه',\n 'Monday' => 'دوشنبه',\n 'Tuesday' => 'سه شنبه',\n 'Wednesday' => 'چهارشنبه',\n 'Thursday' => 'پنج شنبه',\n 'Friday' => 'جمعه',\n 'Sat' => 'ش',\n 'Sun' => 'ی',\n 'Mon' => 'د',\n 'Tue' => 'س',\n 'Wed' => 'چ',\n 'Thu' => 'پ',\n 'Fri' => 'ج');\n $j_week_number = array('Sat' => '1',\n 'Sun' => '2',\n 'Mon' => '3',\n 'Tue' => '4',\n 'Wed' => '5',\n 'Thu' => '6',\n 'Fri' => '7');\n\n // calculate string\n $output_str='';\n\n for ($i=0; $i<strlen($format); $i++){\n\n if($format[$i]=='%'){\n $i++;\n switch($format[$i]){\n case 'a':\n $output_str.=$j_week_name[date('D', $timestamp)];\n break;\n case 'A':\n $output_str.=$j_week_name[date('l', $timestamp)];\n break;\n case 'b':\n case 'B':\n case 'h':\n $output_str.=$j_month_name[$jm];\n break;\n case 'c':\n $output_str.=persian_strftime_utf('%y/%m/%d %I:%M:%S', $timestamp);\n break;\n case 'C':\n $output_str.=floor($jy/100);\n break;\n case 'd':\n if($jd<10) $output_str.='0'.$jd; else $output_str.=$jd;\n break;\n case 'D':\n $output_str.=$jy.'/'.$jm.'/'.$jd;\n break;\n case 'e':\n if($jd<10) $output_str.=' '.$jd; else $output_str.=$jd;\n break;\n case 'H':\n $output_str.=date('H', $timestamp);\n break;\n case 'I':\n $output_str.=date('h', $timestamp);\n break;\n case 'j':\n $output_str.=sprintf('%03d', $j_all_days);\n break;\n case 'm':\n if($jm<10) $output_str.='0'.$jm; else $output_str.=$jm;\n break;\n case 'M':\n $output_str.=date('i', $timestamp);\n break;\n case 'n':\n $output_str.=\"\\n\";\n break;\n case 'r':\n case 'p':\n if(date('a',$timestamp)=='pm') $output_str.='بعد از ظهر'; else $output_str.='قبل از ظهر';\n break;\n case 'R':\n $output_str.=strftime('%R', $timestamp);\n break;\n case 'S':\n $output_str.=date('s', $timestamp);\n break;\n case 't':\n $output_str.=\"\\t\";\n break;\n case 'U':\n case 'V':\n case 'W':\n $output_str.=sprintf('%02d', floor(($j_all_days+1)/7));\n break;\n case 'u':\n case 'w':\n $output_str.=$j_week_number[date('D', $timestamp)];\n break;\n case 'x':\n $output_str.=persian_strftime_utf('%y/%m/%d', $timestamp);\n break;\n case 'X':\n $output_str.=persian_strftime_utf('%I:%M:%S', $timestamp);\n break;\n case 'g':\n case 'y':\n $output_str.=$jy-(floor($jy/100)*100);\n break;\n case 'G':\n case 'Y':\n $output_str.=$jy;\n break;\n case 'z':\n case 'Z':\n $output_str.=strftime('%z', $timestamp);\n break;\n case '%':\n $output_str.='%';\n break;\n }\n }else{\n $output_str.=$format[$i];\n }\n }\n\n return $output_str;\n}",
"public function startPersian()\n {\n $verta = new \\Verta($this->start);\n\n $result = $verta->format('Y-n-j H:i');\n\n return $result;\n }",
"public function getHora() {\n\t\treturn $this->Hora;\n\t}",
"public function getHari()\n {\n return $this->hari;\n }",
"public function getHora () {\n return $this->sHora;\n }",
"function dateToTH($day){\n\t\tfor($i=0; $i<7; $i++){\n\t\t\tif($day==$this->dayEN[$i]){\n\t\t\t\treturn $this->dayTH[$i];\n\t\t\t}\n\t\t}\n\t}",
"function tanggalIndonesia($time_, $hari_ = true, $waktu_ = false) {\n\t\t$hari=\"\";\n\t\tif ($hari_) {\n\t\t\tswitch (date(\"w\", $time_)) {\n\t\t\t\tcase \"0\" : $hari=\"Minggu, \";break;\n\t\t\t\tcase \"1\" : $hari=\"Senin, \";break;\n\t\t\t\tcase \"2\" : $hari=\"Selasa, \";break;\n\t\t\t\tcase \"3\" : $hari=\"Rabu, \";break;\n\t\t\t\tcase \"4\" : $hari=\"Kamis, \";break;\n\t\t\t\tcase \"5\" : $hari=\"Jumat, \";break;\n\t\t\t\tcase \"6\" : $hari=\"Sabtu, \";break;\n\t\t\t}\n\t\t}\n\n\t\tswitch (date(\"m\", $time_)) {\n\t\t\tcase \"1\" : $bulan=\"Januari\";break;\n\t\t\tcase \"2\" : $bulan=\"Februari\";break;\n\t\t\tcase \"3\" : $bulan=\"Maret\";break;\n\t\t\tcase \"4\" : $bulan=\"April\";break;\n\t\t\tcase \"5\" : $bulan=\"Mei\";break;\n\t\t\tcase \"6\" : $bulan=\"Juni\";break;\n\t\t\tcase \"7\" : $bulan=\"Juli\";break;\n\t\t\tcase \"8\" : $bulan=\"Agustus\";break;\n\t\t\tcase \"9\" : $bulan=\"September\";break;\n\t\t\tcase \"10\" : $bulan=\"Oktober\";break;\n\t\t\tcase \"11\" : $bulan=\"November\";break;\n\t\t\tcase \"12\" : $bulan=\"Desember\";break;\n\t\t}\n\t\t\n\t\treturn $hari. date(\"j\", $time_) .\" $bulan\". date(\" Y\", $time_).($waktu_ ? date(\", H:i:s\", $time_):\"\");\n\t}",
"function getDateJhjjmmtt() {\n\t\n\t$date \t= getdate();\n\t$year \t= $date['year'];\n\t$mon \t= $date['mon'];\n $day\t\t= $date['mday'];\n \n\tif( $mon < \"10\" ) \t\t$mon = \"0\".$mon;\n\tif( $day < \"10\" )\t\t$day = \"0\".$day;\n\t\n\t$moddate \t= $year.$mon.$day;\n\n\treturn $moddate;\n}",
"function gregorian_to_jd($mo, $da, $yr) {\n\n\t\treturn (\tGREGORIAN_EPOCH - 1 +\n\t\t\t\t\t365 * ($yr-1) +\n\t\t\t\t\tfloor(($yr-1)/4) -\n\t\t\t\t\tfloor(($yr-1)/100) +\n\t\t\t\t\tfloor(($yr-1)/400) +\n\t\t\t\t\tfloor((367 * $mo - 362) / 12 ) +\n\t\t\t\t\t(($mo <= 2) ? 0 : (leap_gregorian($yr) ? -1 : -2 )) +\n\t\t\t\t\t$da );\n\n\t}",
"function getCanHour0($jdn) {\n\t\treturn Qss_Lib_Const::$CAN[($jdn-1)*2 % 10];\n\t}",
"function happys_get_ja_day($arg) {\n \tswitch ($arg) {\n case 'Mon':\n $arg_ja = '月';\n break;\n case 'Tue':\n $arg_ja = '火';\n break;\n case 'Wed':\n $arg_ja = '水';\n break;\n \t\tcase 'Thu':\n $arg_ja = '木';\n break;\n case 'Fri':\n $arg_ja = '金';\n break;\n case 'Sat':\n $arg_ja = '土';\n break;\n \t\tcase 'Sun':\n $arg_ja = '日';\n break;\n \t}\n \treturn $arg_ja;\n }",
"function hebrew_delay_1($yr) {\n\n\t\t$mos = floor( ((235 * $yr) - 234 ) / 19);\n\t\t$parts = 12084 + 13753 * $mos;\n\t\t$day = $mos * 29 + floor($parts / 25920);\n\n\t\tif ( (3*($day+1) % 7) < 3 ) $day++;\n\n\t\treturn ($day);\n\t}",
"function _bluehrd_tgl($_tgl){\r\n return date(\"d-m-Y H:i\",strtotime($_tgl));\r\n }",
"function divHoras($hora,$registros) {\n\t$h1=substr($hora,0,-3);\n $m1=substr($hora,3,2);\n $minutos=(($h1*60)*60)+($m1*60);\n $dif=$minutos/$registros;\n $difm=floor($dif/60);\n\treturn $difm;\n\t \n}",
"private function format($tanggal)\n\t{\n\t\t// array inggris => indonesia \n\t\t$format = array(\n\t\t\t'Sun' => 'Minggu',\n\t\t\t'Mon' => 'Senin',\n\t\t\t'Tue' => 'Selasa',\n\t\t\t'Wed' => 'Rabu',\n\t\t\t'Thu' => 'Kamis',\n\t\t\t'Fri' => 'Jumat',\n\t\t\t'Sat' => 'Sabtu',\n\t\t\t'Jan' => 'Januari',\n\t\t\t'Feb' => 'Februari',\n\t\t\t'Mar' => 'Maret',\n\t\t\t'Apr' => 'April',\n\t\t\t'May' => 'Mei',\n\t\t\t'Jun' => 'Juni',\n\t\t\t'Jul' => 'Juli',\n\t\t\t'Aug' => 'Agustus',\n\t\t\t'Sep' => 'September',\n\t\t\t'Oct' => 'Oktober',\n\t\t\t'Nov' => 'November',\n\t\t\t'Dec' => 'Desember'\n\t\t);\n\n\t\treturn strtr($tanggal, $format);\n\t}",
"private function dateDuJour(){\n return date(\"Y-m-d\");\n }",
"function getGreetings(){\n /* This sets the $time variable to the current hour in the 24 hour clock format */\n $time = date(\"H\");\n /* Set the $timezone variable to become the current timezone */\n $timezone = date(\"e\");\n /* If the time is less than 1200 hours, show good morning */\n if ($time < \"12\") {\n return \"GM\";\n }\n /* If the time is grater than or equal to 1200 hours, but less than 1700 hours, so good afternoon */\n else if ($time >= \"12\" && $time < \"17\") {\n\n return \"GA\";\n }\n /* Should the time be between or equal to 1700 and 1900 hours, show good evening */\n else if ($time >= \"17\" && $time < \"19\") {\n return \"GE\";\n }\n /* Finally, show good night if the time is greater than or equal to 1900 hours */\n\n else if ($time >= \"19\") {\n return \"GN\";\n }\n }",
"public function appendHr(): Hr;",
"private static function jtg($date)\n {\n $z = floor($date + 0.5);\n $a = floor(($z - 1867216.25) / 36524.25);\n $a = $z + 1 + $a - floor($a / 4);\n $b = $a + 1524;\n $c = floor(($b - 122.1) / 365.25);\n $d = floor(365.25 * $c);\n $e = floor(($b - $d) / 30.6001);\n $day = $b - $d - floor($e * 30.6001);\n $month = $e - ($e > 13.5 ? 13 : 1);\n $year = $c - ($month > 2.5 ? 4716 : 4715);\n\n $year = $year <= 0 ? $year-- : $year;\n\n return self::$date->setYear($year)->setMonth($month)->setDay($day);\n }"
] | [
"0.71889377",
"0.697227",
"0.6869283",
"0.668784",
"0.66581494",
"0.59770536",
"0.59620744",
"0.5860414",
"0.5798254",
"0.57149976",
"0.5642942",
"0.52831894",
"0.5256363",
"0.5247843",
"0.5230823",
"0.5226742",
"0.52052736",
"0.51164025",
"0.50938743",
"0.509317",
"0.5056252",
"0.5047866",
"0.5005181",
"0.49697858",
"0.49581382",
"0.49500343",
"0.4891646",
"0.48587808",
"0.48563266",
"0.48533183",
"0.47740516",
"0.47556478",
"0.47257143",
"0.4717006",
"0.47063985",
"0.47003138",
"0.46741375",
"0.4671998",
"0.46597075",
"0.4656322",
"0.46417913",
"0.4589136",
"0.4584391",
"0.4584391",
"0.45789286",
"0.45731074",
"0.45617947",
"0.45513678",
"0.45400444",
"0.45180202",
"0.45116603",
"0.45100644",
"0.44980103",
"0.44961482",
"0.44950116",
"0.44847885",
"0.44832087",
"0.4466324",
"0.445559",
"0.44545957",
"0.4443775",
"0.44385797",
"0.44355533",
"0.44327804",
"0.4430063",
"0.44258282",
"0.44141147",
"0.43993634",
"0.4391183",
"0.43904123",
"0.43839678",
"0.43817708",
"0.43791875",
"0.43598574",
"0.4357542",
"0.43555406",
"0.43549037",
"0.43517348",
"0.4342833",
"0.43426076",
"0.4323669",
"0.4291977",
"0.4285478",
"0.427808",
"0.42678738",
"0.42664966",
"0.4260718",
"0.42586958",
"0.42566568",
"0.42544758",
"0.42536014",
"0.42466268",
"0.4243294",
"0.4242034",
"0.42356712",
"0.42340863",
"0.42296144",
"0.4228812",
"0.42164934",
"0.42006046"
] | 0.49669415 | 24 |
Convert Hijri to Gregorian. | private static function htg($year, $month, $day)
{
$year = (int) $year;
$month = (int) $month;
$day = (int) $day;
$ii = $year - 1;
$iln = ($ii * 12) + 1 + ($month - 1);
$i = $iln - 16260;
$mcjdn = $day + self::$UQD[$i - 1] - 1;
$cjdn = $mcjdn + 2400000;
return self::jtg($cjdn);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getGregorianFromHijri(HijriDate $hijri): Carbon\n {\n $hijriYear = $hijri->getYear();\n $hijriMonth = $hijri->getMonth();\n $hijriDay = $hijri->getDay();\n\n // Hijri to Julian\n $julianDay = floor((11 * $hijriYear + 3) / 30) + floor(354 * $hijriYear) + floor(30 * $hijriMonth)\n - floor(($hijriMonth - 1) / 2) + $hijriDay + 1948440 - 386;\n\n // Julian to Gregorian\n $b = 0;\n if ($julianDay > 2299160) {\n $a = floor(($julianDay - 1867216.25) / 36524.25);\n $b = 1 + $a - floor($a / 4.0);\n }\n\n $bb = $julianDay + $b + 1524;\n $cc = floor(($bb - 122.1) / 365.25);\n $dd = floor(365.25 * $cc);\n $ee = floor(($bb - $dd) / 30.6001);\n\n $gregorianDay = ($bb - $dd) - floor(30.6001 * $ee);\n $gregorianMonth = $ee - 1;\n\n if ($ee > 13) {\n $cc += 1;\n $gregorianMonth = $ee - 13;\n }\n\n $gregorianYear = $cc - 4716;\n\n return Carbon::create($gregorianYear, $gregorianMonth, $gregorianDay, 0, 0, 0, '+5:00');\n }",
"public function getHijriFromGregorian(Carbon $gregorian): HijriDate\n {\n $gregorian->setTimezone('+5:00'); // Ensure it is in MVT\n $gregorian->startOfDay(); // Ensure it is at midnight (so time does not affect diffInDays())\n $formatter = IntlDateFormatter::create(\n 'en_US',\n IntlDateFormatter::FULL,\n IntlDateFormatter::FULL,\n 'Indian/Maldives',\n IntlCalendar::createInstance('Indian/Maldives', \"en_US@calendar=islamic\"),\n 'yyyy-MM-dd'\n );\n return HijriDate::parse($formatter->format($gregorian));\n }",
"public static function hijri($format = 'f' ,$date = null)\n {\n return Tawkit::fullHijri($date,$format); \n }",
"public function ToHijri()\n {\n\n\n }",
"public static function createFromGregorian($gregorian = null): HijriDate\n {\n if (is_null($gregorian)) $gregorian = now();\n if (is_string($gregorian)) $gregorian = Carbon::parse($gregorian);\n\n $hijri = self::getConverter()->getHijriFromGregorian($gregorian);\n $hijri->setGregorianDate($gregorian);\n return $hijri;\n }",
"static function jdToHijri($jd) {\n $jd = floor($jd) + 0.5;\n $year = floor(((30 * ($jd - HIJRI_EPOCH)) + 10646) / 10631);\n $month = min(12, ceil(($jd - (29 + self::hijriToJulian(1, 1, $year))) / 29.5) + 1);\n $day = ($jd - self::hijriToJulian($month, 1, $year)) + 1;\n\n return [\n 'Month' => $month,\n 'Day' => $day,\n 'Year' => $year\n ];\n }",
"function mc_gregorian_to_jalali($gy,$gm,$gd,$mod=''){\n $g_d_m=array(0,31,59,90,120,151,181,212,243,273,304,334);\n if($gy>1600){\n $jy=979;\n $gy-=1600;\n }else{\n $jy=0;\n $gy-=621;\n }\n $gy2=($gm>2)?($gy+1):$gy;\n $days=(365*$gy) +((int)(($gy2+3)/4)) -((int)(($gy2+99)/100)) +((int)(($gy2+399)/400)) -80 +$gd +$g_d_m[$gm-1];\n $jy+=33*((int)($days/12053)); \n $days%=12053;\n $jy+=4*((int)($days/1461));\n $days%=1461;\n if($days > 365){\n $jy+=(int)(($days-1)/365);\n $days=($days-1)%365;\n }\n $jm=($days < 186)?1+(int)($days/31):7+(int)(($days-186)/30);\n $jd=1+(($days < 186)?($days%31):(($days-186)%30));\n return($mod=='')?array($jy,$jm,$jd):$jy.$mod.$jm.$mod.$jd;\n}",
"public static function parse(string $hijri): HijriDate\n {\n if (!self::isParsable($hijri))\n throw new InvalidArgumentException(\"This date cannot be parsed as a Hijri date: $hijri\");\n\n $dateParts = explode(\"-\", $hijri);\n $hYear = (int) $dateParts[0];\n $hMonth = (int) $dateParts[1];\n $hDay = (int) $dateParts[2];\n\n return new self($hYear, $hMonth, $hDay);\n }",
"function jd_to_gregorian($jd, &$mo, &$da, &$yr) {\n\n\t\t$wjd = floor($jd - 0.5) + 0.5;\n\t\t$depoch = $wjd - GREGORIAN_EPOCH;\n\t\t$quadricent = floor($depoch / 146097);\n\t\t$dqc = $depoch % 146097;\n\t\t$cent = floor($dqc / 36524);\n\t\t$dcent = $dqc % 36524;\n\t\t$quad = floor($dcent / 1461);\n\t\t$dquad = $dcent % 1461;\n\t\t$yindex = floor($dquad / 365);\n\t\t$yr = $quadricent * 400 + $cent * 100 + $quad * 4 + $yindex;\n\n\t\tif (!(($cent == 4) || ($yindex == 4))) $yr++;\n\n\t\t$yearday = $wjd - gregorian_to_jd(1,1,$yr);\n\t\t$leapadj = (($wjd < gregorian_to_jd(3,1,$yr)) ? 0 : (leap_gregorian($yr) ? 1 : 2));\n\t\t$mo = floor(((($yearday + $leapadj) * 12) + 373) / 367);\n\t\t$da = $wjd - gregorian_to_jd($mo, 1, $yr) + 1;\n\n\t}",
"public static function getGregorian($j_y, $j_m, $j_d) {\n $jy = $j_y - 979;\n $jm = $j_m - 1;\n $j_day_no = (365 * $jy + static::div($jy, 33) * 8 + static::div($jy % 33 + 3, 4));\n for ($i = 0; $i < $jm; ++$i) {\n $j_day_no += static::$daysMonthJalali[$i];\n }\n $j_day_no += $j_d - 1;\n $g_day_no = $j_day_no + 79;\n $gy = (1600 + 400 * static::div($g_day_no, 146097)); # 146097 = (365 * 400 + 400 / 4 - 400 / 100 + 400 / 400)\n $g_day_no = $g_day_no % 146097;\n $leap = 1;\n if ($g_day_no >= 36525) { # 36525 = (365 * 100 + 100 / 4)\n $g_day_no --;\n $gy += (100 * static::div($g_day_no, 36524)); # 36524 = (365 * 100 + 100 / 4 - 100 / 100)\n $g_day_no = $g_day_no % 36524;\n if ($g_day_no >= 365) {\n $g_day_no ++;\n } else {\n $leap = 0;\n }\n }\n $gy += (4 * static::div($g_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)\n $g_day_no %= 1461;\n if ($g_day_no >= 366) {\n $leap = 0;\n $g_day_no --;\n $gy += static::div($g_day_no, 365);\n $g_day_no = ($g_day_no % 365);\n }\n for ($i = 0; $g_day_no >= (static::$daysMonthGregorian[$i] + ($i == 1 && $leap)); $i ++) {\n $g_day_no -= (static::$daysMonthGregorian[$i] + ($i == 1 && $leap));\n }\n return array($gy, $i + 1, $g_day_no + 1);\n }",
"function gregorian_to_jalali ($g_y, $g_m, $g_d)\n\t{\n\t\t$g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n\t\t$j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n\t\t$gy = $g_y-1600;\n\t\t$gm = $g_m-1;\n\t\t$gd = $g_d-1;\n\t\t$g_day_no = 365*$gy+$this->div($gy+3,4)-$this->div($gy+99,100)+$this->div($gy+399,400);\n\n\t\tfor ($i=0; $i < $gm; ++$i)\n\t\t\t$g_day_no += $g_days_in_month[$i];\n\t\t\n\t\tif ($gm>1 && (($gy%4==0 && $gy%100!=0) || ($gy%400==0)))\n\t\t\t$g_day_no++; /* leap and after Feb */\n\t\t\n\t\t$g_day_no += $gd;\n\t\t$j_day_no = $g_day_no-79;\n\t\t$j_np = $this->div($j_day_no, 12053); /* 12053 = 365*33 + 32/4 */\n\t\t$j_day_no = $j_day_no % 12053;\n\t\t$jy = 979+33*$j_np+4*$this->div($j_day_no,1461); /* 1461 = 365*4 + 4/4 */\n\t\t$j_day_no %= 1461;\n\t\t\n\t\tif($j_day_no >= 366)\n\t\t{\n\t\t\t$jy += $this->div($j_day_no-1, 365);\n\t\t\t$j_day_no = ($j_day_no-1)%365;\n\t\t}\n\t\t\n\t\tfor($i = 0; $i < 11 && $j_day_no >= $j_days_in_month[$i]; ++$i)\n\t\t\t$j_day_no -= $j_days_in_month[$i];\n\t\t\n\t\t$jm = $i+1;\n\t\t$jd = $j_day_no+1;\n\t\t\n\t\treturn array($jy, $jm, $jd);\n\t}",
"function jd_to_hebrew($jd, &$mo, &$da, &$yr) {\n\n\t\t$jd = floor($jd) + 0.5;\n\n\t\t$count = floor((($jd - HEBREW_EPOCH) * 98496.0) / 35975351.0);\n\t\t$yr = $count - 1;\n\n\t\t$jdtest = hebrew_to_jd(7,1,$count);\n\t\tfor ( $i = $count; $jd >= $jdtest; ) {\n\t\t\t$yr++;\n\t\t\t$jdtest = hebrew_to_jd(7,1,++$i);\n\t\t}\n\n\t\t$first = ($jd < hebrew_to_jd(1,1,$yr)) ? 7 : 1;\n\t\t$mo = $first;\n\n\t\t$jdtest = hebrew_to_jd($mo, hebrew_month_days($mo,$yr), $yr);\n\t\tfor ( $i = $first; $jd > $jdtest; ) {\n\t\t\t$mo++;\n\t\t\t$jdtest = hebrew_to_jd(++$i, hebrew_month_days($i,$yr), $yr);\n\t\t}\n\n\n\t\t$da = $jd - hebrew_to_jd($mo, 1, $yr) +1;\n\t}",
"public function toLunarHijriString($date, $format=\"YYYY/MM/DD\") {\n\t\t\t$DateConverter = new Hijri_GregorianConvert;\n\t\t\treturn $DateConverter->GregorianToHijri($date->format(\"Y-m-d\"),$format);\n\t\t}",
"public function gregorian_to_jalali($gy, $gm, $gd, $mod = '')\n {\n list($gy, $gm, $gd) = explode('_', tr_num($gy . '_' . $gm . '_' . $gd));/* <= Extra :اين سطر ، جزء تابع اصلي نيست */\n $g_d_m = array(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334);\n if ($gy > 1600) {\n $jy = 979;\n $gy -= 1600;\n } else {\n $jy = 0;\n $gy -= 621;\n }\n $gy2 = ($gm > 2) ? ($gy + 1) : $gy;\n $days = (365 * $gy) + ((int)(($gy2 + 3) / 4)) - ((int)(($gy2 + 99) / 100)) + ((int)(($gy2 + 399) / 400)) - 80 + $gd + $g_d_m[$gm - 1];\n $jy += 33 * ((int)($days / 12053));\n $days %= 12053;\n $jy += 4 * ((int)($days / 1461));\n $days %= 1461;\n $jy += (int)(($days - 1) / 365);\n if ($days > 365) $days = ($days - 1) % 365;\n if ($days < 186) {\n $jm = 1 + (int)($days / 31);\n $jd = 1 + ($days % 31);\n } else {\n $jm = 7 + (int)(($days - 186) / 30);\n $jd = 1 + (($days - 186) % 30);\n }\n return ($mod === '') ? array($jy, $jm, $jd) : $jy . $mod . $jm . $mod . $jd;\n }",
"static function hijriToJulian($month, $day, $year) {\n return ($day + ceil(29.5 * ($month - 1)) + ($year - 1) * 354 + floor((3 + (11 * $year)) / 30) + HIJRI_EPOCH) - 1;\n }",
"public function gregorian_to_jalali( $gy, $gm, $gd, $mod = '' ) {\n\t\t$g_d_m = array( 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 );\n\t\tif ( $gy > 1600 ) {\n\t\t\t$jy = 979;\n\t\t\t$gy -= 1600;\n\t\t} else {\n\t\t\t$jy = 0;\n\t\t\t$gy -= 621;\n\t\t}\n\t\t$gy2 = ( $gm > 2 ) ? ( $gy + 1 ) : $gy;\n\t\t$days = ( 365 * $gy ) + ( (int) ( ( $gy2 + 3 ) / 4 ) ) - ( (int) ( ( $gy2 + 99 ) / 100 ) ) + ( (int) ( ( $gy2 + 399 ) / 400 ) ) - 80 + $gd + $g_d_m[ $gm - 1 ];\n\t\t$jy += 33 * ( (int) ( $days / 12053 ) );\n\t\t$days %= 12053;\n\t\t$jy += 4 * ( (int) ( $days / 1461 ) );\n\t\t$days %= 1461;\n\t\tif ( $days > 365 ) {\n\t\t\t$jy += (int) ( ( $days - 1 ) / 365 );\n\t\t\t$days = ( $days - 1 ) % 365;\n\t\t}\n\t\t$jm = ( $days < 186 ) ? 1 + (int) ( $days / 31 ) : 7 + (int) ( ( $days - 186 ) / 30 );\n\t\t$jd = 1 + ( ( $days < 186 ) ? ( $days % 31 ) : ( ( $days - 186 ) % 30 ) );\n\n\t\treturn ( $mod == '' ) ? array( $jy, $jm, $jd ) : $jy . $mod . $jm . $mod . $jd;\n\t}",
"function get_hora_meridiano($hora){\n\t$hora = explode(\":\",$hora);\n\t$h = $hora[0];\n\t$m = $hora[1];\n\tif($h > 12){\n\t\t$h = $h - 12;\n\t\tif($h < 10){\n\t\t\t$h = '0'.$h;\n\t\t}\n\t\t$h = $h.':'.$m.' pm';\t\t\n\t}else{\n\t\tif($h == 12){\n\t\t\t$h = $h.':'.$m.' m';\n\t\t}else{\n\t\t\t$h = $h.':'.$m.' am';\n\t\t}\t\t\n\t}\n\treturn $h;\n}",
"function HumanToGregorian($day, $month, $year=0)\n {\n /**\n * Check to see if the year has been passed through.\n * If not get current year\n */\n if (empty($year)) {\n $dateinfo = getdate(time());\n $year = $dateinfo[\"year\"];\n }\n /**\n * We need to get the day of the year that we are currently at so that\n * we can work out the Gregorian Month and day\n */\n $DayOfYear = $month * 28;\n $DayOfYear += $day;\n /**\n * Human Calendar starts at 0, so we need to increment $DayOfYear\n * to take into account the day 00\n */\n $DayOfYear++;\n /**\n * the mktime() function will correctly calculate the date for out of\n * range values, so putting $DayOfYear instead of the day of the month\n * will work fine.\n */\n $GregorianTimeStamp = mktime(0, 0, 0, 1, $DayOfYear, $year);\n return $GregorianTimeStamp;\n }",
"function hitung_hari($awal,$akhir){\n\t\t$tglAwal = strtotime($awal);\n\t\t$tglAkhir = strtotime($akhir);\n\t\t$jeda = abs($tglAkhir - $tglAwal);\n\t\treturn floor($jeda/(60*60*24));\n\t}",
"private static function gth($year, $month, $day)\n {\n $year = (int) $year;\n $month = (int) $month - 1; // Month start with Zero\n $day = (int) $day;\n\n $y = $year;\n $m = $month + 1;\n\n // append January and February to the previous year (i.e. regard March as\n // the first month of the year in order to simplify leapday corrections)\n\n $y = $m < 3 ? --$y : $y;\n $m = $m < 3 ? $m += 12 : $m;\n\n // determine offset between Julian and Gregorian calendar\n\n $a = floor($y / 100.);\n $jgc = $a - floor($a / 4.) - 2;\n\n // compute Chronological Julian Day Number (CJDN)\n\n $cjdn = floor(365.25 * ($y + 4716)) + floor(30.6001 * ($m + 1)) + $day - $jgc - 1524;\n\n $a = floor(($cjdn - 1867216.25) / 36524.25);\n $jgc = $a - floor($a / 4.) + 1;\n $b = $cjdn + $jgc + 1524;\n $c = floor(($b - 122.1) / 365.25);\n $d = floor(365.25 * $c);\n $month = floor(($b - $d) / 30.6001);\n\n // compute Modified Chronological Julian Day Number (MCJDN)\n\n $mcjdn = $cjdn - 2400000;\n\n // the MCJDN's of the start of the lunations in the Umm al-Qura calendar are stored in 'islamcalendar_dat.js'\n\n $count = count(self::$UQD);\n for ($i = 0; $i < $count; ++$i) {\n if (self::$UQD[$i] > $mcjdn) {\n break;\n }\n }\n\n // compute and output the Umm al-Qura calendar date\n\n $iln = $i + 16260;\n $ii = floor(($iln - 1) / 12);\n $iy = $ii + 1;\n $im = $iln - 12 * $ii;\n $id = $mcjdn - self::$UQD[$i - 1] + 1;\n\n return self::$date->setYear($iy)->setMonth($im)->setDay($id);\n }",
"function getJulianDate()\r\n {\r\n return Data_Calc::dataJuliana($this->dia, $this->mes, $this->ano);\r\n }",
"function jd2date($jd)\n{\n\t$x0 = (int)( $jd+68570.0);\n\t$x1 = (int)( $x0/36524.25 );\n\t$x2 = $x0 - (int)( 36524.25*$x1 + 0.75 );\n\t$x3 = (int)( ( $x2+1 )/365.2425 );\n\t$x4 = $x2 - (int)( 365.25*$x3 )+31.0;\n\t$x5 = (int)( (int)($x4) / 30.59 );\n\t$x6 = (int)( (int)($x5) / 11.0 );\n\n\t$time[2] = $x4 - (int)( 30.59*$x5 );\n\t$time[1] = $x5 - 12*$x6 + 2;\n\t$time[0] = 100*( $x1-49 ) + $x3 + $x6;\n\n\t// Compensation on February 30\n\tif ($time[1] == 2 && $time[2] > 28) {\n\t\tif ($time[0] % 100 == 0 && $time[0] % 400 == 0) {\n\t\t\t$time[2] = 29;\n\t\t} elseif ($time[0] % 4 == 0) {\n\t\t\t$time[2] = 29;\n\t\t} else {\n\t\t\t$time[2] = 28;\n\t\t}\n\t}\n\n\t$tm = 86400.0*( $jd - (int)( $jd ) );\n\t$time[3] = (int)( $tm/3600.0 );\n\t$time[4] = (int)( ($tm - 3600.0*$time[3]) / 60.0 );\n\t$time[5] = (int)( $tm - 3600.0*$time[3] - 60*$time[4] );\n\n\treturn($time);\n}",
"function gregorianToHuman($day=0, $month=0, $year=0)\n {\n /**\n * Check to see if any of the arguments are empty\n * If they are then populate the $dateinfo array\n * Then check to see which arguments are empty and fill\n * those with the current date info\n */\n if ((empty($day) || (empty($month)) || empty($year))) {\n $dateinfo = getdate(time());\n }\n if (empty($day)) {\n $day = $dateinfo[\"mday\"];\n }\n if (empty($month)) {\n $month = $dateinfo[\"mon\"];\n }\n if (empty($year)) {\n $year = $dateinfo[\"year\"];\n }\n /**\n * We need to know how many days into the year we are\n */\n $dateinfo = getdate(mktime(0, 0, 0, $month, $day, $year));\n $dayofyear = $dateinfo[\"yday\"];\n /**\n * Human Calendar starts at 0 for months and the first day of the year\n * is designated 00, so we need to start our day of the year at 0 for\n * these calculations.\n * Also, the day of the month is calculated with a modulus of 28.\n * Because a day is 28 days, the last day of the month would have a\n * remainder of 0 and not 28 as it should be. Decrementing $dayofyear\n * gets around this.\n */\n $dayofyear--;\n /**\n * 28 days in a month...\n */\n $humanMonthOfYear = floor($dayofyear / 28);\n /**\n * If we are in the first month then the day of the month is $dayofyear\n * else we need to find the modulus of 28.\n */\n if ($humanMonthOfYear == 0) {\n $humanDayOfMonth = $dayofyear;\n } else {\n $humanDayOfMonth = ($dayofyear) % 28;\n }\n /**\n * Day of the week is modulus 7\n */\n $humanDayOfWeek = $dayofyear % 7;\n /**\n * We can now increment $dayofyear back to it's correct value for\n * the remainder of the calculations\n */\n $dayofyear++;\n /**\n * $humanDayOfMonth needs to be incremented now - recall that we fudged\n * it a bit by decrementing $dayofyear earlier\n * Same goes for $humanDayOfWeek\n */\n $humanDayOfMonth++;\n $humanDayOfWeek++;\n /**\n * Week of the month is day of the month divided by 7, rounded up\n * Same for week of the year, but use $dayofyear instead $humanDayOfMonth\n */\n $humanWeekOfMonth = ceil($humanDayOfMonth / 7);\n $humanWeekOfYear = ceil($dayofyear / 7);\n /**\n * Return an associative array of the values\n */\n return array(\n \"hdom\" => $humanDayOfMonth,\n \"hdow\" => $humanDayOfWeek,\n \"hwom\" => $humanWeekOfMonth,\n \"hwoy\" => $humanWeekOfYear,\n \"hmoy\" => $humanMonthOfYear );\n }",
"function hebrew_to_jd($mo, $da, $yr) {\n\n\t\t$mos = hebrew_year_months($yr);\n\n\t\t$jd = HEBREW_EPOCH + hebrew_delay_1($yr) + hebrew_delay_2($yr) + $da + 1;\n\n\t\tif ($mo < 7 ) {\n\t\t\tfor ($m = 7; $m <= $mos; $m++) $jd += hebrew_month_days($m, $yr);\n\t\t\tfor ($m = 1; $m < $mo; $m++) $jd += hebrew_month_days($m, $yr);\n\t\t} else {\n\t\t\tfor ($m = 7; $m < $mo; $m++ ) $jd += hebrew_month_days($m, $yr);\n\t\t}\n\n\t\treturn ($jd);\n\t}",
"function p2g($j_y, $j_m, $j_d){\n $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $jy = $j_y-979;\n $jm = $j_m-1;\n $jd = $j_d-1;\n $j_day_no = 365*$jy + floor($jy/33)*8 + floor(($jy%33+3)/4);\n for ($i=0; $i < $jm; ++$i){\n $j_day_no += $j_days_in_month[$i];\n }\n $j_day_no += $jd;\n $g_day_no = $j_day_no+79;\n $gy = 1600 + 400*floor($g_day_no/146097);\n $g_day_no = $g_day_no % 146097;\n $leap = true;\n if ($g_day_no >= 36525){\n $g_day_no--;\n $gy += 100*floor($g_day_no/36524);\n $g_day_no = $g_day_no % 36524;\n if ($g_day_no >= 365){\n $g_day_no++;\n }else{\n $leap = false;\n }\n }\n $gy += 4*floor($g_day_no/1461);\n $g_day_no %= 1461;\n if ($g_day_no >= 366){\n $leap = false;\n $g_day_no--;\n $gy += floor($g_day_no/365);\n $g_day_no = $g_day_no % 365;\n }\n for ($i = 0; $g_day_no >= $g_days_in_month[$i] + ($i == 1 && $leap); $i++){\n $g_day_no -= $g_days_in_month[$i] + ($i == 1 && $leap);\n }\n $gm = $i+1;\n $gd = $g_day_no+1;\n\n return array($gy, $gm, $gd);\n}",
"function gregorian_to_jd($mo, $da, $yr) {\n\n\t\treturn (\tGREGORIAN_EPOCH - 1 +\n\t\t\t\t\t365 * ($yr-1) +\n\t\t\t\t\tfloor(($yr-1)/4) -\n\t\t\t\t\tfloor(($yr-1)/100) +\n\t\t\t\t\tfloor(($yr-1)/400) +\n\t\t\t\t\tfloor((367 * $mo - 362) / 12 ) +\n\t\t\t\t\t(($mo <= 2) ? 0 : (leap_gregorian($yr) ? -1 : -2 )) +\n\t\t\t\t\t$da );\n\n\t}",
"function strtotime($inputtime)\n\t{\n\t\treturn strtotime(XoopsLocaleJalali::inputTimeToGregorian($inputtime));\n\t}",
"function persian_date_utf($format, $timestamp='') {\n\n if($timestamp==''){\n $timestamp = mktime();\n }\n\n $g_d=date('j', $timestamp);\n $g_m=date('n', $timestamp);\n $g_y=date('Y', $timestamp);\n\n list($jy, $jm, $jd, $j_all_days) = g2p($g_y, $g_m, $g_d);\n\n $j_days_in_month = array(0, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $leap = 0;\n if ($g_m>1 && (($g_y%4==0 && $g_y%100!=0) || ($g_y%400==0))){\n $j_days_in_month[12]++;\n $leap = 1;\n }\n\n $j_month_name = array('', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر',\n 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند');\n $j_week_name = array('Saturday' => 'شنبه',\n 'Sunday' => 'یک شنبه',\n 'Monday' => 'دوشنبه',\n 'Tuesday' => 'سه شنبه',\n 'Wednesday' => 'چهارشنبه',\n 'Thursday' => 'پنج شنبه',\n 'Friday' => 'جمعه',\n 'Sat' => 'ش',\n 'Sun' => 'ی',\n 'Mon' => 'د',\n 'Tue' => 'س',\n 'Wed' => 'چ',\n 'Thu' => 'پ',\n 'Fri' => 'ج');\n $j_week_number = array('Sat' => '1',\n 'Sun' => '2',\n 'Mon' => '3',\n 'Tue' => '4',\n 'Wed' => '5',\n 'Thu' => '6',\n 'Fri' => '7');\n\n // calculate string\n $output_str='';\n\n for ($i=0; $i<strlen($format); $i++){\n\n if($format[$i]!='\\\\'){\n switch($format[$i]){\n case 'd':\n if($jd<10) $output_str.='0'.$jd; else $output_str.=$jd;\n break;\n case 'j':\n $output_str.=$jd;\n break;\n case 'D':\n case 'S':\n $output_str.=$j_week_name[date('D', $timestamp)];\n break;\n case 'l':\n $output_str.=$j_week_name[date('l', $timestamp)];\n break;\n case 'w':\n case 'N':\n $output_str.=$j_week_number[date('D', $timestamp)];\n break;\n case 'z':\n $output_str.=sprintf('%03d', $j_all_days);\n break;\n case 'W':\n $output_str.=floor(($j_all_days+1)/7);\n break;\n case 'F':\n case 'M':\n $output_str.=$j_month_name[$jm];\n break;\n case 'm':\n if($jm<10) $output_str.='0'.$jm; else $output_str.=$jm;\n break;\n case 'n':\n $output_str.=$jm;\n break;\n case 't':\n $output_str.=$j_days_in_month[$jm];\n break;\n case 'L':\n $output_str.=$leap;\n break;\n case 'o':\n case 'Y':\n $output_str.=$jy;\n break;\n case 'y':\n $output_str.=$jy-(floor($jy/100)*100);\n break;\n case 'a':\n case 'A':\n if(date('a', $timestamp)=='pm') $output_str.='بعد از ظهر'; else $output_str.='قبل از ظهر';\n break;\n case 'B':\n $output_str.=date('B', $timestamp);\n break;\n case 'g':\n $output_str.=date('g', $timestamp);\n break;\n case 'G':\n $output_str.=date('G', $timestamp);\n break;\n case 'h':\n $output_str.=date('h', $timestamp);\n break;\n case 'H':\n $output_str.=date('H', $timestamp);\n break;\n case 'i':\n $output_str.=date('i', $timestamp);\n break;\n case 's':\n $output_str.=date('s', $timestamp);\n break;\n case 'e':\n $output_str.=date('e', $timestamp);\n break;\n case 'I':\n $output_str.=date('I', $timestamp);\n break;\n case 'O':\n $output_str.=date('O', $timestamp);\n break;\n case 'Z':\n $output_str.=date('Z', $timestamp);\n break;\n case 'c':\n $output_str.=persian_date_utf('d-m-Y\\TH:i:sO', $timestamp);\n break;\n case 'r':\n $output_str.=persian_date_utf('D، j F Y H:i:s O', $timestamp);\n break;\n case 'U':\n $output_str.=date('U', $timestamp);\n break;\n default:\n $output_str.=$format[$i];\n break;\n }\n } else {\n $i++;\n $output_str.=$format[$i];\n }\n }\n\n return $output_str;\n}",
"function get_hora_bd($hora){\n\t$h = substr($hora,0,2);\n\t$m = substr($hora,3,2);\n\t$meridiano = substr($hora,-2,2);\n\tif($meridiano == 'pm'){\n\t\t$h = $h + 12;\n\t\t$h = $h.':'.$m.':00';\n\t}else{\n\t\t$h = $h.':'.$m.':00';\n\t}\n\treturn $h;\n}",
"function jd_to_islamic($jd, &$mo, &$da, &$yr) {\n\t\t$jd = floor($jd)+0.5;\n\t\t$yr = floor(((30*($jd-ISLAMIC_EPOCH)) + 10646) / 10631);\n\n\t\t$mo = min(12, ceil(($jd-(29+islamic_to_jd(1,1,$yr)))/29.5)+1);\n\n\t\t$da = $jd - islamic_to_jd($mo,1,$yr) + 1;\n\n\t}",
"public function dayToHari($str)\n {\n $strTotime = strtotime($str);\n $tentukanHari = date('D', $strTotime);\n $day = array(\n 'Sun' => 'AKHAD',\n 'Mon' => 'SENIN',\n 'Tue' => 'SELASA',\n 'Wed' => 'RABU',\n 'Thu' => 'KAMIS',\n 'Fri' => 'JUMAT',\n 'Sat' => 'SABTU'\n );\n\n $hari = $day[$tentukanHari];\n return $hari;\n }",
"function hebrew_year_days($yr) {\n\t\treturn ( hebrew_to_jd(7, 1, $yr + 1) - hebrew_to_jd(7, 1, $yr) );\n\t}",
"private function dateDuJour(){\n return date(\"Y-m-d\");\n }",
"public function toGregorianString($date, $format=\"Y-m-d\") {\n\t\t\treturn $date->format($format);\n\t\t}",
"function horaire($horaire) {\r\n\t// affiche un nombre d'heures correctement formatté\r\n\t$horaire = ($horaire && $horaire !=='')? $horaire.\" h\":\"\";\r\n\treturn $horaire;\r\n}",
"function Hora_prog($valor){\t\n\n return date(\"H:i\", strtotime($valor));\n\n}",
"function jours($date1, $date2){\n\t\t\t$diff = abs($date1 - $date2); \n\t\t\t$retour = array();\n\t\t \n\t\t\t$tmp = $diff;\n\t\t\t$retour['second'] = $tmp % 60;\n\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['second']) /60 );\n\t\t\t$retour['minute'] = $tmp % 60;\n\t\t\t\n\t\t\t$tmp = floor( ($tmp - $retour['minute'])/60 );\n\t\t\t$retour['hour'] = $tmp % 24;\n\t\t\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['hour']) /24 );\n\t\t\t$retour['day'] = $tmp;\n\t\t\t\t \n\t\t\treturn $retour['day'];\n\t\t}",
"function jours($date1, $date2){\n\t\t\t$diff = abs($date1 - $date2); \n\t\t\t$retour = array();\n\t\t \n\t\t\t$tmp = $diff;\n\t\t\t$retour['second'] = $tmp % 60;\n\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['second']) /60 );\n\t\t\t$retour['minute'] = $tmp % 60;\n\t\t\t\n\t\t\t$tmp = floor( ($tmp - $retour['minute'])/60 );\n\t\t\t$retour['hour'] = $tmp % 24;\n\t\t\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['hour']) /24 );\n\t\t\t$retour['day'] = $tmp;\n\t\t\t\t \n\t\t\treturn $retour['day'];\n\t\t}",
"function formatear_hora($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$hora = substr($parametro, 11, 2);\n\t\t$minuto = substr($parametro, 14, 2);\n\t\t$dia = substr($parametro, 8, 2);\n\t\t$mes = substr($parametro, 5, 2);\n\t\t\n\t\t/* Generamos el formato */\n\t\t$temp = $hora.\":\".$minuto;\n\t\t\n\t\treturn $temp;\n\t}",
"public function getKieGuruHaid()\n {\n return $this->kie_guru_haid;\n }",
"function convert_date_to_kh_date($date_string, $splitted_by = '.')\n{\n if (odm_language_manager()->get_current_language() == 'km') {\n $splitted_date = explode($splitted_by, $date_string);\n $joined_date = '';\n if (count($splitted_date) > 1) {\n if (strlen($date_string) == 7) {\n $month_year = $splitted_date;\n if ($month_year[0] != '00') {\n $joined_date .= ' ខែ'.convert_to_kh_month($month_year[0]);\n }\n if ($month_year[1] != '0000') {\n $joined_date .= ' ឆ្នាំ'.convert_to_kh_number($month_year[1]);\n }\n } else {\n $day_month_year = $splitted_date;\n if ($day_month_year[0] != '00') {\n $joined_date .= 'ថ្ងៃទី '.convert_to_kh_number($day_month_year[0]);\n }\n if ($day_month_year[1] != '00') {\n $joined_date .= ' ខែ'.convert_to_kh_month($day_month_year[1]);\n }\n if ($day_month_year[2] != '0000') {\n $joined_date .= ' ឆ្នាំ'.convert_to_kh_number($day_month_year[2]);\n }\n }\n } else {\n if (strlen($date_string) == 4) {\n $joined_date = ' ឆ្នាំ'.convert_to_kh_number($date_string);\n }\n }\n\n return $joined_date;\n } else {\n $return_date = date('d F Y', strtotime($date_string));\n\n return $my_date;\n }\n}",
"function dia ($hra){\r\t\tif ($hra==1 || $hra==7 || $hra==13 || $hra==19 || $hra==25 || $hra==31 || $hra==37 || $hra==43 || $hra==49)\r\t\t{\r\t\treturn 'Lunes';\t\r\t\t}else {\r\t\t\tif ($hra==2 || $hra==8 || $hra==14 || $hra==20 || $hra==26 || $hra==32 || $hra==38 || $hra==44 || $hra==50)\r\t\t{\r\t\treturn 'Martes';\t\r\t\t}else {\r\t\t\tif ($hra==3 || $hra==9 || $hra==15 || $hra==21 || $hra==27 || $hra==33 || $hra==39 || $hra==45 || $hra==51)\r\t\t{\r\t\treturn 'Miercoles';\t\r\t\t}else {\r\t\t\tif ($hra==4 || $hra==10 || $hra==16 || $hra==22 || $hra==28 || $hra==34 || $hra==340 || $hra==46 || $hra==52)\r\t\t{\r\t\treturn 'Jueves';\t\r\t\t}else {\r\t\t\tif ($hra==5 || $hra==11 || $hra==17 || $hra==23 || $hra==29 || $hra==35 || $hra==41 || $hra==47 || $hra==53)\r\t\t{\r\t\treturn 'Viernes';\t\r\t\t}else {\r\t\t\tif ($hra==6 || $hra==12 || $hra==18 || $hra==24 || $hra==30 || $hra==36 || $hra==42 || $hra==48 || $hra==54)\r\t\t{\r\t\treturn 'Sabado';\t\r\t\t}\r\t\t}\r\t\t}\r\t\t}\r\t\t}\r\t\t}\r\t}",
"function convertir_hora_militar($seg_ini) {\n\n\t\t\t$horas = floor($seg_ini/3600);\n\t\t\t$minutos = floor(($seg_ini-($horas*3600))/60);\n\t\t\t\t\t\t\t\n\t\t\treturn $horas.\":\".$minutos;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"function holiday ($yr=0)\n\t{\n\t\tif ($yr==0) $yr = (int)date(\"Y\");\n\t\t$this->bjd = gregorian_to_jd(1,1,$yr);\n\t\t$this->ejd = gregorian_to_jd(12,31,$yr);\n\n\t\t//add holidays easily define in the gregorian calendar\n\t\t$this->holidays = Array(\n\t\t\t\"newyearseve\" => gregorian_to_jd(12,31,$yr),\n\t\t\t\"valentinesday\"=> gregorian_to_jd(2,14,$yr),\n\t\t\t\"presidentsday\" => nth_weekday_jd(3,dMONDAY,2,$yr),\n\t\t\t\"stpatricksday\" => gregorian_to_jd(3,17,$yr),\n\t\t\t\"aprilfoolsday\" => gregorian_to_jd(4,1,$yr),\n\t\t\t\"cincodemayo\" => gregorian_to_jd(5,5,$yr),\n\t\t\t\"mothersday\" => nth_weekday_jd(2,dSUNDAY,5,$yr),\n\t\t\t\"memorialday\" => $this->memorialDay($yr),\n\t\t\t\"fathersday\" => nth_weekday_jd(3,dSUNDAY,6,$yr),\n\t\t\t\"fourthofjuly\" => gregorian_to_jd(7,4,$yr),\n\t\t\t\"laborday\" => nth_weekday_jd(1,dMONDAY,9,$yr),\n\t\t\t\"columbusday\" => nth_weekday_jd(2,dMONDAY,10,$yr),\n\t\t\t\"halloween\" => gregorian_to_jd(10,31,$yr), \n\t\t\t\"thanksgiving\" => nth_weekday_jd(4, dTHURSDAY, 11,$yr),\n\t\t\t\"christmas\" => gregorian_to_jd(12,24,$yr),\n\t\t\t\"christmasday\" => gregorian_to_jd(12,25,$yr),\n\t\t\t\"mardigras\" => easter_jd($yr,-47),\n\t\t\t\"easter\" =>\teaster_jd($yr)\n\t\t);\n\t\t\t\n\t\tasort($this->holidays);\n\t}",
"function hrdi(DateInterval $diff)\n{\n\t$str = \"\";\n\tif ($diff->y > 1) return $str . $diff->y . ' years';\n\tif ($diff->y == 1) return $str . ' 1 year and ' . $diff->m . ' months';\n\tif ($diff->m > 1) return $str . $diff->m . ' months';\n\tif ($diff->m == 1) return $str . ' 1 month and ' . $diff->d . ($diff->d > 1 ? ' days' : ' day');\n\tif ($diff->d > 1) return $str . $diff->d . ' days';\n\tif ($diff->d == 1) return $str . ' 1 day and ' . $diff->h . ($diff->h > 1 ? ' hours' : ' hour');\n\tif ($diff->h > 1) return $str . $diff->h . ' hours';\n\tif ($diff->h == 1) return $str . ' 1 hour and ' . $diff->i . ($diff->i > 1 ? ' minutes' : ' minute');\n\tif ($diff->i > 1) return $str . $diff->i . ' minutes';\n\tif ($diff->i == 1) return $str . ' 1 minute';\n\treturn $str . ' a few secondes';\n}",
"function obtener_hora($fecha) {\r\nreturn(substr($fecha,11,2));\r\n}",
"function IntToJs ($i) {\n\tGlobal $iTimeType;\n\tif ($iTimeType == 1) return $i;\n\t\n\t$n = $i % 100;\n\t$i = (int)($i / 100);\n\t$h = $i % 100;\n\t$i = (int)($i / 100);\n\t$d = $i % 50;\n\t$i = (int)($i / 50);\n\t$m = ($i % 20) -1;\n\t$i = (int)($i / 20);\n\t$y = ($i % 1000) + 2000;\n\treturn mktime($h,$n,0,$m,$d,$y);\n}",
"function getCanChi($lunar) {\n\t\t$dayName = Qss_Lib_Const::$CAN[($lunar->jd + 9) % 10] . \" \" . Qss_Lib_Const::$CHI[($lunar->jd+1)%12];\n\t\t$monthName = Qss_Lib_Const::$CAN[($lunar->year*12+$lunar->month+3) % 10] . \" \" . Qss_Lib_Const::$CHI[($lunar->month+1)%12];\n\t\tif ($lunar->leap == 1) {\n\t\t\t$monthName .= \" (nhuận)\";\n\t\t}\n\t\t$yearName = $this->getYearCanChi($lunar->year);\n\t\treturn array($dayName, $monthName, $yearName);\n\t}",
"public static function getJalali($g_y, $g_m, $g_d) {\n $gy = $g_y - 1600;\n $gm = $g_m - 1;\n $g_day_no = (365 * $gy + static::div($gy + 3, 4) - static::div($gy + 99, 100) + static::div($gy + 399, 400));\n for ($i = 0; $i < $gm; ++$i) {\n $g_day_no += static::$daysMonthGregorian[$i];\n }\n if ($gm > 1 && (($gy % 4 == 0 && $gy % 100 != 0) || ($gy % 400 == 0)))\n # leap and after Feb\n $g_day_no ++;\n $g_day_no += $g_d - 1;\n $j_day_no = $g_day_no - 79;\n $j_np = static::div($j_day_no, 12053); # 12053 = (365 * 33 + 32 / 4)\n $j_day_no = $j_day_no % 12053;\n $jy = (979 + 33 * $j_np + 4 * static::div($j_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)\n $j_day_no %= 1461;\n if ($j_day_no >= 366) {\n $jy += static::div($j_day_no - 1, 365);\n $j_day_no = ($j_day_no - 1) % 365;\n }\n for ($i = 0; ($i < 11 && $j_day_no >= static::$daysMonthJalali[$i]); ++$i) {\n $j_day_no -= static::$daysMonthJalali[$i];\n }\n return array($jy, $i + 1, $j_day_no + 1);\n }",
"function islamic_to_jd($mo,$da,$yr) {\n\t\treturn ( $da + ceil(29.5*($mo-1)) + ($yr-1)*354 +\n\t\t\tfloor((3+(11*$yr))/30)+ ISLAMIC_EPOCH - 1);\n\t}",
"function exibirDataHoraBr($data){\n\t$timestamp = strtotime($data); \n\treturn date('d/m/y - H:i:s', $timestamp);\t\n}",
"function convertDate_Amj_jmA($date)\n{\n\tsetlocale (LC_TIME, 'fr_FR','fra'); \n\treturn strftime(\"%d/%m/%Y\", strtotime($date)); \n}",
"function date_ajourdhui()\n{\n $date = localtime(time());\n\n $mois = $date[4]+1;\n $annee = $date[5] + 1900;\n\n $aujourdhui = mktime(0,0,0,$mois,$date[3],$annee,-1);\n \n return date('Y-m-d', $aujourdhui); \n}",
"private function getEristerMeeusJulian($year)\n {\n $a = $year % 4;\n $b = $year % 7;\n $c = $year % 19;\n $d = (19 * $c + 15) % 30;\n $e = (2 * $a + 4 * $b - $d + 34) % 7;\n\n $month = (int)floor(($d + $e + 114) / 31);\n $day = (int)(($d + $e + 114) % 31) + 1;\n\n return array($month, $day);\n }",
"function translate_date_to_ro($date_eng)\n{\n $days_of_week = ['Mon' => 'Luni,', 'Tue' => 'Marti,', 'Wed' => 'Miercuri,', 'Thu' => 'Joi,', 'Fri' => 'Vineri,', 'Sat' => 'Sambata,', 'Sun' => 'Duminica,'];\n $months_of_year = ['01' => 'Ian', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'Mai', '06' => 'Iun', '07' => 'Iul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Noi', '12' => 'Dec'];\n $date_eng = explode(\" \", $date_eng);\n $date_eng[0] = $days_of_week[$date_eng[0]];\n $date_eng[2] = $months_of_year[$date_eng[2]];\n $date_ro = implode(\" \", $date_eng);\n//print_r($date_ro);\n return $date_ro;\n}",
"public static function dayOfYearToJStime($year, $day, $hour = 12) {\n\t\treturn mktime($hour,0,0,1,$day,$year).'000';\n\t}",
"private static function jtg($date)\n {\n $z = floor($date + 0.5);\n $a = floor(($z - 1867216.25) / 36524.25);\n $a = $z + 1 + $a - floor($a / 4);\n $b = $a + 1524;\n $c = floor(($b - 122.1) / 365.25);\n $d = floor(365.25 * $c);\n $e = floor(($b - $d) / 30.6001);\n $day = $b - $d - floor($e * 30.6001);\n $month = $e - ($e > 13.5 ? 13 : 1);\n $year = $c - ($month > 2.5 ? 4716 : 4715);\n\n $year = $year <= 0 ? $year-- : $year;\n\n return self::$date->setYear($year)->setMonth($month)->setDay($day);\n }",
"function persian_strftime_utf($format, $timestamp='') {\n\n if($timestamp==''){\n $timestamp = mktime();\n }\n\n $g_d=date('j', $timestamp);\n $g_m=date('n', $timestamp);\n $g_y=date('Y', $timestamp);\n\n list($jy, $jm, $jd, $j_all_days) = g2p($g_y, $g_m, $g_d);\n\n $j_month_name = array('', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر',\n 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند');\n $j_week_name = array('Saturday' => 'شنبه',\n 'Sunday' => 'یک شنبه',\n 'Monday' => 'دوشنبه',\n 'Tuesday' => 'سه شنبه',\n 'Wednesday' => 'چهارشنبه',\n 'Thursday' => 'پنج شنبه',\n 'Friday' => 'جمعه',\n 'Sat' => 'ش',\n 'Sun' => 'ی',\n 'Mon' => 'د',\n 'Tue' => 'س',\n 'Wed' => 'چ',\n 'Thu' => 'پ',\n 'Fri' => 'ج');\n $j_week_number = array('Sat' => '1',\n 'Sun' => '2',\n 'Mon' => '3',\n 'Tue' => '4',\n 'Wed' => '5',\n 'Thu' => '6',\n 'Fri' => '7');\n\n // calculate string\n $output_str='';\n\n for ($i=0; $i<strlen($format); $i++){\n\n if($format[$i]=='%'){\n $i++;\n switch($format[$i]){\n case 'a':\n $output_str.=$j_week_name[date('D', $timestamp)];\n break;\n case 'A':\n $output_str.=$j_week_name[date('l', $timestamp)];\n break;\n case 'b':\n case 'B':\n case 'h':\n $output_str.=$j_month_name[$jm];\n break;\n case 'c':\n $output_str.=persian_strftime_utf('%y/%m/%d %I:%M:%S', $timestamp);\n break;\n case 'C':\n $output_str.=floor($jy/100);\n break;\n case 'd':\n if($jd<10) $output_str.='0'.$jd; else $output_str.=$jd;\n break;\n case 'D':\n $output_str.=$jy.'/'.$jm.'/'.$jd;\n break;\n case 'e':\n if($jd<10) $output_str.=' '.$jd; else $output_str.=$jd;\n break;\n case 'H':\n $output_str.=date('H', $timestamp);\n break;\n case 'I':\n $output_str.=date('h', $timestamp);\n break;\n case 'j':\n $output_str.=sprintf('%03d', $j_all_days);\n break;\n case 'm':\n if($jm<10) $output_str.='0'.$jm; else $output_str.=$jm;\n break;\n case 'M':\n $output_str.=date('i', $timestamp);\n break;\n case 'n':\n $output_str.=\"\\n\";\n break;\n case 'r':\n case 'p':\n if(date('a',$timestamp)=='pm') $output_str.='بعد از ظهر'; else $output_str.='قبل از ظهر';\n break;\n case 'R':\n $output_str.=strftime('%R', $timestamp);\n break;\n case 'S':\n $output_str.=date('s', $timestamp);\n break;\n case 't':\n $output_str.=\"\\t\";\n break;\n case 'U':\n case 'V':\n case 'W':\n $output_str.=sprintf('%02d', floor(($j_all_days+1)/7));\n break;\n case 'u':\n case 'w':\n $output_str.=$j_week_number[date('D', $timestamp)];\n break;\n case 'x':\n $output_str.=persian_strftime_utf('%y/%m/%d', $timestamp);\n break;\n case 'X':\n $output_str.=persian_strftime_utf('%I:%M:%S', $timestamp);\n break;\n case 'g':\n case 'y':\n $output_str.=$jy-(floor($jy/100)*100);\n break;\n case 'G':\n case 'Y':\n $output_str.=$jy;\n break;\n case 'z':\n case 'Z':\n $output_str.=strftime('%z', $timestamp);\n break;\n case '%':\n $output_str.='%';\n break;\n }\n }else{\n $output_str.=$format[$i];\n }\n }\n\n return $output_str;\n}",
"function date2jd()\n{\n\t@list($y,$m,$d,$h,$i,$s) = func_get_args();\n\n\tif( $m < 3.0 ) {\n\t\t$y -= 1.0;\n\t\t$m += 12.0;\n\t}\n\n\t$jd = (int)( 365.25 * $y );\n\t$jd += (int)( $y / 400.0 );\n\t$jd -= (int)( $y / 100.0 );\n\t$jd += (int)( 30.59 * ( $m-2.0 ) );\n\t$jd += 1721088;\n\t$jd += $d;\n\n\t$t = $s / 3600.0;\n\t$t += $i /60.0;\n\t$t += $h;\n\t$t = $t / 24.0;\n\n\t$jd += $t;\n\treturn( $jd );\n}",
"function convertTime($time){\n return date(\"H:i\", strtotime($time));\n}",
"public function toHours($time) {\n \treturn intval($time / 3600000) % 60;\n }",
"function convertdateanglais($date){\n\t$ladate=explode('-',$date);\n\t$jour=$ladate[2];\n\t$moi=$ladate[1];\n\t$anne=$ladate[0];\n\t$madate=date(\"d/m/Y\", mktime(0, 0, 0, $moi, $jour, $anne));\n\treturn $madate;\n}",
"function reservation_min_to_hours($value,$type=\"H:i\"){\n return gmdate($type,$value*60);\n}",
"public static function timeToInt($hora) {\n $hr = explode(':', $hora);\n return ($hr[0] * 3600) + ($hr[1] * 60) + $hr[2];\n }",
"function hebrew_year_months($yr) {\n\t\treturn ( hebrew_leap($yr) ? 13 : 12 );\n\t}",
"function getBanglaDate($date) {\r\n\r\n$engArray = array (\r\n1,2,3,4,5,6,7,8,9,0, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'am', 'pm', 'th', 'st', 'rd', 'th', 'Sat', 'Sun', 'Mon', 'Tue', 'Tues', 'Wed', 'Thurs', 'Thu', 'Fri', 'Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'\r\n);\r\n$bangArray = array (\r\n\t'১','২','৩','৪','৫','৬','৭','৮','৯','০',\r\n\t'জানুয়ারি', 'ফেব্রুয়ারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর',\r\n\t'সকাল', 'দুপুর', '-এ', '-এ', '-এ', '-এ', 'শনি', 'রবি', 'সোম', 'মঙ্গল', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'বৃহস্পতি', 'শুক্র', 'শনিবার', 'রবিবার',\r\n\t'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার'\r\n);\r\n\r\n\t$converted = str_replace($engArray, $bangArray, $date);\r\n \treturn $converted;\r\n}",
"public static function gengo($year)\n {\n if ($year >= 1911 && $year <= 1925) {\n $no = $year - 1911;\n\n return \"大正\" . $no;\n }\n\n // tinh nam shouwa ex: value - 1925\n if ($year > 1925 && $year <= 1988) {\n $no = $year - 1925;\n\n return \"昭和\" . $no;\n }\n // tinh nam heisei\n if ($year >= 1989) {\n $no = $year - 1988;\n\n return \"平成\" . $no;\n }\n\n return $year;\n }",
"public static function gregoryDateTime($date = null)\n {\n $date = str_replace('م', 'PM', $date);\n $date = str_replace('ص', 'AM', $date);\n\n $time = date('G:i:s', strtotime($date));\n $date = date('Y-m-d', strtotime($date));\n\n if (empty($date)) {\n return self::$date->now();\n }\n\n [$hours, $minutes ,$seconds ] = explode(':', $time);\n [$year, $month, $day] = explode('-', self::$date->parse($date)->format('Y-m-d'));\n\n return self::htg2((int) $year, (int) $month, (int) $day, (int) $hours, (int) $minutes, (int) $seconds);\n }",
"static function convert_iso_to_jquery_format($format) {\n\t\t$convert = array(\n\t\t\t'/([^d])d([^d])/' => '$1d$2',\n\t\t '/^d([^d])/' => 'd$1',\n\t\t '/([^d])d$/' => '$1d',\n\t\t '/dd/' => 'dd',\n\t\t '/EEEE/' => 'DD',\n\t\t '/EEE/' => 'D',\n\t\t '/SS/' => '',\n\t\t '/eee/' => 'd',\n\t\t '/e/' => 'N',\n\t\t '/D/' => '',\n\t\t '/w/' => '',\n\t\t\t// make single \"M\" lowercase\n\t\t '/([^M])M([^M])/' => '$1m$2',\n\t\t\t// make single \"M\" at start of line lowercase\n\t\t '/^M([^M])/' => 'm$1',\n\t\t\t\t// make single \"M\" at end of line lowercase\n\t\t '/([^M])M$/' => '$1m',\n\t\t\t// match exactly three capital Ms not preceeded or followed by an M\n\t\t '/(?<!M)MMM(?!M)/' => 'M',\n\t\t\t// match exactly two capital Ms not preceeded or followed by an M\n\t\t '/(?<!M)MM(?!M)/' => 'mm',\n\t\t\t// match four capital Ms (maximum allowed)\n\t\t '/MMMM/' => 'MM',\n\t\t '/l/' => '',\n\t\t '/YYYY/' => 'yy',\n\t\t '/yyyy/' => 'yy',\n\t\t '/[^y]yy[^y]/' => 'y',\n\t\t '/a/' => '',\n\t\t '/B/' => '',\n\t\t '/hh/' => '',\n\t\t '/h/' => '',\n\t\t '/([^H])H([^H])/' => '',\n\t\t '/^H([^H])/' => '',\n\t\t '/([^H])H$/' => '',\n\t\t '/HH/' => '',\n\t\t // '/mm/' => '',\n\t\t '/ss/' => '',\n\t\t '/zzzz/' => '',\n\t\t '/I/' => '',\n\t\t '/ZZZZ/' => '',\n\t\t '/Z/' => '',\n\t\t '/z/' => '',\n\t\t '/X/' => '',\n\t\t '/r/' => '',\n\t\t '/U/' => '',\n\t\t);\n\t\t$patterns = array_keys($convert);\n\t\t$replacements = array_values($convert);\n\t\t\n\t\treturn preg_replace($patterns, $replacements, $format);\n\t}",
"function divHoras($hora,$registros) {\n\t$h1=substr($hora,0,-3);\n $m1=substr($hora,3,2);\n $minutos=(($h1*60)*60)+($m1*60);\n $dif=$minutos/$registros;\n $difm=floor($dif/60);\n\treturn $difm;\n\t \n}",
"function getDateJhjjmmtt() {\n\t\n\t$date \t= getdate();\n\t$year \t= $date['year'];\n\t$mon \t= $date['mon'];\n $day\t\t= $date['mday'];\n \n\tif( $mon < \"10\" ) \t\t$mon = \"0\".$mon;\n\tif( $day < \"10\" )\t\t$day = \"0\".$day;\n\t\n\t$moddate \t= $year.$mon.$day;\n\n\treturn $moddate;\n}",
"public function startPersian()\n {\n $verta = new \\Verta($this->start);\n\n $result = $verta->format('Y-n-j H:i');\n\n return $result;\n }",
"function to12hour($hour1){\n\t\treturn DATE(\"g:i a\", STRTOTIME($hour1));\n\t}",
"function hebrew_delay_1($yr) {\n\n\t\t$mos = floor( ((235 * $yr) - 234 ) / 19);\n\t\t$parts = 12084 + 13753 * $mos;\n\t\t$day = $mos * 29 + floor($parts / 25920);\n\n\t\tif ( (3*($day+1) % 7) < 3 ) $day++;\n\n\t\treturn ($day);\n\t}",
"public function get_year()\n {\n $round = $this->get_round();\n $roundNumber = $round['numero'];\n /*Se obtiene la fecha final para sacar el año*/\n $r = $round['fecha_final'];\n /*Se concatena el año, siempre son 4 caracteres*/\n $año = $r[0].$r[1].$r[2].$r[3];\n \n return $año;\n }",
"function _bluehrd_tgl($_tgl){\r\n return date(\"d-m-Y H:i\",strtotime($_tgl));\r\n }",
"function orderhora($fecha_hora){\n\tif($fecha_hora != NULL){\n\t\t$h = substr($fecha_hora,11,2);\n\t\t$m = substr($fecha_hora,14,2);\n\t\tif($h > 12){\n\t\t\t$h = $h - 12;\n\t\t\tif($h < 10){\n\t\t\t\t$h = '0'.$h;\n\t\t\t}\n\t\t\t$h = $h.':'.$m.' pm';\t\t\n\t\t}else{\n\t\t\tif($h == 12){\n\t\t\t\t$h = $h.':'.$m.' m';\n\t\t\t}else{\n\t\t\t\t$h = $h.':'.$m.' am';\n\t\t\t}\n\t\t}\n\t}else{\n\t\t$h = \"\";\n\t}\n\treturn $h;\n}",
"public function finishPersian()\n {\n $verta = new \\Verta($this->finish);\n\n $result = $verta->format('Y-n-j H:i');\n\n return $result;\n }",
"public function integerToRoman($the_integer)\n {\n if(!is_int((int)$the_integer)){\n return response('Non-integer request', 400)\n ->header('Content-Type', 'text/plain');\n }\n $x=RomanNumeralsService::where('theNumber',$the_integer)->first();\n if($x){\n $x->conversionCount++;\n $x->save();\n $cvt = fractal($x, new RomanNumeralsServiceTransformer())->toArray();\n }else{\n $cvt = fractal(RomanNumeralsService::create([\n 'theNumber'=>$the_integer,\n 'romanNumeralConversion'=>$this->svc->integerToRoman($the_integer),\n 'conversionCount'=>1\n ]), new RomanNumeralsServiceTransformer())->toArray();\n }\n return response()->json($cvt);\n }",
"function jd_to_weekday($jd) {\n\t\treturn ( floor( ($jd+8.5) % 7 ) );\n\t}",
"function convert_date( $uglydate ){\n\t$date = new DateTime( $uglydate );\n\treturn $nicedate = $date->format('F j, Y');\n}",
"private function to_zruth_date($date) {\n if (strlen($date) >= 10 && substr($date, 4, 1) == '-' && substr($date, 7, 1) == '-')\n return substr($date, 8, 2) . '-' . substr($date, 5, 2) . '-' . substr($date, 0, 4);\n else\n return $date;\n }",
"function implode_date($h, $i=0, $s=0, $m=0, $d=0, $y=0)\n\t{\n\t\t$xtime = $this->cast($h, $i, $s, $m, $d, $y);\n\t\treturn ($xtime['y'] < 0 ? '-' : '') . str_pad((string) abs($xtime['y']), 4, '0', STR_PAD_LEFT) . sprintf('%02d%02d', $xtime['m'], $xtime['d']);\n\t}",
"public function vr_hora()\n {\n\n $valor=$this->vr_hora;\n\n if ($this->id_tipotitulo == 3)\n {\n $valor='10208';\n } elseif ($this->id_tipotitulo == 4) {\n $valor='15122';\n } elseif ($this->id_tipotitulo == 5) {\n $valor='19096';\n } elseif ($this->id_tipotitulo == 7) {\n $valor='23252';\n } elseif ($this->id_tipotitulo == 10) {\n $valor='27014';\n } elseif ($this->id_tipotitulo == 9) {\n $valor='10208';\n } elseif ($this->id_tipotitulo == 11) {\n $valor='10208'; }\n elseif ($this->id_tipotitulo == 12) {\n $valor='0';\n }\n\n\n return $valor;\n\n }",
"function _putDateConvGtJDate(&$pdf, $src, $x, $height, $font)\n {\n $year = date('Y', strtotime($src));\n $month = date('n', strtotime($src));\n $day = date('j', strtotime($src));\n// list($year, $month, $day) = explode('-', $src);\n $date = str_replace('-', '', $src);\n if ($date >= 19890108) {\n $gengo = '平成';\n $wayear = $year - 1988;\n } elseif ($date >= 19261225) {\n $gengo = '昭和';\n $wayear = $year - 1925;\n } elseif ($date >= 19120730) {\n $gengo = '大正';\n $wayear = $year - 1911;\n } else {\n $gengo = '明治';\n $wayear = $year - 1868;\n }\n //Set x y month day\n $pdf->SetXY($x + 2.5, $height + 0.7);\n $pdf->MultiCell(20, 5, $wayear, 0, 'C');\n $pdf->SetXY($x + 10.0, $height + 0.7);\n $pdf->MultiCell(20, 5, $month, 0, 'C');\n $pdf->SetFont($font, null, 14, true);\n\n if ($gengo == '昭和') {\n $pdf->SetXY($x - 8.8, $height - 2.5);\n $pdf->MultiCell(28, 2, '◯', 0, 'C');\n }\n if ($gengo == '平成') {\n $pdf->SetXY($x - 8.8, $height + 1.6);\n $pdf->MultiCell(28, 2, '◯', 0, 'C');\n }\n }",
"public function convertTime($time)\n\t{\n\t\t\tif (date('Y-m-d', $time) == date('Y-m-d')) {\n $timeConverted = strftime('<span class=\"timeRange\">Heute</span>, %H:%M', $time);\n } elseif (date('Y-m-d', $time) == date('Y-m-d', strtotime(\"Yesterday\"))) {\n $timeConverted = strftime('<span class=\"timeRange\">Gestern</span>, %H:%M', $time);\n } elseif (date('Y-m-d', $time) < date('Y-m-d', strtotime(\"Yesterday\"))) {\n $timeConverted = strftime(\"%A, %d %B %Y %H:%M\", $time);\n }\n\t\t\t\n\t\treturn utf8_encode($timeConverted);\n\t}",
"public static function RFCDate() {\n\t $tz = date('Z');\n\t $tzs = ($tz < 0) ? '-' : '+';\n\t $tz = abs($tz);\n\t $tz = (int)($tz/3600)*100 + ($tz%3600)/60;\n\t $result = sprintf(\"%s %s%04d\", date('D, j M Y H:i:s'), $tzs, $tz);\n\t\n\t return $result;\n\t}",
"function happys_get_ja_day($arg) {\n \tswitch ($arg) {\n case 'Mon':\n $arg_ja = '月';\n break;\n case 'Tue':\n $arg_ja = '火';\n break;\n case 'Wed':\n $arg_ja = '水';\n break;\n \t\tcase 'Thu':\n $arg_ja = '木';\n break;\n case 'Fri':\n $arg_ja = '金';\n break;\n case 'Sat':\n $arg_ja = '土';\n break;\n \t\tcase 'Sun':\n $arg_ja = '日';\n break;\n \t}\n \treturn $arg_ja;\n }",
"function funConverteDataHora($data){\n\t//$data_americano = \"2009-04-29\";\n\t//$data_Brasileiro = \"29/04/2012\";\n\t//AGORA VAMOS EXPLODIR ELA PELOS HIFENS E SERÁ CRIADO UM ARRAY COM AS PARTES\n\t$partes_da_data = \"\";\n\t$hora = \"\";\n\t$partes_da_data = explode('/',$data);\n\t$hora = substr($partes_da_data[2],4,-1);\n\n //AGORA REMONTAMOS A DATA NO FORMATO BRASILEIRO, OU SEJA,\n\t//INVERTENDO AS POSICOES E COLOCANDO AS BARRAS\n\t$data = substr($partes_da_data[2],0,4).'-'.$partes_da_data[1].'-'.$partes_da_data[0];\n\n\t//UFA! PRONTINHO, AGORA TEMOS A DATA NO BOM E VELHO FORMATO BRASILEIRO\n\t//return \n\treturn $data.' '.$hora;\n}",
"public function getHour(): string\n {\n return $this->toLocalizedString('H');\n }",
"function getHour()\r\n {\r\n return $this->hora;\r\n }",
"function g2p($g_y, $g_m, $g_d){\n $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n\n $gy = $g_y-1600;\n $gm = $g_m-1;\n $gd = $g_d-1;\n\n $g_day_no = 365*$gy+floor(($gy+3)/4)-floor(($gy+99)/100)+floor(($gy+399)/400);\n\n for ($i=0; $i < $gm; ++$i){\n $g_day_no += $g_days_in_month[$i];\n }\n\n if ($gm>1 && (($gy%4==0 && $gy%100!=0) || ($gy%400==0))){\n /* leap and after Feb */\n ++$g_day_no;\n }\n\n $g_day_no += $gd;\n $j_day_no = $g_day_no-79;\n $j_np = floor($j_day_no/12053);\n $j_day_no %= 12053;\n $jy = 979+33*$j_np+4*floor($j_day_no/1461);\n $j_day_no %= 1461;\n\n if ($j_day_no >= 366) {\n $jy += floor(($j_day_no-1)/365);\n $j_day_no = ($j_day_no-1)%365;\n }\n $j_all_days = $j_day_no+1;\n\n for ($i = 0; $i < 11 && $j_day_no >= $j_days_in_month[$i]; ++$i) {\n $j_day_no -= $j_days_in_month[$i];\n }\n\n $jm = $i+1;\n $jd = $j_day_no+1;\n\n return array($jy, $jm, $jd, $j_all_days);\n}",
"function minutos2horas($mins) {\nif ($mins < 0)\n\t$min = abs($mins);\nelse\n\t$min = $mins;\n \n$h = floor($min / 60);\n$m = ($min - ($h * 60)) / 100;\n$horas = $h + $m;\n \nif ($mins < 0)\n\t$horas *= -1;\n\n$sep = explode('.', $horas);\n$h = $sep[0];\nif (empty($sep[1]))\n\t$sep[1] = 00;\n\t$m = $sep[1];\n \nif (strlen($m) < 2)\n\t$m = $m . 0;\nreturn $h.':'.$m;\n }",
"function converfecha($fechao){\n\t$cuenta = 0;\n\t$año=substr($fechao,-4,4);\n\t$mes=substr($fechao,-7,2);\n\t$dia=substr($fechao,0,2);\n\t//checa si la fecha recibida es valida\n\t\tif(is_numeric($año)&&is_numeric($mes)&&is_numeric($dia)){$fechac=$año.\"-\".$mes.\"-\".$dia;}else{$fechac=$fechao;}\n\treturn $fechac;\n}",
"function DateStrToInt ($s, $h,$n,$z) {\n\tGlobal $iTimeType;\n\t\n\t$y = (int)substr($s, 0, 4);\t\t// year\n\t$m = (int)substr($s, 5, 2);\t\t// month\n\t$d = (int)substr($s, 8, 2);\t\t// day\n\t\n\tif ($m < 1) $m = 1;\n\tif (12 < $m) $m = 12;\n\tif ($d < 1) $d = 1;\n\tif (31 < $d) $d = 31;\n\tif ($h < 0) $h = 0;\n\tif (23 < $h) $h = 23;\n\tif ($n < 0) $n = 0;\n\tif (59 < $n) $n = 59;\n\t\n\tif ($iTimeType == 1) {\n\t\tif ($y < 1970) $y = 1970;\n\t\tif (2037 < $y) $y = 2037;\n\t\tif ($z < 0) $z = 0;\n\t\tif (59 < $z) $z = 59;\n\t\treturn mktime($h,$n,$z,$m,$d,$y);\n\t}\n\t\n\t$y -= 2000;\n\tif ($y < 0) $y = 0;\n\tif (213 < $y) $y = 213;\n\treturn $y*10000000+(50+$m*50+$d)*10000 + ($h*100) + $n;\n}",
"function convertDate ($matches) {\n\t$year = array_pop($matches['year']); //Get last found year\n\t$year = ($year) ? $year : date('Y'); //If nothing found, use this year\n\t$month = array_pop($matches['month']); //Get last found month\n\t$month = ($month) ? $month : '01'; //If nothing found, use January\n\t$day = array_pop($matches['day']); //Get last found day\n\t$day = ($day) ? $day : '01'; //If nothing found, use 1st\n\t$time = date('U', strtotime($month . '/' . $day . '/' . $year)); //Convert to unix timestamp\n\treturn $time;\n}",
"public function reg_date($dt) {\n\t\t$day = array(\"Domingo,\", \"Lunes,\", \"Martes,\", \"Miércoles,\", \"Jueves,\", \"Viernes,\" ,\"Sábado,\");\n\t\t$month = array(\"\",\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\");\n\t\tdate_default_timezone_set(\"Europe/Madrid\");\n\t\t$fecha_reg = $day[date('w', $dt)].date(\" d\", $dt).\" de \".$month[date('n', $dt)].\" de \".date(\"Y\", $dt).\" a las \".date(\"G:i\", $dt).\" hrs.\";\n\t\treturn $fecha_reg;\n\t}",
"function convert_time($time) {\n\t$date = date('g:i A', strtotime($time));\n\n\treturn $date;\n}",
"public function groupes_ali_et_cal() {\n\t\tfunction dateenlettre($date) {\n\t\t\t$split = explode(\"-\",$date);\n\t\t\t$jour = $split[2];\n\t\t\t$mois = $split[1];\n\t\t\t$annee = $split[0];\n\t\t\t$newTimestamp = mktime(12,0,0,$mois,$jour,$annee);\n\t\t\t \n\t\t\t$Jour = array(\"Dimanche\",\"Lundi\",\"Mardi\",\"Mercredi\",\"Jeudi\",\"Vendredi\",\"Samedi\");\n\t\t\t$Mois = array(\"\",\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Août\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\n\t\t\t \n\t\t\treturn $Jour[date(\"w\", $newTimestamp)] . ' ' . $jour . ' ' . $Mois[date(\"n\", $newTimestamp)] . ' ' . $annee;\n\t\t}\n\t\t\n\t\t// Fonction qui renvoi le nombre de jours entre deux dates\n\t\tfunction jours($date1, $date2){\n\t\t\t$diff = abs($date1 - $date2); \n\t\t\t$retour = array();\n\t\t \n\t\t\t$tmp = $diff;\n\t\t\t$retour['second'] = $tmp % 60;\n\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['second']) /60 );\n\t\t\t$retour['minute'] = $tmp % 60;\n\t\t\t\n\t\t\t$tmp = floor( ($tmp - $retour['minute'])/60 );\n\t\t\t$retour['hour'] = $tmp % 24;\n\t\t\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['hour']) /24 );\n\t\t\t$retour['day'] = $tmp;\n\t\t\t\t \n\t\t\treturn $retour['day'];\n\t\t}\n\t\t\n\t\t\n\t\t$id = AuthComponent::user('id');\n\t\tsetlocale (LC_TIME, 'fr_FR.utf8','fra');\n\t\t$date = date('Y-m-d');\n\t\t\n\t\t$this->set('debut',null);\n\t\t$this->set('fin',null);\n\t\tif ($this->request->is('post')) {\n\t\t\t/* Vérification des informations envoyées */\n\t\t\t$message;\n\t\t\t$stop = false;\n\t\t\t$deb = $_POST['debut'];\n\t\t\t$fin = $_POST['fin'];\n\t\t\t\n\t\t\tif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$deb))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de début est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} elseif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$fin))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de fin est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} else {\n\t\t\t\tif ($deb > $date ) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t} elseif ($fin > $date) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t}\n\t\t\t\tif ($deb == $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être égale à la date de fin\";\n\t\t\t\t} elseif ($deb > $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date de fin\";\n\t\t\t\t}\n\t\t\t\t$this->set('debut',$deb);\n\t\t\t\t$this->set('fin',$fin);\n\t\t\t}\n\t\t\t/* fin vérif */\n\t\t\tif ($stop) {\n\t\t\t\t$this->Session->setFlash(__($message));\n\t\t\t} else {\n\t\t\t\t$fin = $fin . ' 23:59:59';\n\t\t\t\t$repas = $this->Suivialimentaire->find('all',array('conditions' => array('AND' => array(\n\t\t\t\t\t\t\t\tarray('id_user' => $id),\n\t\t\t\t\t\t\t\tarray('Suivialimentaire.created BETWEEN ? AND ?' => array($deb, $fin))\n\t\t\t\t)),'order' => array('Suivialimentaire.created DESC') ));\n\t\t\t\t$temp = $repas;\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($repas as $r) {\n\t\t\t\t\t$temp[$i]['Aliment']= $this->Aliment->find('first', array('conditions' => array('Aliment.id' => $r['Suivialimentaire']['id_aliment'])));\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$repas = $temp;\n\t\t\t\t$cal = 0;\n\t\t\t\tforeach ($repas as $rep) {\n\t\t\t\t\tif (!empty($rep['Aliment'])) {\n\t\t\t\t\t\t$cal = $cal + ($rep['Aliment']['Donneesaliment'][1]['valmoy'] * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$valsplit = explode(\"@\", $rep['Alimhorsclassification']['nutri']);\n\t\t\t\t\t\t$valresul = $valsplit[1];\n\t\t\t\t\t\t$cal = $cal + ($valresul * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->set('repas',$repas);\n\t\t\t\t$this->set('cal',$cal);\n\t\t\t\t$time1 = strtotime($deb);\n\t\t\t\t$time2 = strtotime($fin);\n\t\t\t\t$e=jours($time1, $time2);\n\t\t\t\t$this->set('joursDiff',$e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"function hebrew_leap($yr) {\n\t\treturn ( (($yr * 7 + 1) % 19 ) < 7 );\n\t}"
] | [
"0.7710955",
"0.6919239",
"0.6804697",
"0.65273505",
"0.6479675",
"0.64742625",
"0.59714067",
"0.5959266",
"0.5917151",
"0.5848497",
"0.5801117",
"0.577381",
"0.5519993",
"0.5500969",
"0.54773843",
"0.5164702",
"0.5158118",
"0.509517",
"0.49717143",
"0.49648085",
"0.49166712",
"0.48364693",
"0.48341215",
"0.48009226",
"0.47931358",
"0.47350076",
"0.47061637",
"0.46798706",
"0.46702263",
"0.46553162",
"0.46495324",
"0.4641643",
"0.46240485",
"0.46130523",
"0.46086875",
"0.46015304",
"0.4598336",
"0.4598336",
"0.4594052",
"0.45836782",
"0.4560647",
"0.45491266",
"0.45414823",
"0.4537234",
"0.4535168",
"0.45210382",
"0.4470535",
"0.44273546",
"0.4421262",
"0.44059375",
"0.4404021",
"0.43793744",
"0.43623668",
"0.43316475",
"0.43258888",
"0.43254027",
"0.43153933",
"0.4315011",
"0.42930135",
"0.42884517",
"0.4282808",
"0.4280675",
"0.42793465",
"0.4262933",
"0.42577964",
"0.42471159",
"0.42449623",
"0.4244897",
"0.4231165",
"0.42277098",
"0.42248285",
"0.42214265",
"0.42197487",
"0.42192733",
"0.4218543",
"0.41979137",
"0.41953856",
"0.4190012",
"0.41807464",
"0.41727114",
"0.41670024",
"0.41593295",
"0.41557708",
"0.41443992",
"0.41373003",
"0.41356537",
"0.4133762",
"0.41195273",
"0.410912",
"0.4108707",
"0.41055018",
"0.41029823",
"0.41015965",
"0.41009396",
"0.40960053",
"0.40909958",
"0.4090138",
"0.408785",
"0.40837863",
"0.4068319"
] | 0.42890292 | 59 |
Convert Julian to Gregorian. | private static function jtg($date)
{
$z = floor($date + 0.5);
$a = floor(($z - 1867216.25) / 36524.25);
$a = $z + 1 + $a - floor($a / 4);
$b = $a + 1524;
$c = floor(($b - 122.1) / 365.25);
$d = floor(365.25 * $c);
$e = floor(($b - $d) / 30.6001);
$day = $b - $d - floor($e * 30.6001);
$month = $e - ($e > 13.5 ? 13 : 1);
$year = $c - ($month > 2.5 ? 4716 : 4715);
$year = $year <= 0 ? $year-- : $year;
return self::$date->setYear($year)->setMonth($month)->setDay($day);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function jd_to_gregorian($jd, &$mo, &$da, &$yr) {\n\n\t\t$wjd = floor($jd - 0.5) + 0.5;\n\t\t$depoch = $wjd - GREGORIAN_EPOCH;\n\t\t$quadricent = floor($depoch / 146097);\n\t\t$dqc = $depoch % 146097;\n\t\t$cent = floor($dqc / 36524);\n\t\t$dcent = $dqc % 36524;\n\t\t$quad = floor($dcent / 1461);\n\t\t$dquad = $dcent % 1461;\n\t\t$yindex = floor($dquad / 365);\n\t\t$yr = $quadricent * 400 + $cent * 100 + $quad * 4 + $yindex;\n\n\t\tif (!(($cent == 4) || ($yindex == 4))) $yr++;\n\n\t\t$yearday = $wjd - gregorian_to_jd(1,1,$yr);\n\t\t$leapadj = (($wjd < gregorian_to_jd(3,1,$yr)) ? 0 : (leap_gregorian($yr) ? 1 : 2));\n\t\t$mo = floor(((($yearday + $leapadj) * 12) + 373) / 367);\n\t\t$da = $wjd - gregorian_to_jd($mo, 1, $yr) + 1;\n\n\t}",
"function gregorian_to_jalali ($g_y, $g_m, $g_d)\n\t{\n\t\t$g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n\t\t$j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n\t\t$gy = $g_y-1600;\n\t\t$gm = $g_m-1;\n\t\t$gd = $g_d-1;\n\t\t$g_day_no = 365*$gy+$this->div($gy+3,4)-$this->div($gy+99,100)+$this->div($gy+399,400);\n\n\t\tfor ($i=0; $i < $gm; ++$i)\n\t\t\t$g_day_no += $g_days_in_month[$i];\n\t\t\n\t\tif ($gm>1 && (($gy%4==0 && $gy%100!=0) || ($gy%400==0)))\n\t\t\t$g_day_no++; /* leap and after Feb */\n\t\t\n\t\t$g_day_no += $gd;\n\t\t$j_day_no = $g_day_no-79;\n\t\t$j_np = $this->div($j_day_no, 12053); /* 12053 = 365*33 + 32/4 */\n\t\t$j_day_no = $j_day_no % 12053;\n\t\t$jy = 979+33*$j_np+4*$this->div($j_day_no,1461); /* 1461 = 365*4 + 4/4 */\n\t\t$j_day_no %= 1461;\n\t\t\n\t\tif($j_day_no >= 366)\n\t\t{\n\t\t\t$jy += $this->div($j_day_no-1, 365);\n\t\t\t$j_day_no = ($j_day_no-1)%365;\n\t\t}\n\t\t\n\t\tfor($i = 0; $i < 11 && $j_day_no >= $j_days_in_month[$i]; ++$i)\n\t\t\t$j_day_no -= $j_days_in_month[$i];\n\t\t\n\t\t$jm = $i+1;\n\t\t$jd = $j_day_no+1;\n\t\t\n\t\treturn array($jy, $jm, $jd);\n\t}",
"function getJulianDate()\r\n {\r\n return Data_Calc::dataJuliana($this->dia, $this->mes, $this->ano);\r\n }",
"public static function getGregorian($j_y, $j_m, $j_d) {\n $jy = $j_y - 979;\n $jm = $j_m - 1;\n $j_day_no = (365 * $jy + static::div($jy, 33) * 8 + static::div($jy % 33 + 3, 4));\n for ($i = 0; $i < $jm; ++$i) {\n $j_day_no += static::$daysMonthJalali[$i];\n }\n $j_day_no += $j_d - 1;\n $g_day_no = $j_day_no + 79;\n $gy = (1600 + 400 * static::div($g_day_no, 146097)); # 146097 = (365 * 400 + 400 / 4 - 400 / 100 + 400 / 400)\n $g_day_no = $g_day_no % 146097;\n $leap = 1;\n if ($g_day_no >= 36525) { # 36525 = (365 * 100 + 100 / 4)\n $g_day_no --;\n $gy += (100 * static::div($g_day_no, 36524)); # 36524 = (365 * 100 + 100 / 4 - 100 / 100)\n $g_day_no = $g_day_no % 36524;\n if ($g_day_no >= 365) {\n $g_day_no ++;\n } else {\n $leap = 0;\n }\n }\n $gy += (4 * static::div($g_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)\n $g_day_no %= 1461;\n if ($g_day_no >= 366) {\n $leap = 0;\n $g_day_no --;\n $gy += static::div($g_day_no, 365);\n $g_day_no = ($g_day_no % 365);\n }\n for ($i = 0; $g_day_no >= (static::$daysMonthGregorian[$i] + ($i == 1 && $leap)); $i ++) {\n $g_day_no -= (static::$daysMonthGregorian[$i] + ($i == 1 && $leap));\n }\n return array($gy, $i + 1, $g_day_no + 1);\n }",
"static function hijriToJulian($month, $day, $year) {\n return ($day + ceil(29.5 * ($month - 1)) + ($year - 1) * 354 + floor((3 + (11 * $year)) / 30) + HIJRI_EPOCH) - 1;\n }",
"function mc_gregorian_to_jalali($gy,$gm,$gd,$mod=''){\n $g_d_m=array(0,31,59,90,120,151,181,212,243,273,304,334);\n if($gy>1600){\n $jy=979;\n $gy-=1600;\n }else{\n $jy=0;\n $gy-=621;\n }\n $gy2=($gm>2)?($gy+1):$gy;\n $days=(365*$gy) +((int)(($gy2+3)/4)) -((int)(($gy2+99)/100)) +((int)(($gy2+399)/400)) -80 +$gd +$g_d_m[$gm-1];\n $jy+=33*((int)($days/12053)); \n $days%=12053;\n $jy+=4*((int)($days/1461));\n $days%=1461;\n if($days > 365){\n $jy+=(int)(($days-1)/365);\n $days=($days-1)%365;\n }\n $jm=($days < 186)?1+(int)($days/31):7+(int)(($days-186)/30);\n $jd=1+(($days < 186)?($days%31):(($days-186)%30));\n return($mod=='')?array($jy,$jm,$jd):$jy.$mod.$jm.$mod.$jd;\n}",
"public function getGregorianFromHijri(HijriDate $hijri): Carbon\n {\n $hijriYear = $hijri->getYear();\n $hijriMonth = $hijri->getMonth();\n $hijriDay = $hijri->getDay();\n\n // Hijri to Julian\n $julianDay = floor((11 * $hijriYear + 3) / 30) + floor(354 * $hijriYear) + floor(30 * $hijriMonth)\n - floor(($hijriMonth - 1) / 2) + $hijriDay + 1948440 - 386;\n\n // Julian to Gregorian\n $b = 0;\n if ($julianDay > 2299160) {\n $a = floor(($julianDay - 1867216.25) / 36524.25);\n $b = 1 + $a - floor($a / 4.0);\n }\n\n $bb = $julianDay + $b + 1524;\n $cc = floor(($bb - 122.1) / 365.25);\n $dd = floor(365.25 * $cc);\n $ee = floor(($bb - $dd) / 30.6001);\n\n $gregorianDay = ($bb - $dd) - floor(30.6001 * $ee);\n $gregorianMonth = $ee - 1;\n\n if ($ee > 13) {\n $cc += 1;\n $gregorianMonth = $ee - 13;\n }\n\n $gregorianYear = $cc - 4716;\n\n return Carbon::create($gregorianYear, $gregorianMonth, $gregorianDay, 0, 0, 0, '+5:00');\n }",
"static function jdToHijri($jd) {\n $jd = floor($jd) + 0.5;\n $year = floor(((30 * ($jd - HIJRI_EPOCH)) + 10646) / 10631);\n $month = min(12, ceil(($jd - (29 + self::hijriToJulian(1, 1, $year))) / 29.5) + 1);\n $day = ($jd - self::hijriToJulian($month, 1, $year)) + 1;\n\n return [\n 'Month' => $month,\n 'Day' => $day,\n 'Year' => $year\n ];\n }",
"public function gregorian_to_jalali($gy, $gm, $gd, $mod = '')\n {\n list($gy, $gm, $gd) = explode('_', tr_num($gy . '_' . $gm . '_' . $gd));/* <= Extra :اين سطر ، جزء تابع اصلي نيست */\n $g_d_m = array(0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334);\n if ($gy > 1600) {\n $jy = 979;\n $gy -= 1600;\n } else {\n $jy = 0;\n $gy -= 621;\n }\n $gy2 = ($gm > 2) ? ($gy + 1) : $gy;\n $days = (365 * $gy) + ((int)(($gy2 + 3) / 4)) - ((int)(($gy2 + 99) / 100)) + ((int)(($gy2 + 399) / 400)) - 80 + $gd + $g_d_m[$gm - 1];\n $jy += 33 * ((int)($days / 12053));\n $days %= 12053;\n $jy += 4 * ((int)($days / 1461));\n $days %= 1461;\n $jy += (int)(($days - 1) / 365);\n if ($days > 365) $days = ($days - 1) % 365;\n if ($days < 186) {\n $jm = 1 + (int)($days / 31);\n $jd = 1 + ($days % 31);\n } else {\n $jm = 7 + (int)(($days - 186) / 30);\n $jd = 1 + (($days - 186) % 30);\n }\n return ($mod === '') ? array($jy, $jm, $jd) : $jy . $mod . $jm . $mod . $jd;\n }",
"function HumanToGregorian($day, $month, $year=0)\n {\n /**\n * Check to see if the year has been passed through.\n * If not get current year\n */\n if (empty($year)) {\n $dateinfo = getdate(time());\n $year = $dateinfo[\"year\"];\n }\n /**\n * We need to get the day of the year that we are currently at so that\n * we can work out the Gregorian Month and day\n */\n $DayOfYear = $month * 28;\n $DayOfYear += $day;\n /**\n * Human Calendar starts at 0, so we need to increment $DayOfYear\n * to take into account the day 00\n */\n $DayOfYear++;\n /**\n * the mktime() function will correctly calculate the date for out of\n * range values, so putting $DayOfYear instead of the day of the month\n * will work fine.\n */\n $GregorianTimeStamp = mktime(0, 0, 0, 1, $DayOfYear, $year);\n return $GregorianTimeStamp;\n }",
"public function gregorian_to_jalali( $gy, $gm, $gd, $mod = '' ) {\n\t\t$g_d_m = array( 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 );\n\t\tif ( $gy > 1600 ) {\n\t\t\t$jy = 979;\n\t\t\t$gy -= 1600;\n\t\t} else {\n\t\t\t$jy = 0;\n\t\t\t$gy -= 621;\n\t\t}\n\t\t$gy2 = ( $gm > 2 ) ? ( $gy + 1 ) : $gy;\n\t\t$days = ( 365 * $gy ) + ( (int) ( ( $gy2 + 3 ) / 4 ) ) - ( (int) ( ( $gy2 + 99 ) / 100 ) ) + ( (int) ( ( $gy2 + 399 ) / 400 ) ) - 80 + $gd + $g_d_m[ $gm - 1 ];\n\t\t$jy += 33 * ( (int) ( $days / 12053 ) );\n\t\t$days %= 12053;\n\t\t$jy += 4 * ( (int) ( $days / 1461 ) );\n\t\t$days %= 1461;\n\t\tif ( $days > 365 ) {\n\t\t\t$jy += (int) ( ( $days - 1 ) / 365 );\n\t\t\t$days = ( $days - 1 ) % 365;\n\t\t}\n\t\t$jm = ( $days < 186 ) ? 1 + (int) ( $days / 31 ) : 7 + (int) ( ( $days - 186 ) / 30 );\n\t\t$jd = 1 + ( ( $days < 186 ) ? ( $days % 31 ) : ( ( $days - 186 ) % 30 ) );\n\n\t\treturn ( $mod == '' ) ? array( $jy, $jm, $jd ) : $jy . $mod . $jm . $mod . $jd;\n\t}",
"function gregorian_to_jd($mo, $da, $yr) {\n\n\t\treturn (\tGREGORIAN_EPOCH - 1 +\n\t\t\t\t\t365 * ($yr-1) +\n\t\t\t\t\tfloor(($yr-1)/4) -\n\t\t\t\t\tfloor(($yr-1)/100) +\n\t\t\t\t\tfloor(($yr-1)/400) +\n\t\t\t\t\tfloor((367 * $mo - 362) / 12 ) +\n\t\t\t\t\t(($mo <= 2) ? 0 : (leap_gregorian($yr) ? -1 : -2 )) +\n\t\t\t\t\t$da );\n\n\t}",
"private function getEristerMeeusJulian($year)\n {\n $a = $year % 4;\n $b = $year % 7;\n $c = $year % 19;\n $d = (19 * $c + 15) % 30;\n $e = (2 * $a + 4 * $b - $d + 34) % 7;\n\n $month = (int)floor(($d + $e + 114) / 31);\n $day = (int)(($d + $e + 114) % 31) + 1;\n\n return array($month, $day);\n }",
"public function getHijriFromGregorian(Carbon $gregorian): HijriDate\n {\n $gregorian->setTimezone('+5:00'); // Ensure it is in MVT\n $gregorian->startOfDay(); // Ensure it is at midnight (so time does not affect diffInDays())\n $formatter = IntlDateFormatter::create(\n 'en_US',\n IntlDateFormatter::FULL,\n IntlDateFormatter::FULL,\n 'Indian/Maldives',\n IntlCalendar::createInstance('Indian/Maldives', \"en_US@calendar=islamic\"),\n 'yyyy-MM-dd'\n );\n return HijriDate::parse($formatter->format($gregorian));\n }",
"function jd2date($jd)\n{\n\t$x0 = (int)( $jd+68570.0);\n\t$x1 = (int)( $x0/36524.25 );\n\t$x2 = $x0 - (int)( 36524.25*$x1 + 0.75 );\n\t$x3 = (int)( ( $x2+1 )/365.2425 );\n\t$x4 = $x2 - (int)( 365.25*$x3 )+31.0;\n\t$x5 = (int)( (int)($x4) / 30.59 );\n\t$x6 = (int)( (int)($x5) / 11.0 );\n\n\t$time[2] = $x4 - (int)( 30.59*$x5 );\n\t$time[1] = $x5 - 12*$x6 + 2;\n\t$time[0] = 100*( $x1-49 ) + $x3 + $x6;\n\n\t// Compensation on February 30\n\tif ($time[1] == 2 && $time[2] > 28) {\n\t\tif ($time[0] % 100 == 0 && $time[0] % 400 == 0) {\n\t\t\t$time[2] = 29;\n\t\t} elseif ($time[0] % 4 == 0) {\n\t\t\t$time[2] = 29;\n\t\t} else {\n\t\t\t$time[2] = 28;\n\t\t}\n\t}\n\n\t$tm = 86400.0*( $jd - (int)( $jd ) );\n\t$time[3] = (int)( $tm/3600.0 );\n\t$time[4] = (int)( ($tm - 3600.0*$time[3]) / 60.0 );\n\t$time[5] = (int)( $tm - 3600.0*$time[3] - 60*$time[4] );\n\n\treturn($time);\n}",
"function jd_to_hebrew($jd, &$mo, &$da, &$yr) {\n\n\t\t$jd = floor($jd) + 0.5;\n\n\t\t$count = floor((($jd - HEBREW_EPOCH) * 98496.0) / 35975351.0);\n\t\t$yr = $count - 1;\n\n\t\t$jdtest = hebrew_to_jd(7,1,$count);\n\t\tfor ( $i = $count; $jd >= $jdtest; ) {\n\t\t\t$yr++;\n\t\t\t$jdtest = hebrew_to_jd(7,1,++$i);\n\t\t}\n\n\t\t$first = ($jd < hebrew_to_jd(1,1,$yr)) ? 7 : 1;\n\t\t$mo = $first;\n\n\t\t$jdtest = hebrew_to_jd($mo, hebrew_month_days($mo,$yr), $yr);\n\t\tfor ( $i = $first; $jd > $jdtest; ) {\n\t\t\t$mo++;\n\t\t\t$jdtest = hebrew_to_jd(++$i, hebrew_month_days($i,$yr), $yr);\n\t\t}\n\n\n\t\t$da = $jd - hebrew_to_jd($mo, 1, $yr) +1;\n\t}",
"private static function gth($year, $month, $day)\n {\n $year = (int) $year;\n $month = (int) $month - 1; // Month start with Zero\n $day = (int) $day;\n\n $y = $year;\n $m = $month + 1;\n\n // append January and February to the previous year (i.e. regard March as\n // the first month of the year in order to simplify leapday corrections)\n\n $y = $m < 3 ? --$y : $y;\n $m = $m < 3 ? $m += 12 : $m;\n\n // determine offset between Julian and Gregorian calendar\n\n $a = floor($y / 100.);\n $jgc = $a - floor($a / 4.) - 2;\n\n // compute Chronological Julian Day Number (CJDN)\n\n $cjdn = floor(365.25 * ($y + 4716)) + floor(30.6001 * ($m + 1)) + $day - $jgc - 1524;\n\n $a = floor(($cjdn - 1867216.25) / 36524.25);\n $jgc = $a - floor($a / 4.) + 1;\n $b = $cjdn + $jgc + 1524;\n $c = floor(($b - 122.1) / 365.25);\n $d = floor(365.25 * $c);\n $month = floor(($b - $d) / 30.6001);\n\n // compute Modified Chronological Julian Day Number (MCJDN)\n\n $mcjdn = $cjdn - 2400000;\n\n // the MCJDN's of the start of the lunations in the Umm al-Qura calendar are stored in 'islamcalendar_dat.js'\n\n $count = count(self::$UQD);\n for ($i = 0; $i < $count; ++$i) {\n if (self::$UQD[$i] > $mcjdn) {\n break;\n }\n }\n\n // compute and output the Umm al-Qura calendar date\n\n $iln = $i + 16260;\n $ii = floor(($iln - 1) / 12);\n $iy = $ii + 1;\n $im = $iln - 12 * $ii;\n $id = $mcjdn - self::$UQD[$i - 1] + 1;\n\n return self::$date->setYear($iy)->setMonth($im)->setDay($id);\n }",
"function p2g($j_y, $j_m, $j_d){\n $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $jy = $j_y-979;\n $jm = $j_m-1;\n $jd = $j_d-1;\n $j_day_no = 365*$jy + floor($jy/33)*8 + floor(($jy%33+3)/4);\n for ($i=0; $i < $jm; ++$i){\n $j_day_no += $j_days_in_month[$i];\n }\n $j_day_no += $jd;\n $g_day_no = $j_day_no+79;\n $gy = 1600 + 400*floor($g_day_no/146097);\n $g_day_no = $g_day_no % 146097;\n $leap = true;\n if ($g_day_no >= 36525){\n $g_day_no--;\n $gy += 100*floor($g_day_no/36524);\n $g_day_no = $g_day_no % 36524;\n if ($g_day_no >= 365){\n $g_day_no++;\n }else{\n $leap = false;\n }\n }\n $gy += 4*floor($g_day_no/1461);\n $g_day_no %= 1461;\n if ($g_day_no >= 366){\n $leap = false;\n $g_day_no--;\n $gy += floor($g_day_no/365);\n $g_day_no = $g_day_no % 365;\n }\n for ($i = 0; $g_day_no >= $g_days_in_month[$i] + ($i == 1 && $leap); $i++){\n $g_day_no -= $g_days_in_month[$i] + ($i == 1 && $leap);\n }\n $gm = $i+1;\n $gd = $g_day_no+1;\n\n return array($gy, $gm, $gd);\n}",
"public static function createFromGregorian($gregorian = null): HijriDate\n {\n if (is_null($gregorian)) $gregorian = now();\n if (is_string($gregorian)) $gregorian = Carbon::parse($gregorian);\n\n $hijri = self::getConverter()->getHijriFromGregorian($gregorian);\n $hijri->setGregorianDate($gregorian);\n return $hijri;\n }",
"function jd_to_islamic($jd, &$mo, &$da, &$yr) {\n\t\t$jd = floor($jd)+0.5;\n\t\t$yr = floor(((30*($jd-ISLAMIC_EPOCH)) + 10646) / 10631);\n\n\t\t$mo = min(12, ceil(($jd-(29+islamic_to_jd(1,1,$yr)))/29.5)+1);\n\n\t\t$da = $jd - islamic_to_jd($mo,1,$yr) + 1;\n\n\t}",
"function jd_to_unix($jd) {\n\t\t$val=(($jd-UNIX_EPOCH) * SECS_IN_DAY * 1000);\n\t\treturn ( round($val/1000) ) ;\n\t}",
"public function toGregorianString($date, $format=\"Y-m-d\") {\n\t\t\treturn $date->format($format);\n\t\t}",
"public static function getJalali($g_y, $g_m, $g_d) {\n $gy = $g_y - 1600;\n $gm = $g_m - 1;\n $g_day_no = (365 * $gy + static::div($gy + 3, 4) - static::div($gy + 99, 100) + static::div($gy + 399, 400));\n for ($i = 0; $i < $gm; ++$i) {\n $g_day_no += static::$daysMonthGregorian[$i];\n }\n if ($gm > 1 && (($gy % 4 == 0 && $gy % 100 != 0) || ($gy % 400 == 0)))\n # leap and after Feb\n $g_day_no ++;\n $g_day_no += $g_d - 1;\n $j_day_no = $g_day_no - 79;\n $j_np = static::div($j_day_no, 12053); # 12053 = (365 * 33 + 32 / 4)\n $j_day_no = $j_day_no % 12053;\n $jy = (979 + 33 * $j_np + 4 * static::div($j_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)\n $j_day_no %= 1461;\n if ($j_day_no >= 366) {\n $jy += static::div($j_day_no - 1, 365);\n $j_day_no = ($j_day_no - 1) % 365;\n }\n for ($i = 0; ($i < 11 && $j_day_no >= static::$daysMonthJalali[$i]); ++$i) {\n $j_day_no -= static::$daysMonthJalali[$i];\n }\n return array($jy, $i + 1, $j_day_no + 1);\n }",
"function islamic_to_jd($mo,$da,$yr) {\n\t\treturn ( $da + ceil(29.5*($mo-1)) + ($yr-1)*354 +\n\t\t\tfloor((3+(11*$yr))/30)+ ISLAMIC_EPOCH - 1);\n\t}",
"function hebrew_to_jd($mo, $da, $yr) {\n\n\t\t$mos = hebrew_year_months($yr);\n\n\t\t$jd = HEBREW_EPOCH + hebrew_delay_1($yr) + hebrew_delay_2($yr) + $da + 1;\n\n\t\tif ($mo < 7 ) {\n\t\t\tfor ($m = 7; $m <= $mos; $m++) $jd += hebrew_month_days($m, $yr);\n\t\t\tfor ($m = 1; $m < $mo; $m++) $jd += hebrew_month_days($m, $yr);\n\t\t} else {\n\t\t\tfor ($m = 7; $m < $mo; $m++ ) $jd += hebrew_month_days($m, $yr);\n\t\t}\n\n\t\treturn ($jd);\n\t}",
"function leap_gregorian($year) {\n\n\t\treturn ( (($year % 4)==0) && (!( (($year % 100)==0) && (($year % 400) != 0) )));\n\t}",
"function JD($year, $month, $day)\n {\n // ref: J. Meeus, Astronomical Algorithms\n $y = $year; $m = $month; $d = $day;\n if ($m <= 2) {\n $y = $y - 1;\n $m = $m + 12;\n }\n $a = floor($y/100);\n $b = 2 - $a + floor($a/4);\n $JD = floor(365.25*($y+4716)) + floor(30.6001*($m+1)) + $d + $b - 1524.5;\n return $JD;\n }",
"function date2jd()\n{\n\t@list($y,$m,$d,$h,$i,$s) = func_get_args();\n\n\tif( $m < 3.0 ) {\n\t\t$y -= 1.0;\n\t\t$m += 12.0;\n\t}\n\n\t$jd = (int)( 365.25 * $y );\n\t$jd += (int)( $y / 400.0 );\n\t$jd -= (int)( $y / 100.0 );\n\t$jd += (int)( 30.59 * ( $m-2.0 ) );\n\t$jd += 1721088;\n\t$jd += $d;\n\n\t$t = $s / 3600.0;\n\t$t += $i /60.0;\n\t$t += $h;\n\t$t = $t / 24.0;\n\n\t$jd += $t;\n\treturn( $jd );\n}",
"protected function julianDayToDatetime(float $julianDay): \\DateTime\n {\n $J = $julianDay + 0.5;\n\n $Z = (int) $J;\n $F = $J - $Z;\n\n $A = $Z;\n if ($Z >= 2299161) {\n $a = $this->intDiv($Z - 1867216.25, 36524.25);\n $A = $Z + 1 + $a - $this->intDiv($a, 4);\n }\n\n $B = $A + 1524;\n $C = $this->intDiv($B - 122.1, 365.25);\n $D = (int) (365.25 * $C);\n $E = $this->intDiv($B - $D, 30.6001);\n\n $day = $B - $D - (int) (30.6001 * $E) + $F;\n if ($E < 14) {\n $month = $E - 1;\n } else {\n $month = $E - 13;\n }\n if ($month > 2) {\n $year = $C - 4716;\n } else {\n $year = $C - 4715;\n }\n\n $decimalDayTime = $day - (int) $day;\n\n $time = new Time(24 * $decimalDayTime);\n $hour = $time->getHour();\n $minute = $time->getMinute();\n $second = $time->getDecimalSecond();\n\n $dateTime = new \\DateTime(\n sprintf('%04d-%02d-%02d %02d:%02d:%02.1f', $year, $month, $day, $hour, $minute, $second),\n new \\DateTimeZone('UTC')\n );\n\n return $dateTime;\n }",
"function gregorianToHuman($day=0, $month=0, $year=0)\n {\n /**\n * Check to see if any of the arguments are empty\n * If they are then populate the $dateinfo array\n * Then check to see which arguments are empty and fill\n * those with the current date info\n */\n if ((empty($day) || (empty($month)) || empty($year))) {\n $dateinfo = getdate(time());\n }\n if (empty($day)) {\n $day = $dateinfo[\"mday\"];\n }\n if (empty($month)) {\n $month = $dateinfo[\"mon\"];\n }\n if (empty($year)) {\n $year = $dateinfo[\"year\"];\n }\n /**\n * We need to know how many days into the year we are\n */\n $dateinfo = getdate(mktime(0, 0, 0, $month, $day, $year));\n $dayofyear = $dateinfo[\"yday\"];\n /**\n * Human Calendar starts at 0 for months and the first day of the year\n * is designated 00, so we need to start our day of the year at 0 for\n * these calculations.\n * Also, the day of the month is calculated with a modulus of 28.\n * Because a day is 28 days, the last day of the month would have a\n * remainder of 0 and not 28 as it should be. Decrementing $dayofyear\n * gets around this.\n */\n $dayofyear--;\n /**\n * 28 days in a month...\n */\n $humanMonthOfYear = floor($dayofyear / 28);\n /**\n * If we are in the first month then the day of the month is $dayofyear\n * else we need to find the modulus of 28.\n */\n if ($humanMonthOfYear == 0) {\n $humanDayOfMonth = $dayofyear;\n } else {\n $humanDayOfMonth = ($dayofyear) % 28;\n }\n /**\n * Day of the week is modulus 7\n */\n $humanDayOfWeek = $dayofyear % 7;\n /**\n * We can now increment $dayofyear back to it's correct value for\n * the remainder of the calculations\n */\n $dayofyear++;\n /**\n * $humanDayOfMonth needs to be incremented now - recall that we fudged\n * it a bit by decrementing $dayofyear earlier\n * Same goes for $humanDayOfWeek\n */\n $humanDayOfMonth++;\n $humanDayOfWeek++;\n /**\n * Week of the month is day of the month divided by 7, rounded up\n * Same for week of the year, but use $dayofyear instead $humanDayOfMonth\n */\n $humanWeekOfMonth = ceil($humanDayOfMonth / 7);\n $humanWeekOfYear = ceil($dayofyear / 7);\n /**\n * Return an associative array of the values\n */\n return array(\n \"hdom\" => $humanDayOfMonth,\n \"hdow\" => $humanDayOfWeek,\n \"hwom\" => $humanWeekOfMonth,\n \"hwoy\" => $humanWeekOfYear,\n \"hmoy\" => $humanMonthOfYear );\n }",
"protected function dateTimeToJulianDay(\\DateTime $dateTime): float\n {\n $dt = $dateTime;\n $dt->setTimezone(new \\DateTimeZone('UTC'));\n\n $year = $dt->format('Y');\n $month = $dt->format('m');\n $day = $dt->format('d');\n $hour = $dt->format('H');\n $minute = $dt->format('i');\n $second = $dt->format('s');\n\n if (bccomp($month, '2') <= 0) {\n $year = bcsub($year, '1');\n $month = bcadd($month, '12');\n }\n\n $hour = bcdiv($hour, '24');\n $hour = bcadd($hour, bcdiv($minute, '1440'));\n $hour = bcadd($hour, bcdiv($second, '86400'));\n\n $dtGregorianCalendarUpper = new \\DateTime('1582-10-15 00:00:00', new \\DateTimeZone('UTC'));\n $dtGregorianCalendarLower = new \\DateTime('1582-10-04 24:00:00', new \\DateTimeZone('UTC'));\n\n if ($dt > $dtGregorianCalendarLower && $dt < $dtGregorianCalendarUpper) {\n throw new \\InvalidArgumentException(\n \"DateTime is between 1582-10-04 24:00:00 and 1582-10-15 00:00:00 and therefore cannot be used.\"\n );\n }\n\n $B = '0';\n\n if ($dt >= $dtGregorianCalendarUpper) {\n $A = bcdiv($year, '100', 0);\n $B = bcadd(bcsub('2', $A), bcdiv($A, '4', 0));\n }\n\n $part1 = bcmul('365.25', bcadd($year, '4716'), 0);\n $part2 = bcmul('30.6001', bcadd($month, '1'), 0);\n $part3 = bcsub(bcadd(bcadd($day, $hour), $B), '1524.5');\n\n $result = bcadd(bcadd($part1, $part2), $part3);\n\n return (float) $result;\n }",
"function unix_to_jd($t) {\n\t\treturn ( UNIX_EPOCH + t / SECS_IN_DAY);\n\t}",
"function hebrew_year_days($yr) {\n\t\treturn ( hebrew_to_jd(7, 1, $yr + 1) - hebrew_to_jd(7, 1, $yr) );\n\t}",
"function g2p($g_y, $g_m, $g_d){\n $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n\n $gy = $g_y-1600;\n $gm = $g_m-1;\n $gd = $g_d-1;\n\n $g_day_no = 365*$gy+floor(($gy+3)/4)-floor(($gy+99)/100)+floor(($gy+399)/400);\n\n for ($i=0; $i < $gm; ++$i){\n $g_day_no += $g_days_in_month[$i];\n }\n\n if ($gm>1 && (($gy%4==0 && $gy%100!=0) || ($gy%400==0))){\n /* leap and after Feb */\n ++$g_day_no;\n }\n\n $g_day_no += $gd;\n $j_day_no = $g_day_no-79;\n $j_np = floor($j_day_no/12053);\n $j_day_no %= 12053;\n $jy = 979+33*$j_np+4*floor($j_day_no/1461);\n $j_day_no %= 1461;\n\n if ($j_day_no >= 366) {\n $jy += floor(($j_day_no-1)/365);\n $j_day_no = ($j_day_no-1)%365;\n }\n $j_all_days = $j_day_no+1;\n\n for ($i = 0; $i < 11 && $j_day_no >= $j_days_in_month[$i]; ++$i) {\n $j_day_no -= $j_days_in_month[$i];\n }\n\n $jm = $i+1;\n $jd = $j_day_no+1;\n\n return array($jy, $jm, $jd, $j_all_days);\n}",
"function persian_date_utf($format, $timestamp='') {\n\n if($timestamp==''){\n $timestamp = mktime();\n }\n\n $g_d=date('j', $timestamp);\n $g_m=date('n', $timestamp);\n $g_y=date('Y', $timestamp);\n\n list($jy, $jm, $jd, $j_all_days) = g2p($g_y, $g_m, $g_d);\n\n $j_days_in_month = array(0, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $leap = 0;\n if ($g_m>1 && (($g_y%4==0 && $g_y%100!=0) || ($g_y%400==0))){\n $j_days_in_month[12]++;\n $leap = 1;\n }\n\n $j_month_name = array('', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر',\n 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند');\n $j_week_name = array('Saturday' => 'شنبه',\n 'Sunday' => 'یک شنبه',\n 'Monday' => 'دوشنبه',\n 'Tuesday' => 'سه شنبه',\n 'Wednesday' => 'چهارشنبه',\n 'Thursday' => 'پنج شنبه',\n 'Friday' => 'جمعه',\n 'Sat' => 'ش',\n 'Sun' => 'ی',\n 'Mon' => 'د',\n 'Tue' => 'س',\n 'Wed' => 'چ',\n 'Thu' => 'پ',\n 'Fri' => 'ج');\n $j_week_number = array('Sat' => '1',\n 'Sun' => '2',\n 'Mon' => '3',\n 'Tue' => '4',\n 'Wed' => '5',\n 'Thu' => '6',\n 'Fri' => '7');\n\n // calculate string\n $output_str='';\n\n for ($i=0; $i<strlen($format); $i++){\n\n if($format[$i]!='\\\\'){\n switch($format[$i]){\n case 'd':\n if($jd<10) $output_str.='0'.$jd; else $output_str.=$jd;\n break;\n case 'j':\n $output_str.=$jd;\n break;\n case 'D':\n case 'S':\n $output_str.=$j_week_name[date('D', $timestamp)];\n break;\n case 'l':\n $output_str.=$j_week_name[date('l', $timestamp)];\n break;\n case 'w':\n case 'N':\n $output_str.=$j_week_number[date('D', $timestamp)];\n break;\n case 'z':\n $output_str.=sprintf('%03d', $j_all_days);\n break;\n case 'W':\n $output_str.=floor(($j_all_days+1)/7);\n break;\n case 'F':\n case 'M':\n $output_str.=$j_month_name[$jm];\n break;\n case 'm':\n if($jm<10) $output_str.='0'.$jm; else $output_str.=$jm;\n break;\n case 'n':\n $output_str.=$jm;\n break;\n case 't':\n $output_str.=$j_days_in_month[$jm];\n break;\n case 'L':\n $output_str.=$leap;\n break;\n case 'o':\n case 'Y':\n $output_str.=$jy;\n break;\n case 'y':\n $output_str.=$jy-(floor($jy/100)*100);\n break;\n case 'a':\n case 'A':\n if(date('a', $timestamp)=='pm') $output_str.='بعد از ظهر'; else $output_str.='قبل از ظهر';\n break;\n case 'B':\n $output_str.=date('B', $timestamp);\n break;\n case 'g':\n $output_str.=date('g', $timestamp);\n break;\n case 'G':\n $output_str.=date('G', $timestamp);\n break;\n case 'h':\n $output_str.=date('h', $timestamp);\n break;\n case 'H':\n $output_str.=date('H', $timestamp);\n break;\n case 'i':\n $output_str.=date('i', $timestamp);\n break;\n case 's':\n $output_str.=date('s', $timestamp);\n break;\n case 'e':\n $output_str.=date('e', $timestamp);\n break;\n case 'I':\n $output_str.=date('I', $timestamp);\n break;\n case 'O':\n $output_str.=date('O', $timestamp);\n break;\n case 'Z':\n $output_str.=date('Z', $timestamp);\n break;\n case 'c':\n $output_str.=persian_date_utf('d-m-Y\\TH:i:sO', $timestamp);\n break;\n case 'r':\n $output_str.=persian_date_utf('D، j F Y H:i:s O', $timestamp);\n break;\n case 'U':\n $output_str.=date('U', $timestamp);\n break;\n default:\n $output_str.=$format[$i];\n break;\n }\n } else {\n $i++;\n $output_str.=$format[$i];\n }\n }\n\n return $output_str;\n}",
"function jd_to_weekday($jd) {\n\t\treturn ( floor( ($jd+8.5) % 7 ) );\n\t}",
"public function toLunarHijriString($date, $format=\"YYYY/MM/DD\") {\n\t\t\t$DateConverter = new Hijri_GregorianConvert;\n\t\t\treturn $DateConverter->GregorianToHijri($date->format(\"Y-m-d\"),$format);\n\t\t}",
"public static function hijri($format = 'f' ,$date = null)\n {\n return Tawkit::fullHijri($date,$format); \n }",
"public function get_year()\n {\n $round = $this->get_round();\n $roundNumber = $round['numero'];\n /*Se obtiene la fecha final para sacar el año*/\n $r = $round['fecha_final'];\n /*Se concatena el año, siempre son 4 caracteres*/\n $año = $r[0].$r[1].$r[2].$r[3];\n \n return $año;\n }",
"function easter_jd ( $year, $offset=0 ) {\n\n\t\t$FirstDig = (int)($year/100);\t//first 2 digits of year\n\t\t$Remain19 = $year % 19;\t\t\t//remainder of year / 19\n\n\t\t//calculate PFM date\n\n\t\t$temp = ( (int)(($FirstDig - 15) /2) + 202 - 11 * $Remain19);\n\n\t\tswitch ($FirstDig) {\n\t\t\tcase 21:\n\t\t\tcase 24:\n\t\t\tcase 25:\n\t\t\tcase 27:\n\t\t\tcase 28:\n\t\t\tcase 29:\n\t\t\tcase 30:\n\t\t\tcase 31:\n\t\t\tcase 32:\n\t\t\tcase 34:\n\t\t\tcase 35:\n\t\t\tcase 38:\n\t\t\t\t$temp = $temp - 1;\n\t\t\t\tbreak;\n\n\t\t\tcase 33:\n\t\t\tcase 36:\n\t\t\tcase 37:\n\t\t\tcase 39:\n\t\t\tcase 40:\n\t\t\t\t$temp = $temp - 2;\n\t\t\t\tbreak;\n\t\t}\t//end switch\n\n\t\t$temp = $temp % 30;\n\n\t\t$tA = $temp + 21;\n\t\tif ($temp == 29 ) $tA = $tA -1;\n\t\tif($temp == 28 And $Remain19 > 10) $tA = $tA - 1;\n\n\t\t//find the next Sunday\n\t\t$tB = ($tA - 19) % 7;\n\n\t\t$tC = (40 - $FirstDig) % 4;\n\t\tif ($tC == 3) $tC = $tC +1;\n\t\tif ($tC > 1) $tC = $tC +1;\n\n\t\t$temp = $year % 100;\n\t\t$tD = ($temp + ((int)($temp / 4)) ) % 7;\n\n\t\t$tE = ((20 -$tB - $tC - $tD) % 7 ) + 1;\n\t\t$da = $tA + $tE;\n\n\t\t//return the date\n\t\tif ( $da > 31 ) {\n\t\t\t$da = $da - 31;\n\t\t\t$mo = 4;\n\t\t} else {\n\t\t\t$mo = 3;\n\t\t}\n\n\t\treturn( gregorian_to_jd($mo, $da, $year) + $offset );\n\n\t}",
"private function excel_date($serial){\n //from http://richardlynch.blogspot.com/2007/07/php-microsoft-excel-reader-and-serial.html\n // Excel/Lotus 123 have a bug with 29-02-1900. 1900 is not a\n // leap year, but Excel/Lotus 123 think it is...\n if ($serial == 60) {\n $day = 29;\n $month = 2;\n $year = 1900;\n \n return sprintf('%02d/%02d/%04d', $month, $day, $year);\n }\n else if ($serial < 60) {\n // Because of the 29-02-1900 bug, any serial date \n // under 60 is one off... Compensate.\n $serial++;\n }\n \n // Modified Julian to DMY calculation with an addition of 2415019\n $l = $serial + 68569 + 2415019;\n $n = floor(( 4 * $l ) / 146097);\n $l = $l - floor(( 146097 * $n + 3 ) / 4);\n $i = floor(( 4000 * ( $l + 1 ) ) / 1461001);\n $l = $l - floor(( 1461 * $i ) / 4) + 31;\n $j = floor(( 80 * $l ) / 2447);\n $day = $l - floor(( 2447 * $j ) / 80);\n $l = floor($j / 11);\n $month = $j + 2 - ( 12 * $l );\n $year = 100 * ( $n - 49 ) + $i + $l;\n return sprintf('%04d-%02d-%02d', $year, $month, $day);\n }",
"protected function get_calendar()\n\t{\n\t\treturn $this->calendars['gregorian'];\n\t}",
"function get_date_numeral($format = 'Y-m-d') {\n\t$format = ($format == '') ? 'Y-m-d' : $format;\n\t$format = str_replace('Y', '9999', $format);\n\t$format = str_replace('m', '99', $format);\n\t$format = str_replace('d', '99', $format);\n\treturn $format;\n}",
"public function getBirthCentury() : int\n {\n $firstNo = substr($this->code, 0, 1);\n return 1700 + ceil($firstNo / 2) * 100;\n }",
"private function dateDuJour(){\n return date(\"Y-m-d\");\n }",
"function convert_date( $uglydate ){\n\t$date = new DateTime( $uglydate );\n\treturn $nicedate = $date->format('F j, Y');\n}",
"public static function gengo($year)\n {\n if ($year >= 1911 && $year <= 1925) {\n $no = $year - 1911;\n\n return \"大正\" . $no;\n }\n\n // tinh nam shouwa ex: value - 1925\n if ($year > 1925 && $year <= 1988) {\n $no = $year - 1925;\n\n return \"昭和\" . $no;\n }\n // tinh nam heisei\n if ($year >= 1989) {\n $no = $year - 1988;\n\n return \"平成\" . $no;\n }\n\n return $year;\n }",
"function COM_JSdate(&$date) {\r\n\t//note: the \"intval\" removes the leading zero which JS interprets as octal number;\r\n\t//\t\"-1\" needed because JS expects month rel to 0 (but not day) and same as \"intval\")\r\n\treturn $date->format(\"Y\").\",\".($date->format(\"m\")-1).\",\".intval($date->format(\"d\"));\r\n}",
"private function _radius_format_date($d){\n $arr_date = explode('/',$d);\n $month = intval($arr_date[0]);\n $m_arr = array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');\n $day = intval($arr_date[1]);\n $year = intval($arr_date[2]);\n return \"$day \".$m_arr[($month-1)].\" $year\";\n }",
"function centuryFromYear($year)\n{\n return $year%100==0?(int)floor($year/100):(int)floor($year/100)+1;\n}",
"public function getAge()\n {\n $this->checkJMBG();\n\n $timestamp = $this->getBirthdayTimeStamp();\n $now = time();\n $diff = $now - $timestamp;\n return date('Y', $diff) - 1970;\n }",
"public function rad2deg() : self\n {\n return $this->map('rad2deg');\n }",
"function getDateJhjjmmtt() {\n\t\n\t$date \t= getdate();\n\t$year \t= $date['year'];\n\t$mon \t= $date['mon'];\n $day\t\t= $date['mday'];\n \n\tif( $mon < \"10\" ) \t\t$mon = \"0\".$mon;\n\tif( $day < \"10\" )\t\t$day = \"0\".$day;\n\t\n\t$moddate \t= $year.$mon.$day;\n\n\treturn $moddate;\n}",
"function radToDeg() { # :: Num -> Float\n return new Num\\Float(rad2deg($this->value));\n }",
"function getBanglaDate($date) {\r\n\r\n$engArray = array (\r\n1,2,3,4,5,6,7,8,9,0, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'am', 'pm', 'th', 'st', 'rd', 'th', 'Sat', 'Sun', 'Mon', 'Tue', 'Tues', 'Wed', 'Thurs', 'Thu', 'Fri', 'Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'\r\n);\r\n$bangArray = array (\r\n\t'১','২','৩','৪','৫','৬','৭','৮','৯','০',\r\n\t'জানুয়ারি', 'ফেব্রুয়ারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর',\r\n\t'সকাল', 'দুপুর', '-এ', '-এ', '-এ', '-এ', 'শনি', 'রবি', 'সোম', 'মঙ্গল', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'বৃহস্পতি', 'শুক্র', 'শনিবার', 'রবিবার',\r\n\t'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার'\r\n);\r\n\r\n\t$converted = str_replace($engArray, $bangArray, $date);\r\n \treturn $converted;\r\n}",
"function convertdateanglais($date){\n\t$ladate=explode('-',$date);\n\t$jour=$ladate[2];\n\t$moi=$ladate[1];\n\t$anne=$ladate[0];\n\t$madate=date(\"d/m/Y\", mktime(0, 0, 0, $moi, $jour, $anne));\n\treturn $madate;\n}",
"function create_date_value($date) {\n\t\t// Since no calendar is specified, should we always convert to gregorian?\n\t\t$date=$date->convert_to_cal('gregorian');\n\t\treturn\n\t\t\t($date->y==0 ? '????' : $date->Format('Y')) .'-'.\n\t\t\t($date->m==0 ? '??' : $date->Format('m')) .'-'.\n\t\t\t($date->d==0 ? '??' : $date->Format('d'));\n\t}",
"public function getInternationalBirthDate()\n {\n return $this->internationalBirthDate;\n }",
"function age_to_birthdate($age)\n{\n $age_int = intval(trim((string)$age));\n $now = new \\DateTime();\n $bday = $now->sub(new \\DateInterval(\"P\" . $age_int . \"Y6M\"));\n return $bday->format(\\DateTime::ATOM);\n}",
"function strtotime($inputtime)\n\t{\n\t\treturn strtotime(XoopsLocaleJalali::inputTimeToGregorian($inputtime));\n\t}",
"static function convert_iso_to_jquery_format($format) {\n\t\t$convert = array(\n\t\t\t'/([^d])d([^d])/' => '$1d$2',\n\t\t '/^d([^d])/' => 'd$1',\n\t\t '/([^d])d$/' => '$1d',\n\t\t '/dd/' => 'dd',\n\t\t '/EEEE/' => 'DD',\n\t\t '/EEE/' => 'D',\n\t\t '/SS/' => '',\n\t\t '/eee/' => 'd',\n\t\t '/e/' => 'N',\n\t\t '/D/' => '',\n\t\t '/w/' => '',\n\t\t\t// make single \"M\" lowercase\n\t\t '/([^M])M([^M])/' => '$1m$2',\n\t\t\t// make single \"M\" at start of line lowercase\n\t\t '/^M([^M])/' => 'm$1',\n\t\t\t\t// make single \"M\" at end of line lowercase\n\t\t '/([^M])M$/' => '$1m',\n\t\t\t// match exactly three capital Ms not preceeded or followed by an M\n\t\t '/(?<!M)MMM(?!M)/' => 'M',\n\t\t\t// match exactly two capital Ms not preceeded or followed by an M\n\t\t '/(?<!M)MM(?!M)/' => 'mm',\n\t\t\t// match four capital Ms (maximum allowed)\n\t\t '/MMMM/' => 'MM',\n\t\t '/l/' => '',\n\t\t '/YYYY/' => 'yy',\n\t\t '/yyyy/' => 'yy',\n\t\t '/[^y]yy[^y]/' => 'y',\n\t\t '/a/' => '',\n\t\t '/B/' => '',\n\t\t '/hh/' => '',\n\t\t '/h/' => '',\n\t\t '/([^H])H([^H])/' => '',\n\t\t '/^H([^H])/' => '',\n\t\t '/([^H])H$/' => '',\n\t\t '/HH/' => '',\n\t\t // '/mm/' => '',\n\t\t '/ss/' => '',\n\t\t '/zzzz/' => '',\n\t\t '/I/' => '',\n\t\t '/ZZZZ/' => '',\n\t\t '/Z/' => '',\n\t\t '/z/' => '',\n\t\t '/X/' => '',\n\t\t '/r/' => '',\n\t\t '/U/' => '',\n\t\t);\n\t\t$patterns = array_keys($convert);\n\t\t$replacements = array_values($convert);\n\t\t\n\t\treturn preg_replace($patterns, $replacements, $format);\n\t}",
"public function getStartDate($format)\n {\n return gmdate($format, gmmktime(0, 0, 0, $this->getStartMonth(), 1, $this->getStartYear()));\n }",
"public function getBirthdayTimeStamp()\n {\n $this->checkJMBG();\n\n $arr = $this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = $v;\n\n $d = \"$A$B\";\n $m = \"$C$D\";\n $y = \"$E$F$G\";\n if ((int)$y > 900) $y = '1' . $y;\n else $y = '2' . $y;\n\n return mktime(0, 0, 0, (int)$m, (int)$d, (int)$y);\n }",
"function _putDateConvGtJDate(&$pdf, $src, $x, $height, $font)\n {\n $year = date('Y', strtotime($src));\n $month = date('n', strtotime($src));\n $day = date('j', strtotime($src));\n// list($year, $month, $day) = explode('-', $src);\n $date = str_replace('-', '', $src);\n if ($date >= 19890108) {\n $gengo = '平成';\n $wayear = $year - 1988;\n } elseif ($date >= 19261225) {\n $gengo = '昭和';\n $wayear = $year - 1925;\n } elseif ($date >= 19120730) {\n $gengo = '大正';\n $wayear = $year - 1911;\n } else {\n $gengo = '明治';\n $wayear = $year - 1868;\n }\n //Set x y month day\n $pdf->SetXY($x + 2.5, $height + 0.7);\n $pdf->MultiCell(20, 5, $wayear, 0, 'C');\n $pdf->SetXY($x + 10.0, $height + 0.7);\n $pdf->MultiCell(20, 5, $month, 0, 'C');\n $pdf->SetFont($font, null, 14, true);\n\n if ($gengo == '昭和') {\n $pdf->SetXY($x - 8.8, $height - 2.5);\n $pdf->MultiCell(28, 2, '◯', 0, 'C');\n }\n if ($gengo == '平成') {\n $pdf->SetXY($x - 8.8, $height + 1.6);\n $pdf->MultiCell(28, 2, '◯', 0, 'C');\n }\n }",
"public function getBirthDate()\n {\n if ($this->birthDate) {\n return $this->birthDate;\n }\n\n $centuryCode = substr($this->personal_code, 0, 1);\n if ($centuryCode < 3) {\n $century = 19;\n } elseif ($centuryCode < 5) {\n $century = 20;\n } else {\n $century = 21;\n }\n\n $this->birthDate = new \\DateTime(($century - 1) . substr($this->personal_code, 1, 6));\n\n return $this->birthDate;\n }",
"private function retrieve_currentday() {\n\t\tstatic $replacement;\n\n\t\tif ( ! isset( $replacement ) ) {\n\t\t\t$replacement = date_i18n( 'j' );\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"function getDateJour()\n {\n return $this->formatDateDBversLocal(date('Y-m-d'));\n }",
"function hebrew_year_months($yr) {\n\t\treturn ( hebrew_leap($yr) ? 13 : 12 );\n\t}",
"public function getYear()\r\n\t{\r\n\t\treturn $this->format('y');\r\n\t}",
"function average_tropical_year_length(DateTime $d = null): float {\n $utc = new DateTimeZone('UTC');\n if ($d === null) {\n $d = new DateTime('now', $utc);\n }\n $d1 = new DateTime('2000-01-01 12:00:00', $utc);\n $di = date_diff($d, $d1);\n $t = $di->days / 36525;\n echo \"Number of Julian centuries since 2000-01-01T12:00:00UTC is $t<br>\";\n return 365.2421896698 - 6.15359e-6 * $t - 7.29e-10 * $t ** 2 + 2.64e-10 * $t ** 3;\n}",
"public function getBirthday($format = 'd.m.Y.')\n {\n return date($format, $this->getBirthdayTimeStamp());\n }",
"function get_year()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"year\"];\n }",
"private function calculateBirthDateAndGender()\n {\n $year = $this->subject->getBirthDate()->format('y');\n $month = $this->months[$this->subject->getBirthDate()->format('n')];\n $day = $this->subject->getBirthDate()->format('d');\n if (strtoupper($this->subject->getGender()) == self::CHR_WOMEN) {\n $day += 40;\n }\n\n return $year . $month . $day;\n }",
"function getF_gasto()\n {\n if (!isset($this->df_gasto) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n $oConverter = new core\\ConverterDate('date', $this->df_gasto);\n return $oConverter->fromPg();\n }",
"public function ToHijri()\n {\n\n\n }",
"function genDate() {\n\n\t\t$month = strftime(\"%m\");\n\n\t\t$day = strftime(\"%d\");\n\t\t\t\n\t\t$year = strftime(\"%Y\");\n\n\t\t$currentDate = $year . $month . $day;\n\t\t$currentDate = (integer) $currentDate;\n\n\t\treturn $currentDate;\n\t}",
"function convertDate ($matches) {\n\t$year = array_pop($matches['year']); //Get last found year\n\t$year = ($year) ? $year : date('Y'); //If nothing found, use this year\n\t$month = array_pop($matches['month']); //Get last found month\n\t$month = ($month) ? $month : '01'; //If nothing found, use January\n\t$day = array_pop($matches['day']); //Get last found day\n\t$day = ($day) ? $day : '01'; //If nothing found, use 1st\n\t$time = date('U', strtotime($month . '/' . $day . '/' . $year)); //Convert to unix timestamp\n\treturn $time;\n}",
"function getYear($digits=2){\r\n switch($digits){\r\n case 2: return date('y',$this->timestamp); \r\n case 4: return date('Y',$this->timestamp); \r\n default: return date('Y',$this->timestamp); \r\n }\r\n }",
"function decodeLunarYear($yy, $k) {\n\t\t$ly = array();\n\t\t$monthLengths = array(29, 30);\n\t\t$regularMonths = array(12);\n\t\t$offsetOfTet = $k >> 17;\n\t\t$leapMonth = $k & 0xf;\n\t\t$leapMonthLength = $monthLengths[$k >> 16 & 0x1];\n\t\t$solarNY = $this->jdFromDate(1, 1, $yy);\n\t\t$currentJD = $solarNY+$offsetOfTet;\n\t\t$j = $k >> 4;\n\t\tfor($i = 0; $i < 12; $i++) {\n\t\t\t$regularMonths[12 - $i - 1] = $monthLengths[$j & 0x1];\n\t\t\t$j >>= 1;\n\t\t}\n\t\tif ($leapMonth == 0) {\n\t\t\tfor($mm = 1; $mm <= 12; $mm++) {\n\t\t\t\t$ly[] = $this->LunarDate(1, $mm, $yy, 0, $currentJD);\n\t\t\t\t$currentJD += $regularMonths[$mm-1];\n\t\t\t}\n\t\t} else {\n\t\t\tfor($mm = 1; $mm <= $leapMonth; $mm++) {\n\t\t\t\t$ly[] = $this->LunarDate(1, $mm, $yy, 0, $currentJD);\n\t\t\t\t$currentJD += $regularMonths[$mm-1];\n\t\t\t}\n\t\t\t$ly[] = $this->LunarDate(1, $leapMonth, $yy, 1, $currentJD);\n\t\t\t$currentJD += $leapMonthLength;\n\t\t\tfor($mm = $leapMonth+1; $mm <= 12; $mm++) {\n\t\t\t\t$ly[] = $this->LunarDate(1, $mm, $yy, 0, $currentJD);\n\t\t\t\t$currentJD += $regularMonths[$mm-1];\n\t\t\t}\n\t\t}\n\t\treturn $ly;\n\t}",
"function translate_date_to_ro($date_eng)\n{\n $days_of_week = ['Mon' => 'Luni,', 'Tue' => 'Marti,', 'Wed' => 'Miercuri,', 'Thu' => 'Joi,', 'Fri' => 'Vineri,', 'Sat' => 'Sambata,', 'Sun' => 'Duminica,'];\n $months_of_year = ['01' => 'Ian', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'Mai', '06' => 'Iun', '07' => 'Iul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Noi', '12' => 'Dec'];\n $date_eng = explode(\" \", $date_eng);\n $date_eng[0] = $days_of_week[$date_eng[0]];\n $date_eng[2] = $months_of_year[$date_eng[2]];\n $date_ro = implode(\" \", $date_eng);\n//print_r($date_ro);\n return $date_ro;\n}",
"function convert_date_to_kh_date($date_string, $splitted_by = '.')\n{\n if (odm_language_manager()->get_current_language() == 'km') {\n $splitted_date = explode($splitted_by, $date_string);\n $joined_date = '';\n if (count($splitted_date) > 1) {\n if (strlen($date_string) == 7) {\n $month_year = $splitted_date;\n if ($month_year[0] != '00') {\n $joined_date .= ' ខែ'.convert_to_kh_month($month_year[0]);\n }\n if ($month_year[1] != '0000') {\n $joined_date .= ' ឆ្នាំ'.convert_to_kh_number($month_year[1]);\n }\n } else {\n $day_month_year = $splitted_date;\n if ($day_month_year[0] != '00') {\n $joined_date .= 'ថ្ងៃទី '.convert_to_kh_number($day_month_year[0]);\n }\n if ($day_month_year[1] != '00') {\n $joined_date .= ' ខែ'.convert_to_kh_month($day_month_year[1]);\n }\n if ($day_month_year[2] != '0000') {\n $joined_date .= ' ឆ្នាំ'.convert_to_kh_number($day_month_year[2]);\n }\n }\n } else {\n if (strlen($date_string) == 4) {\n $joined_date = ' ឆ្នាំ'.convert_to_kh_number($date_string);\n }\n }\n\n return $joined_date;\n } else {\n $return_date = date('d F Y', strtotime($date_string));\n\n return $my_date;\n }\n}",
"public function convert2NumYearto4NumYear($y)\n\t{\n\t\tif(strlen($y)>2) return $y;\n\t\t\n\t\treturn 2000+$y;\n\t\t\n\t}",
"function kelvin_to_celcius($k){\r\n $d = $k - 273.15;\r\n return $d;\r\n }",
"private static function htg($year, $month, $day)\n {\n $year = (int) $year;\n $month = (int) $month;\n $day = (int) $day;\n\n $ii = $year - 1;\n $iln = ($ii * 12) + 1 + ($month - 1);\n $i = $iln - 16260;\n $mcjdn = $day + self::$UQD[$i - 1] - 1;\n $cjdn = $mcjdn + 2400000;\n\n return self::jtg($cjdn);\n }",
"function getYearOfBirth() {\n global $USER;\n\t$yearOfBirth = date(\"Y\", $USER['dob']);\n\treturn $yearOfBirth;\n}",
"function convertDateToJS($date) {\n\n $ret = explode(\"-\", $date);\n $ano = $ret[0];\n $mes = ((int) $ret[1]) - 1;\n $dia = (int) $ret[2];\n return \"new Date(\" . $ano . \",\" . $mes . \",\" . $dia . \")\";\n}",
"public function reg_date($dt) {\n\t\t$day = array(\"Domingo,\", \"Lunes,\", \"Martes,\", \"Miércoles,\", \"Jueves,\", \"Viernes,\" ,\"Sábado,\");\n\t\t$month = array(\"\",\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\");\n\t\tdate_default_timezone_set(\"Europe/Madrid\");\n\t\t$fecha_reg = $day[date('w', $dt)].date(\" d\", $dt).\" de \".$month[date('n', $dt)].\" de \".date(\"Y\", $dt).\" a las \".date(\"G:i\", $dt).\" hrs.\";\n\t\treturn $fecha_reg;\n\t}",
"public function finishPersian()\n {\n $verta = new \\Verta($this->finish);\n\n $result = $verta->format('Y-n-j H:i');\n\n return $result;\n }",
"function uwa_gmdate($format, $timestamp=false) {\n\tif(!$timestamp) $timestamp = date_time_get_time();\n\t\n\tif(function_exists('adodb_gmdate')) {\t// We can have problems with mktime when using dates before 1970 or hight 2038\n\t\t$func_name = 'adodb_gmdate';\n\t} else {\n\t\t$func_name = 'gmdate';\n\t}\n\treturn $func_name($format, $timestamp);\n}",
"function date_getgmdate( $gmt_stamp )\n {\n \t$tmp = gmdate( 'j,n,Y,G,i,s,w,z,l,F,W,M', $gmt_stamp );\n \t\n \tlist( $day, $month, $year, $hour, $min, $seconds, $wday, $yday, $weekday, $fmon, $week, $smon ) = explode( ',', $tmp );\n \t\n \treturn array( 0 => $gmt_stamp,\n \t\t\t\t \"seconds\" => $seconds, //\tNumeric representation of seconds\t0 to 59\n\t\t\t\t\t \"minutes\" => $min, //\tNumeric representation of minutes\t0 to 59\n\t\t\t\t\t \"hours\"\t => $hour,\t //\tNumeric representation of hours\t0 to 23\n\t\t\t\t\t \"mday\"\t => $day, //\tNumeric representation of the day of the month\t1 to 31\n\t\t\t\t\t \"wday\"\t => $wday, // Numeric representation of the day of the week\t0 (for Sunday) through 6 (for Saturday)\n\t\t\t\t\t \"mon\"\t => $month, // Numeric representation of a month\t1 through 12\n\t\t\t\t\t \"year\"\t => $year, // A full numeric representation of a year, 4 digits\tExamples: 1999 or 2003\n\t\t\t\t\t \"yday\"\t => $yday, // Numeric representation of the day of the year\t0 through 365\n\t\t\t\t\t \"weekday\" => $weekday, //\tA full textual representation of the day of the week\tSunday through Saturday\n\t\t\t\t\t \"month\"\t => $fmon, // A full textual representation of a month, such as January or Mar\n\t\t\t\t\t \"week\" => $week, // Week of the year\n\t\t\t\t\t \"smonth\" => $smon\n\t\t\t\t\t);\n }",
"function tgl_indo($tgl)\n{\n\n $date = substr($tgl,8,2);\n $month = get_bulan(substr($tgl,5,2));\n $year = substr($tgl,0,4);\n return $date.' '.$month.' '.$year;\n\n}",
"function happyNewYear () {\n $day = (int) date('z');\n $year = date('Y');\n $yearCheck = ((int)$year ? $year % 4 == 0 ? $year % 400 == 0 && $year % 100 == 0 ? 366 : 365 : 365 : \"ERROR\");\n $daytill = $yearCheck-$day;\n echo \"До Нового Года осталось: $daytill дней\";\n}",
"private function resolve_year() {\n $academicYearStart = strftime(\"%Y\",strtotime(\"-8 months\",time()));\n $academicYearEnd = strftime(\"%Y\",strtotime(\"+4 months\",time()));\n return \"Academic Year $academicYearStart/$academicYearEnd\";\n }",
"function indonesian_date ($timestamp = '', $date_format = 'd F Y ', $suffix = '') {\n if (trim ($timestamp) == '')\n {\n $timestamp = time ();\n }\n elseif (!ctype_digit ($timestamp))\n {\n $timestamp = strtotime ($timestamp);\n }\n # remove S (st,nd,rd,th) there are no such things in indonesia :p\n $date_format = preg_replace (\"/S/\", \"\", $date_format);\n $pattern = array (\n '/Mon[^day]/','/Tue[^sday]/','/Wed[^nesday]/','/Thu[^rsday]/',\n '/Fri[^day]/','/Sat[^urday]/','/Sun[^day]/','/Monday/','/Tuesday/',\n '/Wednesday/','/Thursday/','/Friday/','/Saturday/','/Sunday/',\n '/Jan[^uary]/','/Feb[^ruary]/','/Mar[^ch]/','/Apr[^il]/','/May/',\n '/Jun[^e]/','/Jul[^y]/','/Aug[^ust]/','/Sep[^tember]/','/Oct[^ober]/',\n '/Nov[^ember]/','/Dec[^ember]/','/January/','/February/','/March/',\n '/April/','/June/','/July/','/August/','/September/','/October/',\n '/November/','/December/',\n );\n $replace = array ( 'Sen','Sel','Rab','Kam','Jum','Sab','Min',\n 'Senin','Selasa','Rabu','Kamis','Jumat','Sabtu','Minggu',\n 'Jan','Feb','Mar','Apr','Mei','Jun','Jul','Ags','Sep','Okt','Nov','Des',\n 'Januari','Februari','Maret','April','Juni','Juli','Agustus','Sepember',\n 'Oktober','November','Desember',\n );\n $date = date ($date_format, $timestamp);\n $date = preg_replace ($pattern, $replace, $date);\n $date = \"{$date} {$suffix}\";\n return $date;\n }",
"function dayOfProgrammer($year) {\n if($year <1918 && $year%400!=0 && $year%100==0 ) {\n $date=date_create($year.'-01-01');\n date_add($date,date_interval_create_from_date_string(\"254 days\"));\n return date_format($date,\"d.m.Y\"); \n } else if($year == 1918) {\n $date=date_create($year.'-01-01');\n date_add($date,date_interval_create_from_date_string(\"268 days\"));\n return date_format($date,\"d.m.Y\");\n } else {\n $date=date_create($year.'-01-01');\n date_add($date,date_interval_create_from_date_string(\"255 days\"));\n return date_format($date,\"d.m.Y\");\n }\n}",
"public function getExpiryDate($format)\n {\n return gmdate($format, gmmktime(0, 0, 0, $this->getExpiryMonth(), 1, $this->getExpiryYear()));\n }",
"public function __construct($julianDate)\n\t{\n\t\t$julianDate = doubleval($julianDate);\n\t\t$D = $julianDate - 2451545.0;\n //echo \"SunPosition D : \".$D.\"<br>\";\n\t\t$g = Utils::FixAngle(357.529 + 0.98560028 * $D);\n //echo \"SunPosition g : \".$g.\"<br>\";\n\t\t$q = Utils::FixAngle(280.459 + 0.98564736 * $D);\n //echo \"SunPosition q : \".$q.\"<br>\";\n\t\t$L = Utils::FixAngle($q + 1.915 * DegreeMath::Sin($g) + 0.020 * DegreeMath::Sin(2 * $g));\n //echo \"SunPosition L : \".$L.\"<br>\";\n\t\t$R = 1.00014 - 0.01671 * DegreeMath::Cos($g) - 0.00014 * DegreeMath::Cos(2 * $g);\n //echo \"SunPosition R : \".$R.\"<br>\";\n $e = 23.439 - 0.00000036 * $D;\n\n\t\t$RA = DegreeMath::Atan2(DegreeMath::Cos($e) * DegreeMath::Sin($L), DegreeMath::Cos($L)) / 15;\n //echo \"SunPosition RA : \".$RA.\"<br>\";\n\t\t$this->setEquation($q / 15 - Utils::FixHour($RA));\n\t\t$this->setDeclinaison(DegreeMath::Asin(DegreeMath::Sin($e) * DegreeMath::Sin($L)));\n\t}",
"function date_ajourdhui()\n{\n $date = localtime(time());\n\n $mois = $date[4]+1;\n $annee = $date[5] + 1900;\n\n $aujourdhui = mktime(0,0,0,$mois,$date[3],$annee,-1);\n \n return date('Y-m-d', $aujourdhui); \n}",
"public static function deg90()\n {\n return static::createWithDegree(Degree::DEG_90);\n }",
"function persian_strftime_utf($format, $timestamp='') {\n\n if($timestamp==''){\n $timestamp = mktime();\n }\n\n $g_d=date('j', $timestamp);\n $g_m=date('n', $timestamp);\n $g_y=date('Y', $timestamp);\n\n list($jy, $jm, $jd, $j_all_days) = g2p($g_y, $g_m, $g_d);\n\n $j_month_name = array('', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر',\n 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند');\n $j_week_name = array('Saturday' => 'شنبه',\n 'Sunday' => 'یک شنبه',\n 'Monday' => 'دوشنبه',\n 'Tuesday' => 'سه شنبه',\n 'Wednesday' => 'چهارشنبه',\n 'Thursday' => 'پنج شنبه',\n 'Friday' => 'جمعه',\n 'Sat' => 'ش',\n 'Sun' => 'ی',\n 'Mon' => 'د',\n 'Tue' => 'س',\n 'Wed' => 'چ',\n 'Thu' => 'پ',\n 'Fri' => 'ج');\n $j_week_number = array('Sat' => '1',\n 'Sun' => '2',\n 'Mon' => '3',\n 'Tue' => '4',\n 'Wed' => '5',\n 'Thu' => '6',\n 'Fri' => '7');\n\n // calculate string\n $output_str='';\n\n for ($i=0; $i<strlen($format); $i++){\n\n if($format[$i]=='%'){\n $i++;\n switch($format[$i]){\n case 'a':\n $output_str.=$j_week_name[date('D', $timestamp)];\n break;\n case 'A':\n $output_str.=$j_week_name[date('l', $timestamp)];\n break;\n case 'b':\n case 'B':\n case 'h':\n $output_str.=$j_month_name[$jm];\n break;\n case 'c':\n $output_str.=persian_strftime_utf('%y/%m/%d %I:%M:%S', $timestamp);\n break;\n case 'C':\n $output_str.=floor($jy/100);\n break;\n case 'd':\n if($jd<10) $output_str.='0'.$jd; else $output_str.=$jd;\n break;\n case 'D':\n $output_str.=$jy.'/'.$jm.'/'.$jd;\n break;\n case 'e':\n if($jd<10) $output_str.=' '.$jd; else $output_str.=$jd;\n break;\n case 'H':\n $output_str.=date('H', $timestamp);\n break;\n case 'I':\n $output_str.=date('h', $timestamp);\n break;\n case 'j':\n $output_str.=sprintf('%03d', $j_all_days);\n break;\n case 'm':\n if($jm<10) $output_str.='0'.$jm; else $output_str.=$jm;\n break;\n case 'M':\n $output_str.=date('i', $timestamp);\n break;\n case 'n':\n $output_str.=\"\\n\";\n break;\n case 'r':\n case 'p':\n if(date('a',$timestamp)=='pm') $output_str.='بعد از ظهر'; else $output_str.='قبل از ظهر';\n break;\n case 'R':\n $output_str.=strftime('%R', $timestamp);\n break;\n case 'S':\n $output_str.=date('s', $timestamp);\n break;\n case 't':\n $output_str.=\"\\t\";\n break;\n case 'U':\n case 'V':\n case 'W':\n $output_str.=sprintf('%02d', floor(($j_all_days+1)/7));\n break;\n case 'u':\n case 'w':\n $output_str.=$j_week_number[date('D', $timestamp)];\n break;\n case 'x':\n $output_str.=persian_strftime_utf('%y/%m/%d', $timestamp);\n break;\n case 'X':\n $output_str.=persian_strftime_utf('%I:%M:%S', $timestamp);\n break;\n case 'g':\n case 'y':\n $output_str.=$jy-(floor($jy/100)*100);\n break;\n case 'G':\n case 'Y':\n $output_str.=$jy;\n break;\n case 'z':\n case 'Z':\n $output_str.=strftime('%z', $timestamp);\n break;\n case '%':\n $output_str.='%';\n break;\n }\n }else{\n $output_str.=$format[$i];\n }\n }\n\n return $output_str;\n}"
] | [
"0.7151603",
"0.67244",
"0.669998",
"0.66935",
"0.65778345",
"0.65248656",
"0.6336798",
"0.6270973",
"0.6110147",
"0.6035083",
"0.59958315",
"0.59077644",
"0.5686333",
"0.56845737",
"0.5643309",
"0.56056154",
"0.55932224",
"0.5560368",
"0.5431845",
"0.53751326",
"0.5357806",
"0.53063786",
"0.5292846",
"0.527429",
"0.5238492",
"0.5202214",
"0.51074916",
"0.5102327",
"0.50417274",
"0.5004755",
"0.4897032",
"0.48369905",
"0.48353168",
"0.47912472",
"0.47381705",
"0.47238892",
"0.4629579",
"0.4597779",
"0.45509094",
"0.45309368",
"0.45197365",
"0.45002586",
"0.44781166",
"0.44501525",
"0.44448394",
"0.44283253",
"0.4407256",
"0.44028172",
"0.43968353",
"0.4384995",
"0.43784907",
"0.43717092",
"0.4340065",
"0.4329159",
"0.43280944",
"0.43054995",
"0.42747536",
"0.4245424",
"0.423045",
"0.4217399",
"0.42114085",
"0.42096624",
"0.41941854",
"0.41931492",
"0.41891962",
"0.4182355",
"0.41783318",
"0.41767246",
"0.41711962",
"0.41710883",
"0.4171046",
"0.4168509",
"0.41642165",
"0.41417673",
"0.41315156",
"0.41298205",
"0.41179785",
"0.4094848",
"0.40850145",
"0.40808168",
"0.4080619",
"0.40722927",
"0.40513062",
"0.40460804",
"0.40313914",
"0.40292916",
"0.4022257",
"0.40208334",
"0.4019967",
"0.40192553",
"0.40151265",
"0.40137026",
"0.40104595",
"0.4003853",
"0.39933315",
"0.3991751",
"0.39742723",
"0.39664924",
"0.39631438",
"0.3959606"
] | 0.48555538 | 31 |
Get the associated Throwable. | public function getThrowable()
{
return $this->throwable;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getException(): Throwable;",
"public function getException(): Throwable;",
"public function getThrowable(): ?Throwable;",
"public function getThrowable(): ?Throwable;",
"public function getThrownException()\n {\n return $this->thrownException;\n }",
"public function getException()\n {\n return $this->exception;\n }",
"public function getException()\n {\n return $this->exception;\n }",
"public function getException()\n {\n return $this->exception;\n }",
"public function getException()\n {\n return $this->exception;\n }",
"public function getException()\n {\n return $this->exception;\n }",
"public function getException()\n {\n return $this->exception;\n }",
"public function getException() {\n return $this->exception;\n }",
"public function getException() {\n\t\treturn $this->_exception;\n\t}",
"public function getException()\r\n\t{\r\n\t\treturn $this->_exception;\r\n\t}",
"public function getException() {\n\t\treturn $this->lastException;\n\t}",
"public function getException();",
"public function getException(){\n return $this->_exception;\n }",
"function getException() {\n\t\treturn $this->Exception;\n\t}",
"public function getException()\r\n {\r\n return count($this->oException) == 0 ? null :\r\n (count($this->oException) == 1 ? $this->oException[0] :\r\n $this->oException);\r\n }",
"public function getCause()\n {\n return $this->getPrevious();\n }",
"public function getThrowableInformation() : mixed\n {\n return $this->throwableInfo;\n \n }",
"function getTraceback()\n\t{\n\t\tif(!$this->body)\n\t\t{\n\t\t\tthrow new CeleryException('Called getTraceback before task was ready');\n\t\t}\n\t\treturn $this->body->traceback;\n\t}",
"public function getException()\n {\n return $this->_exceptions;\n }",
"function &thrownException() {\n return $this->_thrownException;\n }",
"public function getExceptionName()\n {\n return $this->class;\n }",
"public function getError()\n {\n $nb_errors = count($this->errors);\n\n if (0 === $nb_errors) {\n return null;\n }\n\n return $this->errors[$nb_errors - 1];\n }",
"public function getPriorException(){\n // dont call this method getPrevious as in php5.3+ because this\n // method is final and we want this to run in 5 and 5.3+\n return $this->priorException;\n }",
"public function getTrace($throwable)\n {\n return $this->trace;\n }",
"public function getError() {\n return $this->get(self::ERROR);\n }",
"public function getError() {\n return $this->get(self::ERROR);\n }",
"public function getCause()\n {\n return $this->cause;\n }",
"public function getLastException(): ?\\Exception\n {\n return $this->lastException;\n }",
"public function exception(): ?\\Exception\n {\n return $this->error;\n }",
"public function getError()\n {\n return count($this->errors) ? current($this->errors) : NULL;\n }",
"public function getError()\n {\n return isset($this['error'])\n ? $this['error']\n : null;\n }",
"public function getCause()\n {\n return $this->cause;\n }",
"protected function getExceptionHandler()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('tx_mktools_util_ExceptionHandler');\n }",
"public static function getError()\n {\n if (self::has(\"error\")) {\n $error = self::get(\"error\");\n self::remove(\"error\");\n\n return $error;\n }\n\n return null;\n }",
"public function toException()\n {\n if ($this->failed()) {\n return new RequestException($this);\n }\n }",
"public function getError()\n {\n return $this->currentError;\n }",
"public function getExceptionName()\n {\n return $this->_exception;\n }",
"public function getInterventionException()\n {\n return $this->interventionException;\n }",
"public function getSuppressedException()\n {\n return $this->suppressedException_ExceptionSuppressedTaskInfoTrait;\n }",
"public function getError()\n {\n return isset($this->error) ? $this->error : null;\n }",
"public function getErr()\n {\n return $this->get(self::ERR);\n }",
"public function getErr()\n {\n return $this->get(self::ERR);\n }",
"public function getError()\n {\n $errorMessage = null;\n \n if (!$this->isOk())\n {\n $errorMessage = $this->m_responseArray['message'];\n }\n else\n {\n throw new Exception('Calling getError when there was no error');\n }\n \n return $errorMessage;\n }",
"public function convertException(Throwable $exception): Throwable;",
"public function getThread() {\r\n if (!$this->thread instanceof Thread) {\r\n throw new Exception(\"Cannot find the thread that this post belongs to\");\r\n }\r\n \r\n return $this->thread;\r\n }",
"public function getExpectedException()\n {\n return null;\n }",
"public function getExpectedException()\n {\n return null;\n }",
"public final static function unwrapThrowable(Throwable $x) {\n if ($x instanceof ThrowableException)\n return $x->unwrap();\n return $x;\n }",
"public final function getError ()\n {\n\n return $this->mailer->ErrorInfo;\n\n }",
"public function getError () {\n\t\t\treturn $this->error; // seems useless for now\n\t\t}",
"public function getError() {\n\t\treturn $this->current_error;\n\t}",
"public function getError() {\n\n return $this->error;\n }",
"public function getStacktrace()\n {\n return $this->stacktrace;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->error;\n }",
"public function getError()\n {\n return $this->_error;\n }",
"public function getError()\n {\n return $this->_error;\n }",
"public function getError() {\n return $this->_error;\n }",
"public function getError() {\n\t\treturn $this->error;\n\t}",
"public function getError() {\n\t\treturn $this->error;\n\t}",
"public function getError() {\n\t\treturn $this->error;\n\t}",
"public function getError() {\n return $this->error;\n }",
"public function getError() {\n return $this->error;\n }",
"public function getError() {\n return $this->error;\n }",
"public function getTcError()\n {\n return $this->tcError;\n }",
"protected function getException(ReflectionMethod $method)\n {\n return $method->getParameters()[0];\n }",
"public function getError()\r\n {\r\n if (isset($this->response['faultString'])) {\r\n return $this->response['faultString'];\r\n } elseif (isset($this->response['errmsg'])) {\r\n return $this->response['errmsg'];\r\n }\r\n return null;\r\n }",
"public function getFault()\n {\n return $this->_fault;\n }",
"public function getError() {}",
"public function getError()\n {\n if (null == $this->error) {\n $this->error = new MessageContainer();\n }\n return $this->error;\n }",
"public function getFailedSubtask()\n {\n return $this->get(self::FAILED_SUBTASK);\n }",
"public function getError()\n\t{\n\t\treturn $this->err;\n\t}",
"public function getError() {\n return $this->_error;\n }",
"public function getError()\n\t{\n\t\treturn $this->_error;\n\t}",
"protected function returnStackTrace() {\n\t\ttry {\n\t\t\tthrow new \\Exception();\n\t\t} catch (\\Exception $e) {\n\t\t\treturn $e->getTrace();\n\t\t}\n\t}",
"public static function getException()\n {\n if (self::$error[0] == \"00000\") {\n return false;\n } else {\n return self::$error[1];\n }\n }",
"public function getError() {\n\t\treturn $this->lastError;\n\t}",
"public function getCurrentError()\n {\n return $this->getCurrent(self::NAMESPACE_ERROR);\n }",
"function getError()\n\t{\n\t\treturn $this->err;\n\t}",
"public function getError() {\r\n return $this->error;\r\n }"
] | [
"0.74499875",
"0.74499875",
"0.69755787",
"0.69755787",
"0.6706571",
"0.6662586",
"0.6662586",
"0.6662586",
"0.6662586",
"0.6662586",
"0.6662586",
"0.6570453",
"0.6463788",
"0.6428791",
"0.64262563",
"0.6349882",
"0.63245964",
"0.63133246",
"0.61544424",
"0.591493",
"0.5889392",
"0.5863792",
"0.5826436",
"0.56632185",
"0.55844253",
"0.5534463",
"0.5512682",
"0.5495997",
"0.5469943",
"0.5469943",
"0.5421671",
"0.5407753",
"0.54064184",
"0.5386431",
"0.53646123",
"0.53568006",
"0.5342712",
"0.5331412",
"0.53299433",
"0.53293175",
"0.5315932",
"0.53114283",
"0.5294882",
"0.5275789",
"0.5249609",
"0.5249609",
"0.52337986",
"0.5226277",
"0.51971376",
"0.519189",
"0.519189",
"0.51627713",
"0.5134751",
"0.51181895",
"0.5096844",
"0.5095349",
"0.50737554",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.50435305",
"0.5036919",
"0.5036919",
"0.50228965",
"0.50119174",
"0.50119174",
"0.50119174",
"0.49992684",
"0.49992684",
"0.49992684",
"0.49980095",
"0.4988206",
"0.49877778",
"0.4963874",
"0.49563387",
"0.49555647",
"0.49436754",
"0.49412736",
"0.49411368",
"0.4939588",
"0.49359763",
"0.49264297",
"0.4901826",
"0.4898601",
"0.48903283",
"0.48829693"
] | 0.7599398 | 0 |
Display a listing of the resource. | public function index()
{
$players = Players::get()->toArray();
return view('players', compact('players'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }"
] | [
"0.75921303",
"0.75921303",
"0.7586987",
"0.75781953",
"0.756992",
"0.7498765",
"0.7435984",
"0.74298537",
"0.7385191",
"0.7350131",
"0.7336855",
"0.73092943",
"0.72943234",
"0.72800833",
"0.7271207",
"0.7241119",
"0.7229479",
"0.7222803",
"0.71828884",
"0.7176647",
"0.71718425",
"0.7147017",
"0.7141053",
"0.7140619",
"0.7135868",
"0.71249235",
"0.7119748",
"0.7112556",
"0.7112556",
"0.7112556",
"0.7109539",
"0.7090914",
"0.70832956",
"0.70798624",
"0.70769805",
"0.7055401",
"0.7055401",
"0.7053132",
"0.70386326",
"0.7036245",
"0.7033728",
"0.70319915",
"0.70278865",
"0.7024346",
"0.7024193",
"0.7018092",
"0.70155334",
"0.70024955",
"0.7001018",
"0.69984865",
"0.6992834",
"0.69919723",
"0.6991958",
"0.698738",
"0.6985118",
"0.6963932",
"0.6963807",
"0.6954235",
"0.6949909",
"0.69488865",
"0.6946491",
"0.69428456",
"0.6939259",
"0.69382834",
"0.6935725",
"0.69354814",
"0.69354814",
"0.693212",
"0.69308144",
"0.6926547",
"0.6924849",
"0.69206136",
"0.69165045",
"0.69125223",
"0.69093955",
"0.6908298",
"0.69078946",
"0.69061583",
"0.69020784",
"0.6900573",
"0.68988043",
"0.689839",
"0.6892676",
"0.6891245",
"0.6890285",
"0.6890285",
"0.6890134",
"0.6890082",
"0.6886797",
"0.68860483",
"0.68844056",
"0.68816763",
"0.6879666",
"0.6876824",
"0.6874674",
"0.68706644",
"0.6870515",
"0.68691623",
"0.68690854",
"0.6868035",
"0.6867788"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$validation = [
'first_name' => 'required',
'last_name' => 'required',
'age' => 'required|numeric|min:15'
];
if($request->file('photo')!==null){
$validation['photo'] = 'required|file|max:2048|mimes:jpeg,png,gif';
}
$request->validate($validation);
$firstname = $request->first_name;
$lastname = $request->last_name;
$age = $request->age;
$weight = (isset($request->weight)) ? intval($request->weight) : '0';
$height = (isset($request->height)) ? intval($request->height) : '0';
$active = (isset($request->active)) ? intval($request->active) : '0';
$file = $request->file('photo');
$path = public_path('/uploads');
$data = [
'first_name' => $firstname,
'last_name' => $lastname,
'age' => $age,
'weight' => $weight,
'height' => $height,
'active' => $active
];
if($file){
$newfilename = date('YmdHis').'-'.$file->getClientOriginalName();
if(!$file->move($path, $newfilename)) {
return redirect()->back()->with([
'status' => false,
'response' => 'Error on uploading file'
]);
}
else
$data['photo'] = $newfilename;
}
if(!isset($request['id'])){
Players::create($data);
return redirect()->back()->with([
'status' => true,
'response' => 'Player created successfully'
]);
}
else{
Players::where('id', $request['id'])->update($data);
return redirect()->back()->with([
'status' => true,
'response' => 'Player updated successfully'
]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"public function update($request, $id);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public abstract function update($object);",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update($id);",
"public function update($id);",
"public function put($path, $data = null);",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7423347",
"0.70622426",
"0.70568657",
"0.6896551",
"0.65835553",
"0.64519453",
"0.6348333",
"0.6212436",
"0.61450946",
"0.6122591",
"0.6114199",
"0.6101911",
"0.60876113",
"0.60528636",
"0.60177964",
"0.6006609",
"0.59725446",
"0.594558",
"0.59395295",
"0.5938792",
"0.5893703",
"0.5862337",
"0.58523124",
"0.58523124",
"0.5851579",
"0.5815571",
"0.58067423",
"0.5750728",
"0.5750728",
"0.5736541",
"0.5723664",
"0.5715135",
"0.56949675",
"0.5691129",
"0.56882757",
"0.5669375",
"0.5655524",
"0.56517446",
"0.5647158",
"0.5636521",
"0.563466",
"0.5632965",
"0.56322825",
"0.56291395",
"0.56202215",
"0.56087196",
"0.56020856",
"0.5591966",
"0.5581127",
"0.5581055",
"0.558085",
"0.5575458",
"0.55706805",
"0.55670804",
"0.55629116",
"0.5562565",
"0.5558853",
"0.5558505",
"0.5558505",
"0.5558505",
"0.5558505",
"0.5558505",
"0.555572",
"0.5555007",
"0.5553948",
"0.5553837",
"0.5553147",
"0.55429846",
"0.5541925",
"0.5540208",
"0.5539145",
"0.5536157",
"0.55350804",
"0.5534241",
"0.5523782",
"0.5518406",
"0.55147856",
"0.5513397",
"0.550961",
"0.55072165",
"0.55067354",
"0.5503418",
"0.5501671",
"0.55010796",
"0.54998124",
"0.5497327",
"0.54942787",
"0.54942036",
"0.54942036",
"0.54935455",
"0.549267",
"0.5491964",
"0.5489983",
"0.54833627",
"0.54794145",
"0.5478835",
"0.5478348",
"0.5465178",
"0.54648995",
"0.54607797",
"0.54571307"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$data = Players::where('id', $id)->first()->toArray();
//unlink photo
if(file_exists('uploads/'.$data['photo'])){
unlink('uploads/'.$data['photo']);
Players::where(['id'=>$id])->delete();
}
return redirect()->back()
->with([
'status' => true,
'response' => 'Player removed successfully'
]
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
this up() migration is autogenerated, please modify it to your needs | public function up(Schema $schema)
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
$this->addSql("CREATE TABLE config_sections (id INT AUTO_INCREMENT NOT NULL, parent_id INT DEFAULT NULL, name VARCHAR(125) NOT NULL, UNIQUE INDEX UNIQ_965EAD465E237E06 (name), INDEX IDX_965EAD46727ACA70 (parent_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
$this->addSql("ALTER TABLE config_sections ADD CONSTRAINT FK_965EAD46727ACA70 FOREIGN KEY (parent_id) REFERENCES config_sections (id)");
$this->addSql("ALTER TABLE app_config ADD section_id INT DEFAULT NULL, DROP section");
$this->addSql("ALTER TABLE app_config ADD CONSTRAINT FK_318942FCD823E37A FOREIGN KEY (section_id) REFERENCES config_sections (id)");
$this->addSql("CREATE INDEX IDX_318942FCD823E37A ON app_config (section_id)");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function up();",
"abstract public function up();",
"abstract public function up();",
"abstract public function up();",
"public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }",
"public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }",
"public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }",
"public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}",
"public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }",
"public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }",
"public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}",
"public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }",
"public function up()\n {\n }",
"public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }",
"public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }",
"public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}",
"public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }",
"public function preUp()\n {\n }",
"public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}",
"public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }",
"public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}",
"public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }",
"public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }",
"public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }",
"public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }",
"public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }",
"public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }",
"public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }",
"public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}",
"public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }",
"public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }",
"public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }",
"public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }",
"public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}",
"public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }",
"public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}",
"public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}",
"public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }",
"public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }",
"public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }",
"public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }",
"public function up() { return $this->run('up'); }",
"public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}",
"public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}",
"public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}",
"public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }",
"public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}",
"public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }",
"public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }",
"public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }",
"public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }",
"public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }",
"public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }",
"public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }",
"public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}",
"public function safeUp()\r\n {\r\n $this->up();\r\n }",
"public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }",
"public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}",
"public function safeUp()\n\t{\n\t\t$this->up();\n\t}",
"public function safeUp()\n {\n $this->up();\n }",
"public function safeUp()\n {\n $this->up();\n }",
"public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }",
"public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}",
"public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}",
"public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }",
"public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }",
"public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}",
"public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}",
"public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }",
"public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}",
"public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }",
"public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}",
"public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }",
"public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }",
"public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}",
"public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }",
"public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}",
"public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}",
"public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }",
"public function up()\n\t{\n// $import->import();\n\t}",
"public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}",
"public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}",
"public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }",
"public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }",
"public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}",
"public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }",
"public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}",
"public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}",
"public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }",
"public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }",
"public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}",
"public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }",
"public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }",
"public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }",
"public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }",
"public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }",
"public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }",
"public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}",
"public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}",
"public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}",
"public function up()\n\t{\n Laravel\\Database\\Schema::create(\"orbs\", function($table){\n $table->increments(\"id\");\n $table->string(\"name\");\n $table->string(\"description\");\n $table->integer(\"coins\");\n $table->integer(\"points\");\n $table->integer(\"min_level\");\n $table->integer(\"max_level\");\n $table->integer(\"owner_character\");\n $table->integer(\"acquisition_time\");\n $table->integer(\"last_attacker\");\n $table->integer(\"last_attack_time\");\n $table->string(\"image\");\n });\n\t}"
] | [
"0.80062366",
"0.79145443",
"0.79145443",
"0.79145443",
"0.7572342",
"0.756089",
"0.75283176",
"0.7498379",
"0.7493237",
"0.7453656",
"0.74463314",
"0.7433381",
"0.74307704",
"0.7427088",
"0.741794",
"0.73779047",
"0.7374933",
"0.7370453",
"0.73637444",
"0.73505706",
"0.7329024",
"0.7313519",
"0.7298817",
"0.72950184",
"0.72917736",
"0.7291469",
"0.72913444",
"0.72849613",
"0.72839737",
"0.7272078",
"0.7271878",
"0.72659117",
"0.7262893",
"0.7261672",
"0.7256839",
"0.72505474",
"0.7249633",
"0.72441125",
"0.724062",
"0.72376186",
"0.7218244",
"0.72177947",
"0.72046006",
"0.7203395",
"0.7196059",
"0.7191219",
"0.7189963",
"0.7177052",
"0.71761394",
"0.7167738",
"0.7164105",
"0.7164105",
"0.7159096",
"0.7147647",
"0.7136521",
"0.7129768",
"0.7124664",
"0.7123368",
"0.71168584",
"0.7104628",
"0.7104628",
"0.7104618",
"0.7097006",
"0.70931643",
"0.70886755",
"0.7087018",
"0.7086326",
"0.70830804",
"0.70829463",
"0.70780045",
"0.70702124",
"0.70690626",
"0.7066111",
"0.7062268",
"0.7058938",
"0.705882",
"0.70556235",
"0.70549136",
"0.7054758",
"0.70498437",
"0.70483595",
"0.7047308",
"0.7045881",
"0.70445794",
"0.7043173",
"0.703882",
"0.7038126",
"0.703674",
"0.7033728",
"0.7032356",
"0.7031423",
"0.70257956",
"0.70142514",
"0.70101255",
"0.7006208",
"0.6988486",
"0.6984963",
"0.69629973",
"0.69612974",
"0.69587934",
"0.6957519"
] | 0.0 | -1 |
this down() migration is autogenerated, please modify it to your needs | public function down(Schema $schema)
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
$this->addSql("ALTER TABLE config_sections DROP FOREIGN KEY FK_965EAD46727ACA70");
$this->addSql("ALTER TABLE app_config DROP FOREIGN KEY FK_318942FCD823E37A");
$this->addSql("DROP TABLE config_sections");
$this->addSql("DROP INDEX IDX_318942FCD823E37A ON app_config");
$this->addSql("ALTER TABLE app_config ADD section VARCHAR(125) NOT NULL, DROP section_id");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function down()\n {\n //add your migration here \n }",
"public function down()\n {\n //add your migration here\n }",
"public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}",
"public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }",
"public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }",
"public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }",
"public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }",
"public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}",
"public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}",
"public function down(){\n $this->dropTable('users');\n }",
"public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }",
"public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }",
"public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}",
"public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }",
"public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}",
"public function down()\n\t{\n\t\t// nothing to do here.\n\t}",
"public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }",
"public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}",
"public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}",
"public function down() \n {\n \n }",
"public function down()\n\t{\n\t}",
"public function down()\n\t{\n\t}",
"public function down()\n\t{\n\t\t//\n\t}",
"public function down()\n\t{\n\t\t//\n\t}",
"public function down()\n\t{\n\t\t//\n\t}",
"public function down()\n {\n $this->table('contents')->drop()->save();\n }",
"public function down()\n\t{\n\t\tSchema::drop('education');\n\t}",
"public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}",
"public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}",
"public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}",
"public function down()\n {\n\tSchema::drop('quizzes');\n }",
"public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }",
"public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }",
"public function down ()\n {\n }",
"abstract public function down();",
"abstract public function down();",
"abstract public function down();",
"public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }",
"public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }",
"public function down() {\n\n\t}",
"public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }",
"public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}",
"public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }",
"public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }",
"public function down(): void\n {\n // Remove your data\n }",
"public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}",
"public function down()\n {\n\tSchema::drop('activities');\n }",
"public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }",
"public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }",
"public function down()\n {\n }",
"public function down()\n {\n }",
"public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}",
"public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}",
"public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }",
"public function down()\n\t{\n\t\t//return false;\n\t}",
"public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }",
"public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}",
"public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }",
"public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }",
"public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}",
"public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }",
"public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}",
"public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }",
"public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}",
"protected abstract function do_down();",
"public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}",
"public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }",
"public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }",
"public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}",
"public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }",
"public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}",
"public function safeDown()\n {\n $this->down();\n }",
"public function safeDown()\n {\n $this->down();\n }",
"public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}",
"public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}",
"public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}",
"public function safeDown()\r\n {\r\n $this->down();\r\n }",
"public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }",
"public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }",
"public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}",
"public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}",
"public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}",
"public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }",
"public function down() {\n\t}",
"public function down() {\n\t}",
"public function down() {\n\t}",
"public function down()\n {\n Schema::dropIfExists('reunion');\n }",
"public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }",
"public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}",
"public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }",
"public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}",
"public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}",
"public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}",
"public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}",
"protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }",
"public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }",
"public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}",
"public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }",
"public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }",
"public function down()\n {\n Schema::dropIfExists('data');\n }",
"public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}"
] | [
"0.7950277",
"0.78636813",
"0.76065636",
"0.7493955",
"0.7320625",
"0.7245268",
"0.7187498",
"0.71543235",
"0.715298",
"0.7141911",
"0.7135835",
"0.71214414",
"0.71154845",
"0.71057886",
"0.7098064",
"0.70800334",
"0.7078775",
"0.70729095",
"0.7068331",
"0.7066272",
"0.7053364",
"0.7053364",
"0.7042174",
"0.7042174",
"0.7042174",
"0.7041765",
"0.7040102",
"0.7028846",
"0.70253754",
"0.7021679",
"0.6988633",
"0.6986877",
"0.6978061",
"0.6971848",
"0.6944203",
"0.6944203",
"0.6944203",
"0.6942135",
"0.6941429",
"0.6939214",
"0.6935277",
"0.69334567",
"0.6928689",
"0.6924838",
"0.6924794",
"0.6913486",
"0.6902361",
"0.6897891",
"0.6897845",
"0.6897824",
"0.6897824",
"0.68886673",
"0.688262",
"0.6874051",
"0.6869844",
"0.6863713",
"0.6858435",
"0.68545175",
"0.68440175",
"0.6842142",
"0.6836981",
"0.6836124",
"0.6834763",
"0.68303466",
"0.68297166",
"0.68282366",
"0.6826686",
"0.6824025",
"0.68185335",
"0.6811099",
"0.68078107",
"0.68056506",
"0.68056506",
"0.6789167",
"0.67755204",
"0.67742497",
"0.6765081",
"0.67597127",
"0.67596203",
"0.67564446",
"0.67564446",
"0.67564446",
"0.6753443",
"0.6753351",
"0.6753351",
"0.6753351",
"0.6752681",
"0.674581",
"0.6743746",
"0.67387754",
"0.6733766",
"0.67331296",
"0.6731279",
"0.67302275",
"0.6727377",
"0.67273724",
"0.672722",
"0.672607",
"0.67173517",
"0.67139125",
"0.671303"
] | 0.0 | -1 |
Creates the generic property. Parameters must be specified in key=>value syntax. | public function __construct(Component $root, $name, $value = null, array $parameters = [], $group = null)
{
$this->name = $name;
$this->group = $group;
$this->root = $root;
foreach ($parameters as $k => $v) {
$this->add($k, $v);
}
if (!is_null($value)) {
$this->setValue($value);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createProperty();",
"static public function createProperty($name, $value, array $parameters = array()) {\n\n return new Property\\Text($name, $value, $parameters);\n\n }",
"public function create_property($name,$params){\n\t\t$endpoint = 'properties/'.$name;\n\n\t\ttry{\n\t\t\treturn json_decode($this->execute_put_request($this->get_request_url($endpoint,null),json_encode($params)));\n\t\t}\n\t\tcatch(HubSpot_Exception $e){\n\t\t\tprint_r('Unable to create property: '.$e);\n\t\t}\n\t}",
"public function create($propertyValues = []);",
"public function createProperty()\n {\n $prop = new LiquibaseProperty();\n $this->properties[] = $prop;\n\n return $prop;\n }",
"private function createEntityProperty($property)\n {\n return new EntityProperty($property);\n }",
"public function setProperty(string $key, $value): self;",
"public function addProperty($key, $value);",
"static function factoryWithProperty (Ac_Model_Property $prop, array $optionsOverride = array()) {\n $res = Ac_Prototyped::factory(self::getPrototypeFromProperty($prop, $optionsOverride), 'Ac_Model_Values');\n return $res;\n }",
"public function setProperty($key, $value);",
"public function __construct($createProperty, $property)\n {\n $this->property = $property;\n\n $this->createProperty = $createProperty;\n }",
"protected function makeProperty( Property $property ) {\n\t\t$store = WikibaseRepo::getDefaultInstance()->getEntityStore();\n\n\t\t$store->saveEntity( $property, 'testing', $GLOBALS['wgUser'], EDIT_NEW );\n\t\treturn $property;\n\t}",
"public function property(string $paramName, $paramValue);",
"public static function createProperty($userId, $data) {\n\t\t$property = new Property ();\n\t\t$property->attributes = $data;\n\t\t$property->user_id = $userId;\n\t\t$property->save ();\n\t\treturn $property;\n\t}",
"public function property($key) { }",
"public function create(array $properties = []);",
"public function setAzureProperty($name, $value = '', $type = null)\n {\n if (strtolower($name) == 'partitionkey') {\n $this->setPartitionKey($value);\n } else if (strtolower($name) == 'rowkey') {\n $this->setRowKey($value);\n } else if (strtolower($name) == 'etag') {\n $this->setEtag($value);\n } else {\n if (!array_key_exists(strtolower($name), $this->_dynamicProperties)) {\n // Determine type?\n if (is_null($type)) {\n $type = 'Edm.String';\n if (is_int($value)) {\n $type = 'Edm.Int32';\n } else if (is_float($value)) {\n $type = 'Edm.Double';\n } else if (is_bool($value)) {\n $type = 'Edm.Boolean';\n } else if ($value instanceof DateTime || $this->_convertToDateTime($value) !== false) {\n if (!$value instanceof DateTime) {\n $value = $this->_convertToDateTime($value);\n }\n $type = 'Edm.DateTime';\n }\n }\n \n // Set dynamic property\n $this->_dynamicProperties[strtolower($name)] = (object)array(\n 'Name' => $name,\n 'Type' => $type,\n 'Value' => $value,\n );\n }\n \n // Set type?\n if (!is_null($type)) {\n $this->_dynamicProperties[strtolower($name)]->Type = $type;\n \n // Try to convert the type\n if ($type == 'Edm.Int32' || $type == 'Edm.Int64') {\n $value = intval($value);\n } else if ($type == 'Edm.Double') {\n $value = floatval($value);\n } else if ($type == 'Edm.Boolean') {\n if (!is_bool($value)) {\n $value = strtolower($value) == 'true';\n }\n } else if ($type == 'Edm.DateTime') {\n if (!$value instanceof DateTime) {\n $value = $this->_convertToDateTime($value);\n }\n }\n }\n \n // Set value\n $this->_dynamicProperties[strtolower($name)]->Value = $value;\n }\n return $this;\n }",
"function getPropertiesTemplate() {\n return ' public ${{PROPERTY_NAME}};\n';\n}",
"function create($properties = array(), $context = FALSE)\n {\n $entity = $properties;\n $factory = C_Component_Factory::get_instance();\n if (!is_object($properties)) {\n $entity = new stdClass();\n foreach ($properties as $k => $v) {\n $entity->{$k} = $v;\n }\n }\n return $factory->create($this->object->get_model_factory_method(), $entity, $this->object, $context);\n }",
"private function _property(EntityProperty $property) {\n static $marks = [\n Flags::IS_STATIC => \"ZEND_ACC_STATIC\",\n Flags::IS_PUBLIC => \"ZEND_ACC_PUBLIC\",\n Flags::IS_PROTECTED => \"ZEND_ACC_PROTECTED\",\n Flags::IS_PRIVATE => \"ZEND_ACC_PRIVATE\"\n ];\n $flags = [];\n foreach($marks as $mark => $flag) {\n if($property->flags & $mark) {\n $flags[] = $flag;\n }\n }\n $flags = implode(\" | \", $flags);\n switch($property->type) {\n case Types::INT:\n return \"REGISTER_CLASS_LONG_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n case Types::STRING:\n return \"REGISTER_CLASS_STRING_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \\\"\".addslashes($property->value).\"\\\", {$flags});\";\n case Types::BOOLEAN:\n return \"REGISTER_CLASS_BOOL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \".intval($property->value).\", {$flags});\";\n case Types::NIL:\n return \"REGISTER_CLASS_NULL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$flags});\";\n case Types::DOUBLE:\n return \"REGISTER_CLASS_DOUBLE_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n default:\n throw new \\LogicException(\"Unknown type $property\");\n }\n }",
"private function createProperties(string $base): string\n {\n return implode(\"\\n\", array_map(function (string $propertyName) use ($base): string {\n $static = Reflection::isPropertyStatic($base, $propertyName) ? 'static' : '';\n $defaultValue = Reflection::encodeValue($this->properties[$propertyName]);\n\n return \"public $static \\$$propertyName = $defaultValue;\";\n }, array_keys($this->properties)));\n }",
"public function createNames()\n {\n $required = [\n 'name',\n 'singular',\n 'plural',\n 'slug',\n ];\n\n foreach ($required as $key) {\n // if the name is set, assign it\n if (isset($this->names[$key])) {\n $this->$key = $this->names[$key];\n continue;\n }\n\n // if the key is not set and is singular or plural\n if (in_array($key, ['singular', 'plural'])) {\n // create a human friendly name\n $name = ucwords(strtolower(str_replace(['-', '_'], ' ', $this->names['name'])));\n }\n\n if ($key === 'slug') {\n // create a slug friendly name\n $name = strtolower(str_replace([' ', '_'], '-', $this->names['name']));\n }\n\n // if is plural or slug, append an 's'\n if (in_array($key, ['plural', 'slug'])) {\n $name .= 's';\n }\n\n // asign the name to the PostType property\n $this->$key = $name;\n }\n }",
"public static function Property($name, ...$args): JSExpression\n {\n return self::Factory(\"Property\", $name, ...$args);\n }",
"function setProperty() {\n $instance = $this->CI->ciwy->current_instance[$this->component_name];\n $properties = func_get_arg(0);\n if (is_array($properties)) {\n foreach($properties as $key => $val) {\n if ( ! isset($this->component_property[$key])) {\n $message = '[' . $this->CI->ciwy->library_name . '] '. $key . ' is not a '.$this->component_name .' Property.';\n log_message('error', $message);\n show_error($message);\n } else {\n $this->CI->ciwy->component_config[$instance]['Config'][$key] = $val;\n }\n }\n }\n }",
"public function property(&$class, $property);",
"function mdl_create_property_setter(ValueContainer $property, string $type = null, bool $immutable = false)\n{\n $type = str_replace(\"\\\\\\\\\", \"\\\\\", $type);\n $method = PHPClassMethod('set' . mdl_str_camelize($name = $property->getName()), [PHPFunctionParameter('value', $type)], 'self', 'public', \"Set $name property value\");\n return $immutable ? $method->addLine(\"\\$self = clone \\$this\")->addLine(\"\\$self->\" . $name . \" = \\$value\")->addLine(\"return \\$self\"): $method->addLine(\"\\$this->\" . $name . \" = \\$value\")->addLine(\"return \\$this\");\n}",
"protected function buildPropertyInfo() {\n }",
"protected function property($name, $type)\n {\n $class_name = $this->getPropertyClass($type);\n $this->$name = new $class_name($name);\n $this->properties[$name] = &$this->$name;\n return $this->$name;\n }",
"public function property(array $attributes)\r\n {\r\n $property = $this->dom->createElement('property');\r\n foreach ($attributes as $name => $value) {\r\n $property->setAttribute($name, $value);\r\n }\r\n\r\n $this->project->appendChild($property);\r\n }",
"public function __construct($val)\n {\n $this->property = $val;\n }",
"public function setProperty($key, $value, $params = array()) {\n $value = str_replace('\\\\', '\\\\\\\\', $value);\n $value = str_replace('\"', '\\\\\"', $value);\n $value = str_replace(',', '\\\\,', $value);\n $value = str_replace(';', '\\\\;', $value);\n $value = preg_replace(\"/\\r\\n|\\r|\\n/\", '\\\\n', $value);\n\n if ($params) {\n foreach ($params as $pKey => $pValue) {\n $key .= \";{$pKey}={$pValue}\";\n }\n }\n\n $this->_properties[$key] = $value;\n }",
"function mdl_create_property(array $definition)\n{\n $property = PHPClassProperty(\n preg_replace(\"/\\s+/\", \"\", $definition['name']),\n isset($definition['type']) ? str_replace(\"\\\\\\\\\", \"\\\\\", $definition['type']) : null,\n // Class property as defined as private by default\n $definition['modifier'] ?? 'private',\n $definition['default'] ?? null,\n $definition['comment'] ?? null\n );\n if (isset($definition['constant']) && (true === boolval($definition['constant']))) {\n $property = $property->asConstant();\n }\n return $property;\n}",
"public function __construct()\n {\n foreach (GeneralUtility::makeInstance(\\ReflectionClass::class, static::class)->getProperties() ?? [] as $reflection) {\n if (!$reflection->isProtected()) {\n $name = $reflection->getName();\n $value = $this->{$name};\n\n // Define parameter name of property\n $this->parameterMapping[$name] = GeneralUtility::camelCaseToLowerCaseUnderscored($name);\n\n // Map the type of properties\n $this->typeMapping[$name] = is_int($value) ? 'int' : (is_array($value) ? 'array' : (is_bool($value) ? 'bool' : (is_string($value) ? 'string' : null)));\n }\n }\n }",
"function mdl_create_property_getter(ValueContainer $property, string $type = null)\n{\n $type = str_replace(\"\\\\\\\\\", \"\\\\\", $type);\n return PHPClassMethod('get' . mdl_str_camelize($name = $property->getName()), [], $type, 'public', \"Get $name property value\")->addLine(\"return \\$this->\" . $name);\n}",
"abstract protected function propertySet($name, $value);",
"abstract public function property($propertyIdent);",
"protected function buildPropertyInfoAlter() {\n }",
"public function create( $value, $type = 'standard' );",
"abstract protected function properties();",
"public function __construct($key , $value)\n {\n //\n $this->key = $key;\n $this->value = $value;\n }",
"public function __construct(){\n\t\t\tparent::__construct(array(), \\ArrayObject::STD_PROP_LIST);\n\t\t\t$values = func_get_args();\n\t\t\tif(is_array($values) === true){\n\t\t\t\tforeach($values as $k => $v){\n\t\t\t\t\t$this[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function __construct($picture=[]) {\n\n // here we creates properties and their values out of keys and values\n foreach($picture as $key => $value){\n $this->$key = $value;\n //echo $key;\n }\n\n }",
"public function configureProperty(string $property, array $data) {\n $this->properties[$property] = $data;\n return $this;\n }",
"public function createSystemProperty($propertyName, $propertyValue)\n {\n $payload = new Payloads\\SystemPropertyPayload(compact('propertyName', 'propertyValue'));\n $endpoint = self::$endpoint . '/properties';\n return self::sendRequest(Method::POST, $endpoint, $payload);\n }",
"public function create($params)\n {\n $entity = '\\AW\\SimpleLeagueBundle\\Entity\\\\' . $this->entityName;\n $obj = new $entity();\n foreach ($params as $key => $val) {\n $func = 'set' . ucfirst($key);\n if (method_exists($obj, $func)) {\n $obj->$func($val);\n }\n }\n return $obj;\n }",
"function wsdl_docs_soapclient_ui_property_row_new($name) {\n $property['name'] = array(\n '#type' => 'textfield',\n '#disabled' => TRUE,\n '#size' => 40,\n '#default_value' => $name,\n );\n return $property;\n}",
"public function registerProperty($name, callable $callable);",
"public function push($value): IProperty;",
"private function createPropertyType(string $pomm_type): Type\n {\n $class = null;\n\n $type = match ($pomm_type) {\n 'JSON', 'Array' => Type::BUILTIN_TYPE_ARRAY,\n 'Binary', 'String' => Type::BUILTIN_TYPE_STRING,\n 'Boolean' => Type::BUILTIN_TYPE_BOOL,\n 'Number' => Type::BUILTIN_TYPE_INT,\n default => Type::BUILTIN_TYPE_OBJECT,\n };\n\n return new Type($type, false, $class);\n }",
"public static function property(string $property, string $content): MetaTag {\n return new MetaTag(['property' => $property, 'content' => $content]);\n }",
"protected function addMultiProperty($property, $typoscript, $submittedValues) {\n\n\t\t$entryArray[0] = array();\n\n\t\t// (e.g. postProcessor.1.properties.1.zip = zip-fieldname\n\t\t// or postProcessor.1.properties.2.field = phone-fieldname)\n\n\t\tforeach ($typoscript as $key => $field) {\n\n\t\t\tif ($key == 'type.') {\n\t\t\t\t$entryArray[0]['type'] = self::getPropertyTypes($typoscript[$key]);\n\n\t\t\t} elseif ($key == 'messenger') {\n\t\t\t\t// addInstantmessenger() takes the type of messenger as an additional parameter\n\t\t\t\t// (e.g. postProcessor.1.properties.1.messenger = X-JABBER)\n\t\t\t\t$entryArray[0][$key] = $typoscript[$key];\n\n\t\t\t} elseif (isset($submittedValues[$field])) {\n\t\t\t\tif ($key == 'field') {\n\t\t\t\t\t$entryArray[0]['value'] = $submittedValues[$field];\n\n\t\t\t\t} else {\n\t\t\t\t\t$entryArray[0][$key] = $submittedValues[$field];\n\t\t\t\t}\n\n\t\t\t} elseif ($key == 'field' && $property != 'Address') {\n\t\t\t\t// all this properties except address require 'value'\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$this->vcard->{'add' . $property}($entryArray);\n\t}",
"function __set($property, $value) {\n global $USER, $DB;\n if(in_array($property, array('title', 'header'))) {\n return ($this->{'_'.$property} = $value);\n } elseif($property == 'content') {\n return ($this->$property = $value);\n } else {\n return parent::__set($property, $value);\n }\n }",
"public function Make($key);",
"public function set($value): IProperty;",
"abstract public function createTemplateEntity();",
"public function setInputProperty($key, $value);",
"private function createEntityProperties($properties)\n {\n return array_map([$this, 'createEntityProperty'], (array) $properties);\n }",
"public function __construct($key, $value) {\n\t\t$this -> key = $key;\n\t\t$this -> value = $value;\n\t}",
"public function __construct($params = null) {\n\n if ($params == null) {\n return;\n }\n\n // Loop thought all values and create the values\n foreach ($params as $key => $value) {\n $this->$key = $value;\n\n }\n }",
"public function __construct(array $properties) {\n foreach ($properties as $property => $value) {\n switch ($property) {\n // Strings.\n case 'numberOfFullTimeEmployees':\n case 'numberOfPartTimeEmployees':\n case 'annualRevenues':\n case 'occupiedPct':\n case 'occupiedArea':\n case 'openToPublicArea':\n case 'totalBuildingArea':\n case 'anyAreaLeasedToOthers':\n case 'occupancyDesc':\n $this->$property = $value;\n }\n }\n }",
"function __set($name, $value){\n //var_dump($value);\n\n $this->_properties[$name] = $value;\n }",
"function addProperty($name, $value) {\r\n\r\n\t\t$propertyName = 'set'.ucfirst($name);\r\n\t\t\r\n\t\t// XML boolean needs to be converted\r\n\t\tif( strtolower($value) == 'true') {\r\n\t\t\t$value = True;\r\n\t\t} elseif(strtolower($value) == 'false') {\r\n\t\t\t$value = False;\r\n\t\t}\r\n\r\n\r\n\t\t// Set methods on the PlugIn driver class ($this->className, $this->key)\r\n\t\t// Eg: <plug-in ... key=\"SMARTY_PLUGIN\" .../> maps to $this->setKey(\"SMARTY_PLUGIN\")\r\n\t\tif( method_exists( $this, $propertyName) ) {\r\n\t\t\t$this->$propertyName($value);\r\n\t\t} else {\r\n\t\t\t// Set properties in the PlugIn class.\r\n\t\t\t// Check for a set-property element, and try to set the class variable directly\r\n\t\t\t// Eg: <set-property property=\"force_compile\" value=\"true\"/>\r\n\t\t\t$plugInVars = get_class_vars( get_class($this->plugIn) );\t\t\r\n\r\n\t\t\tif( array_key_exists($name, $plugInVars) ) {\r\n\t\t\t\t$p =& $this->plugIn;\r\n\t\t\t\t$p->$name = $value;\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t$driverName = ucfirst(get_class($this));\t\t\t\t\r\n\t\t\t\tprint 'Error: '.$driverName.'->addProperty(): Method: '.\r\n\t\t\t\t\t\t$propertyName.\" not found<br>\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public function __construct($productParams = array()){\n foreach ($productParams as $var=>$param){\n if (property_exists($this, $var)) {\n $this->$var = $param;\n }\n }\n }",
"public function createObjectCanDoSetterInjectionWithStraightValues() {\n\t\t$time = microtime();\n\t\t$someConfigurationProperty = new \\F3\\FLOW3\\Object\\Configuration\\ConfigurationProperty('someProperty', $time, \\F3\\FLOW3\\Object\\Configuration\\ConfigurationProperty::PROPERTY_TYPES_STRAIGHTVALUE);\n\t\t$objectConfiguration = new \\F3\\FLOW3\\Object\\Configuration\\Configuration('F3\\FLOW3\\Tests\\Object\\Fixture\\BasicClass');\n\t\t$objectConfiguration->setProperty($someConfigurationProperty);\n\n\t\t$object = $this->objectBuilder->createObject('F3\\FLOW3\\Tests\\Object\\Fixture\\BasicClass', $objectConfiguration);\n\t\t$this->assertEquals($time, $object->getSomeProperty(), 'The straight value has not been setter-injected although it should have been.');\n\t}",
"public function addProperty(string $name, mixed $value): void\n\t{\n\t\t$this->properties[$name] = $value;\n\t}",
"public function __construct(Property $property)\n {\n $this->property = $property;\n }",
"public function __get($propertyName){\n if(array_key_exists($propertyName, $this->properties)){\n\n return $this->properties[$propertyName];\n }\n \n }",
"public function Create($param=array()) {\n\t\tforeach($param as $key => $value) {\n\t\t\t$this->$key = $value;\n\t\t}\n\t\t$this->link_rel = $this->server->Service()->Name();\n\t\t$this->link_href = $this->server->Url();\n\t\treturn parent::Create($param);\n\t}",
"protected function build(array $parameters)\n {\n foreach ($parameters as $property => $value) {\n $mutator = 'set' . ucFirst(static::convertToCamelCase($property));\n if (method_exists($this, $mutator)) {\n call_user_func_array([$this, $mutator], [$value]);\n } else {\n $this->$property = $value;\n }\n }\n }",
"public function __construct($_clazz, $_property) {\n parent::__construct('numeric property name is not allowed in ' . $_clazz . '::' . $_property);\n }",
"public static function create($value);",
"public static function create($value);",
"function create($value)\n {\n return new Value($value);\n }",
"private function setProperty($property, $value)\n\t{\n\t\t$poolFile = $this->getPoolDir().\"/$property.m23pool\";\n\t\t$file = fopen($poolFile,\"w\");\n\t\tfwrite($file,$value);\n\t\tfclose($file);\n\t}",
"public function __construct($value, Reflection_Property $property)\n\t{\n\t\tparent::__construct($value, $property->getType()->asReflectionClass());\n\t\t$this->properties = Replaces_Annotations::replaceProperties($this->getProperties());\n\t\t$this->value = array_keys($this->properties);\n\t}",
"public function __set($key, $value) {\n if (method_exists($this, 'set_'.$key)) {\n $this->{'set_'.$key}($value);\n }\n $this->properties->{$key} = $value;\n }",
"protected function buildPropertyDefaults() {\n }",
"protected static function validatorMetaForPropertyTemplateFieldName(ValidatorClassMetaData $metadata): void\n {\n// $metadata->addPropertyConstraint(\n// TemplateFieldNameFieldInterface::PROP_TEMPLATE_FIELD_NAME,\n// new NotBlank()\n// );\n }",
"public function Create()\n {\n parent::Create();\n\n $this->RegisterPropertyString('Host', '');\n $this->RegisterPropertyString('Username', '');\n $this->RegisterPropertyString('Password', '');\n $this->RegisterPropertyString('Database', 'IPS');\n $this->RegisterPropertyString('Variables', json_encode([]));\n $this->RegisterTimer('LogData', 0, 'ACmySQL_LogData($_IPS[\\'TARGET\\']);');\n $this->Vars = [];\n $this->Buffer = [];\n }",
"public function getProperty($key);",
"protected function make() {\n\n\t\tif ( ! is_null( $this->tag ) && isset( self::$aliases[ $this->tag ] ) ) {\n\t\t\t$this->set( 'key', self::$aliases[ $this->tag ] );\n\t\t}\n\n\t\t// Set Template\n\t\tif ( false !== $this->attributes['label'] ) {\n\t\t\t$template = 'shortcodes/metadata-label.php';\n\t\t} else {\n\t\t\t$template = 'shortcodes/metadata.php';\n\t\t}\n\n\t\t$this->template = new Template( $template );\n\t}",
"public function __construct(){\n\t\t\tparent::__construct(array(), \\ArrayObject::STD_PROP_LIST);\n\t\t\t$values = func_get_args();\n\t\t\tif(is_array($values) === true && count($values) > 0 && is_array($values[0])){\n\t\t\t\t$values = current($values);\n\t\t\t\tforeach($values as $k => $v){\n\t\t\t\t\t$this[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function __construct(array $properties) {\n foreach ($properties as $property => $value) {\n switch ($property) {\n // Strings.\n case 'databaseId':\n case 'commercialName':\n case 'firstName':\n case 'lastName':\n case 'addressLine1':\n case 'addressLine2':\n case 'stateNameOrAbbreviation':\n case 'city':\n case 'zipCode':\n case 'eMail':\n case 'eMail2':\n case 'eMail3':\n case 'fax':\n case 'phone':\n case 'cellPhone':\n case 'smsPhone':\n case 'description':\n case 'website':\n case 'fein':\n case 'customerId':\n case 'insuredId':\n $this->$property = $value;\n break;\n\n // Booleans.\n case 'active':\n $this->$property = (bool) $value;\n break;\n\n // InsuredType objects.\n case 'type':\n $this->$property = new InsuredType($value);\n break;\n }\n }\n }",
"function set_property(){\n }",
"function BuildProperty($PropNode)\n {\n $objProp = new clsProperty();\n\n foreach ($PropNode->children() as $PropChild)\n {\n switch ($PropChild->getName())\n {\n case \"ID\":\n $objProp->ID = $PropChild;\n break;\n case \"Name\":\n $objProp->Name = $PropChild;\n break;\n case \"Address\":\n $objProp->Address = $PropChild;\n break;\n case \"City\":\n $objProp->City = $PropChild;\n break;\n case \"State\":\n $objProp->State = $PropChild;\n break;\n case \"Zip\":\n $objProp->Zip = $PropChild;\n break;\n case \"Phone\":\n $objProp->Phone = $PropChild;\n break;\n case \"Email\" :\n $objProp->Email = $PropChild;\n break;\n case \"Maint\":\n $objProp->Maint = $PropChild;\n break;\n case \"WebSite\":\n $objProp->WebSite = $PropChild;\n break;\n case \"Desc\" :\n $objProp->Desc = $PropChild;\n break;\n case \"Amenities\":\n $objProp->Amenities = explode(\"--\",$PropChild);\n break;\n case \"Highlights\" :\n $objProp->Highlights = $PropChild;\n break;\n case \"Coupon\" :\n $objProp->Coupon = $PropChild;\n break;\n case \"Vtour\" :\n $objProp->Vtour = $PropChild;\n break;\n case \"MainPic\" :\n $objProp->MainPic = $PropChild;\n break;\n case \"SubPic1\" :\n case \"SubPic2\" :\n case \"SubPic3\" :\n case \"SubPic4\" :\n case \"SubPic5\" :\n array_push($objProp->SubPics, $PropChild) ;\n break;\n case \"OneBedLowPrices\" :\n case \"TwoBedLowPrices\" :\n case \"ThreeBedLowPrices\" :\n case \"FourBedLowPrices\" :\n\n array_push($objProp->BedLowPrices,$PropChild) ;\n // or die(\" Error Creating BedLowPrices object \");\n break;\n\n case \"UnitTypes\" :\n\n $objProp->Units = $this->BuildUnit($objProp->Units,$PropChild);\n // die(\" Error Creating Unit object \") ;\n\n break;\n case \"ReportRoster\" :\n \n\n $objProp->Reports = $this->BuildReport($objProp->Reports,$PropChild) ;\n // or die (\" Error Creating Report object \") ;\n break;\n }\n\n }\n\n return $objProp;\n\n\n }",
"public function getProperty();",
"public function getProperty2Name() {}",
"public function __construct($config = array()) {\n if ($config && is_array($config)) {\n foreach ($config as $property => $value) {\n if (property_exists($this, $property)) {\n $this->{$property} = $value;\n }\n }\n }\n }",
"public abstract function makeValue($value);",
"public function propertyObject($propertyIdent);",
"public function create($value) {\n return $this->setProperty('create', $value);\n }",
"public function create($value) {\n return $this->setProperty('create', $value);\n }",
"public function __construct(array $properties) {\n parent::__construct($properties);\n foreach ($properties as $property => $value) {\n switch ($property) {\n // Strings.\n case 'description_of_accident':\n case 'vin_number':\n case 'driver_first_name':\n case 'driver_last_name':\n case 'driver_dl_number':\n case 'describe_damage':\n case 'other_vin_number':\n case 'other_driver_first_name':\n case 'other_driver_last_name':\n case 'other_driver_dl_number':\n case 'other_describe_damage':\n case 'estimate_amount':\n case 'where_vehicle_can_be_seen':\n case 'when_vehicle_can_be_seen':\n $this->$property = $value;\n break;\n\n // Booleans.\n case 'child_seat':\n case 'child_seat_installed':\n case 'child_seat_sustain':\n $this->$property = (bool) $value;\n break;\n }\n }\n }",
"function createField($keyName, $uitype, $value, $name, $addToMap = false, $inCallback = null, $outCallback = null){\r\n\t\treturn $this->fields->createField($keyName, $uitype, $value, $name, $addToMap, $inCallback, $outCallback);\r\n\t}",
"public function create($name, $value = '');",
"function addListItemProperty($a_txt, $a_val)\n\t{\n\t\t$this->list_properties[] = array(\"txt\" => $a_txt, \"val\" => $a_val);\n\t}",
"public function __set($property, $value) {}",
"public function __construct(array $options = array())\n {\n foreach($options as $key => $value) {\n $this->properties[$key] = $value;\n }\n }",
"function wsdl_docs_soapclient_ui_property_row($service, $types, $name = '', $info = array()) {\n $property['name'] = array(\n '#type' => 'textfield',\n '#disabled' => TRUE,\n '#size' => 40,\n '#default_value' => $name,\n );\n return $property;\n}",
"abstract public function setAssetProperty(string $propertyName, mixed $propertyValue): static;",
"function __construct($key, $value = null)\n\t{\n\t\t$this->key = $key;\n\t\t$this->value = $value;\n\t}"
] | [
"0.7095304",
"0.6121014",
"0.6110994",
"0.60713995",
"0.60279053",
"0.5582816",
"0.55579007",
"0.55107677",
"0.5450155",
"0.5427665",
"0.5338361",
"0.53073525",
"0.5288827",
"0.52727246",
"0.51777196",
"0.5169115",
"0.5162658",
"0.5143158",
"0.5078803",
"0.5068681",
"0.50080216",
"0.50047493",
"0.49976626",
"0.49507207",
"0.4938694",
"0.49358466",
"0.4911901",
"0.49097398",
"0.48980552",
"0.48680863",
"0.48646086",
"0.48611888",
"0.48601088",
"0.48596323",
"0.483968",
"0.48371202",
"0.48339975",
"0.4820071",
"0.48146793",
"0.4773204",
"0.47695416",
"0.4764774",
"0.47414762",
"0.47404757",
"0.47196233",
"0.47081947",
"0.47067243",
"0.4705369",
"0.46933886",
"0.4690771",
"0.46750095",
"0.46743172",
"0.46730068",
"0.46630055",
"0.46456873",
"0.46437028",
"0.46404198",
"0.46321154",
"0.46299335",
"0.4628745",
"0.46273336",
"0.46262494",
"0.46222618",
"0.46203712",
"0.46114886",
"0.45912108",
"0.45885456",
"0.4580766",
"0.4578647",
"0.45591158",
"0.45527005",
"0.45527005",
"0.45523387",
"0.45519918",
"0.45473993",
"0.45438755",
"0.4537983",
"0.45347312",
"0.4530885",
"0.45153278",
"0.45137653",
"0.45102778",
"0.45043766",
"0.45040065",
"0.44939923",
"0.4493797",
"0.44936892",
"0.44923246",
"0.44918624",
"0.44916406",
"0.44868675",
"0.44868675",
"0.44831154",
"0.44814146",
"0.4473685",
"0.44698396",
"0.4467255",
"0.44626793",
"0.44615337",
"0.4458432",
"0.445504"
] | 0.0 | -1 |
Updates the current value. This may be either a single, or multiple strings in an array. | public function setValue($value)
{
$this->value = $value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function update($listOfValue);",
"public function update($array = [])\n {\n $this->stored = array_replace_recursive($this->stored, $array);\n }",
"public function update(array $input)\n {\n }",
"function Update($array){\n\n }",
"function update_value( $value, $post_id, $field ) {\n\t\t\t// Bail early if no value.\n\t\t\tif ( empty( $value ) ) {\n\t\t\t\treturn $value;\n\t\t\t}\n\n\t\t\t// Format array of values.\n\t\t\t// - ensure each value is an id.\n\t\t\t// - Parse each id as string for SQL LIKE queries.\n\t\t\tif ( acf_is_sequential_array( $value ) ) {\n\t\t\t\t$value = array_map( 'acf_idval', $value );\n\t\t\t\t$value = array_map( 'strval', $value );\n\n\t\t\t\t// Parse single value for id.\n\t\t\t} else {\n\t\t\t\t$value = acf_idval( $value );\n\t\t\t}\n\n\t\t\t// Return value.\n\t\t\treturn $value;\n\t\t}",
"function update_value( $value, $post_id, $field ) {\n\n\t\t\t// Bail early if no value.\n\t\t\tif ( empty( $value ) ) {\n\t\t\t\treturn $value;\n\t\t\t}\n\n\t\t\t// Convert to array.\n\t\t\t$value = acf_array( $value );\n\n\t\t\t// Format array of values.\n\t\t\t// - ensure each value is an id.\n\t\t\t// - Parse each id as string for SQL LIKE queries.\n\t\t\t$value = array_map( 'acf_idval', $value );\n\t\t\t$value = array_map( 'strval', $value );\n\n\t\t\t// Return value.\n\t\t\treturn $value;\n\n\t\t}",
"public function update(array $data);",
"public function update(array $data);",
"public function update(array $data);",
"public function updateMultiple_data()\n {\n \n }",
"public function updateData(array $data);",
"protected function update($value)\n {\n }",
"public function update($value)\n {\n }",
"public function update($value)\n {\n }",
"public function update($arr) {\n\t\tglobal $query, $wtcDB, $lang;\n\n\t\t$update = $wtcDB->massUpdate($arr);\n\n\t\t// Execute!\n\t\tnew Query($query['lang_words']['update'], Array(1 => $update, 2 => $this->wordid), 'query', false);\n\t\t\n\t\tLanguage::cache();\n\t}",
"public function update($arr) {\n // update attribute\n foreach ($arr as $key => $value) {\n $this->{$key} = $value;\n }\n }",
"public function update($arr) {\n // update attribute\n foreach ($arr as $key => $value) {\n $this->{$key} = $value;\n }\n }",
"public function update(array $update);",
"public function updateFromArray(array $data)\n {\n $this->exchangeArray($data);\n }",
"public function setValue($value)\n {\n $values = array();\n $value = empty($value) ? array() : $value;\n foreach ($value as $text) {\n $text = trim((string)$text);\n if (!empty($text)) {\n $values[] = $text;\n }\n }\n\n parent::setValue($values);\n }",
"function modifyDataArrForFormUpdate($inputArr)\t{\n\t\tif (is_array($this->conf[$this->conf['cmdKey'].'.']['evalValues.']))\t{\n\t\t\treset($this->conf[$this->conf['cmdKey'].'.']['evalValues.']);\n\t\t\twhile(list($theField,$theValue)=each($this->conf[$this->conf['cmdKey'].'.']['evalValues.']))\t{\n\t\t\t\t\n\t\t\t\t$listOfCommands = t3lib_div::trimExplode(',',$theValue,1);\n\t\t\t\twhile(list(,$cmd)=each($listOfCommands))\t{\n\t\t\t\t\t$cmdParts = preg_split('/\\[|\\]/',$cmd);\t// Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.\n\t\t\t\t\t$theCmd = trim($cmdParts[0]);\n\t\t\t\t\tswitch($theCmd)\t{\n\t\t\t\t\t\tcase 'twice':\n\t\t\t\t\t\t\tif (isset($inputArr[$theField]))\t{\n\t\t\t\t\t\t\t\tif (!isset($inputArr[$theField.'_again']))\t{\n\t\t\t\t\t\t\t\t\t$inputArr[$theField.'_again'] = $inputArr[$theField];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->additionalUpdateFields.=','.$theField.'_again';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'checkArray':\n\t\t\t\t\t\t\t//echo \"<br>$theField : \".$inputArr[$theField];\n\t\t\t\t\t\t\tif ($inputArr[$theField] && !$this->isPreview())\t{\n\t\t\t\t\t\t\t\tfor($a=0;$a<=30;$a++)\t{\n\t\t\t\t\t\t\t\t\tif ($inputArr[$theField] & pow(2,$a))\t{\n\t\t\t\t\t\t\t\t\t\t$alt_theField = $theField.']['.$a;\n\t\t\t\t\t\t\t\t\t\t$inputArr[$alt_theField] = 1;\n\t\t\t\t\t\t\t\t\t\t$this->additionalUpdateFields.=','.$alt_theField;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t//echo ' modifyDataArrForFormUpdate : '.$theField.','.$this->additionalUpdateFields;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (is_array($this->conf['parseValues.']))\t{\n\t\t\treset($this->conf['parseValues.']);\n\t\t\twhile(list($theField,$theValue)=each($this->conf['parseValues.']))\t{\n\t\t\t\t$listOfCommands = t3lib_div::trimExplode(',',$theValue,1);\n\t\t\t\twhile(list(,$cmd)=each($listOfCommands))\t{\n\t\t\t\t\t$cmdParts = split('\\[|\\]',$cmd);\t// Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.\n\t\t\t\t\t$theCmd = trim($cmdParts[0]);\n\t\t\t\t\tswitch($theCmd)\t{\n\t\t\t\t\t\tcase 'multiple':\n\t\t\t\t\t\t\tif (isset($inputArr[$theField]) && !$this->isPreview())\t{\n\t\t\t\t\t\t\t\t$inputArr[$theField] = explode(',',$inputArr[$theField]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'checkArray':\n\t\t\t\t\t\t\tif ($inputArr[$theField] && !$this->isPreview())\t{\n\t\t\t\t\t\t\t\tfor($a=0;$a<=30;$a++)\t{\n\t\t\t\t\t\t\t\t\tif ($inputArr[$theField] & pow(2,$a))\t{\n\t\t\t\t\t\t\t\t\t\t$alt_theField = $theField.']['.$a;\n\t\t\t\t\t\t\t\t\t\t$inputArr[$alt_theField] = 1;\n\t\t\t\t\t\t\t\t\t\t$this->additionalUpdateFields.=','.$alt_theField;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$inputArr = $this->userProcess_alt(\n\t\t\t$this->conf['userFunc_updateArray'],\n\t\t\t$this->conf['userFunc_updateArray.'],\n\t\t\t$inputArr\n\t\t);\n\n\t\treturn $inputArr;\n\t}",
"public function setArray(array $array):void{\n\t\tforeach($array as $key=>$value)\n\t\t\t$this->values[$key] = str::_trim(cast::_string($value));\n\t}",
"public function update(array $data)\n {\n if (empty($data)) {\n return;\n }\n\n collect($data)->each(function ($value, $key) {\n $this->{$key} = $value;\n });\n }",
"public function update(array $data)\n {\n parent::update($data);\n if (array_key_exists('data', $data)) {\n $this->setData($data['data']);\n }\n }",
"function set($value) {\n\t\tif (!is_array($value))\n\t\t\t$value = array($value);\n\t\treturn (empty($this->_data)) ? $this->_data = $value : $this->_data = array_merge($this->_data,$value);\n\t}",
"protected function _update(array $data)\n {\n return parent::_update($data);\n }",
"public function update( string $key, $value );",
"function setValueByArray($a_values)\n\t{\n\t\t$this->setValue($a_values[$this->getPostVar()]);\n\t}",
"public function setValue($value){\n if(is_array($value)){\n $this->_data = $value;\n }else{\n throw new SmartestException(\"SmartestArray::setValue() expects an array; \".gettype($value).\" given.\");\n }\n }",
"function setValue($value) {\n $values = (array) $value;\n foreach ($values as $onevalue) {\n if (($this->tags || $this->ajax) &&\n (!$this->optionExists($onevalue)) &&\n ($onevalue !== '_qf__force_multiselect_submission')) {\n $this->addOption($onevalue, $onevalue);\n }\n }\n return parent::setValue($value);\n }",
"public function set($name, string $value = '')\n {\n if (is_array($name)) {\n $name = array_change_key_case($name, CASE_UPPER);\n $this->items = array_merge($this->items, $name);\n return;\n }\n\n $name = strtoupper($name);\n $this->items[$name] = $value;\n }",
"public function testUpdateValue()\n {\n $response = $this->json('PATCH', '/api/values');\n $response->assertStatus(200);\n }",
"function update_value($value, $post_id, $field) {\n\t\t//$value = \"this overrides\";\n\t\treturn $value;\n\t}",
"public function add_value($value) : void\n {\n if(!($this -> $value === $value || in_array($value, $this -> value))){\n if(gettype($this -> value) === \"string\"){\n $this -> value = [$this -> value];\n }\n array_push($this -> value, $value);\n }\n }",
"public function update($current = '')\n\t{\n \t\t// Nothing to do here.\n\t\treturn TRUE;\n\t}",
"public function update(string $name, string $value): void;",
"function update_attributes($array = array())\n {\n foreach ($array as $key => $value) {\n $this->_stdObject->{$key} = $value;\n }\n }",
"function update_array_option($option, $value) {\r\n\t\t$options = get_option('foliamaptool');\r\n\t\t$options[$option] = $value;\r\n\t\tupdate_option('foliamaptool', $options);\r\n\t}",
"protected function setUpdateArray() {\n $column_names = getColumnNames($this->table_name);\n foreach ($column_names as $column_name) {\n if (isset($_POST[$column_name])) {\n $this->update[$column_name] = Mysql::SQLValue($_POST[$column_name]);\n } else if (isset($_GET[$column_name])) {\n $this->update[$column_name] = Mysql::SQLValue($_GET[$column_name]);\n }\n }\n }",
"public function testUpdateValuesContainSpecialCharacters(): void { }",
"public function setValue(array &$array, $value)\n\t{\n\t\tAgaviArrayPathDefinition::setValue($this->parts, $array, $value);\n\t}",
"public function updateFromArray(array $array)\n\t{\n\t\tif (!empty($array)) {\n\t\t\tforeach ($array as $key=>$item) {\n\t\t\t\t$this->set($key,$item);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function updateFromArray(array $array)\n\t{\n\t\tif (!empty($array)) {\n\t\t\tforeach ($array as $key=>$item) {\n\t\t\t\t$this->set($key,$item);\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}",
"abstract public function updateData();",
"private function set(string $name, $value): void\n {\n $path = explode('/', $name);\n $current = &$this->items;\n\n foreach ($path as $field) {\n // Handle arrays and scalars.\n if (!is_array($current)) {\n $current = [$field => []];\n } elseif (!isset($current[$field])) {\n $current[$field] = [];\n }\n $current = &$current[$field];\n }\n\n $current = $value;\n $this->updated = true;\n }",
"public function updateString( Inx_Api_Recipient_Attribute $attr, $sValue );",
"public function setData($data = array())\n {\n $this->data = (string) $data;\n\n $this->update();\n }",
"public function update(array $arr, $uuid)\n {\n }",
"function update(array $values)\n{\n\tforeach ($this as $model) {\n\t\t$model->setValues($values);\n\t\t$model->save();\n\t}\n}",
"public function setValue( array $values ) {\n\t\t\t$this->value = $values;\n\t\t}",
"public function setValues(?array $value): void {\n $this->getBackingStore()->set('values', $value);\n }",
"public function setValues(?array $value): void {\n $this->getBackingStore()->set('values', $value);\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function update_value($value, $post_id, $field)\n {\n }",
"function UpdateRec($strTable, $strWhere, $arrValue){\n\n\t\t$strQuery = \"\tupdate $strTable set \";\n\n\t\treset($arrValue);\n\n\t\twhile (list ($strKey, $strVal) = each ($arrValue))\n\t\t{\n\t\t\t$strQuery .= $strKey . \"='\" . FixString2($strVal) . \"',\";\n\t\t}\n\n\t\t// remove last comma\n\t\t$strQuery = substr($strQuery, 0, strlen($strQuery) - 1);\n\n\t\t$strQuery .= \" where $strWhere;\";\n\n\t\t// execute query\n\t\tSQLQuery($strQuery);\n\t}",
"public function modifyValue($value, array $arguments);",
"protected function updateApprovableMultiLanguageString($object, $getter, $setter,\n $newString, $languageCode, $stringExceptionArray, $replace = false) {\n if (is_null($object->$getter())) {\n $newField = new ApprovableMultiLanguageString;\n $moderationStatus = new ModerationStatus;\n $moderationStatus->setStatus(ModerationStatus::STATUS_USER_EDIT);\n $newField->setModerationStatus($moderationStatus);\n }\n // otherwise get existing AMLS field\n else {\n $newField = $object->$getter();\n // keep copy of current string (or clone if current string is to be kept)\n $currentString = $replace?$newField->getCurrent():clone $newField->getCurrent();\n }\n\n // update field and stop here if nothing changed\n if (!$this->updateMultiLanguageString($newField, 'getCurrent', 'setCurrent',\n $newString, $languageCode, $stringExceptionArray, $replace)) {\n return false;\n }\n\n // if modified and was previously approved, move last approved value to previous\n if ($newField->getModerationStatus()->getStatus() == ModerationStatus::STATUS_APPROVED) {\n $newField->setPrevious($currentString);\n }\n\n // back to user edit status\n $newField->getModerationStatus()->setStatus(ModerationStatus::STATUS_USER_EDIT);\n \n // assign to object property\n try {\n $object->$setter($newField);\n }\n catch (StringException $e) {\n $this->setErrorFromException($e, $stringExceptionArray);\n }\n\n return true;\n }",
"public function setChanges(?array $value): void {\n $this->getBackingStore()->set('changes', $value);\n }",
"public function testUpdateValuesTooShort(): void { }",
"public function update(array $array, $data = array()) {\n $this->sql = 'UPDATE `' . static::$tableName . '` SET ';\n $properties = (!empty($data) && count($data) > 0) ? $data : $this->properties;\n foreach ($properties as $key => $value) {\n $this->sql.=\"`$key`=\" . $this->db->quote($value); //PDO quote is wrap the value within signle quotes 'value'\n }\n $this->sql = trim($this->sql, \",\");\n $this->where($array);\n return $this->execute();\n }",
"public function update(array $data): bool\n {\n }",
"public function update(array $data): bool\n {\n }",
"public function update(array $data): bool\n {\n }",
"function setValueByArray($a_values)\n\t{\n\t\t$this->setValue($a_values[$this->getPostVar()]);\n\t\tforeach($this->getOptions() as $option)\n\t\t{\n\t\t\tforeach($option->getSubItems() as $item)\n\t\t\t{\n\t\t\t\t$item->setValueByArray($a_values);\n\t\t\t}\n\t\t}\n\t}",
"public function updateData($key, $value) {\n $meta = $this->getData();\n $keys = explode('.', $key);\n $p = &$meta;\n foreach ($keys as $key) {\n if (!isset($p[$key])) {\n $p[$key] = array();\n }\n $p = &$p[$key];\n }\n $p = $value;\n $this->setData(json_encode($meta));\n }",
"public function ProcessUpdate($Input)\r\n {\r\n $stringToArray = str_split($Input);\r\n\r\n //variable to hold the output string\r\n $Output = \"\";\r\n\r\n //count to to control two digits\r\n $count = 0; \r\n\r\n //string to hold the value for two digits\r\n $data = \"\";\r\n\r\n //for through all the array from split string \r\n for($index = 0; $index < sizeof($stringToArray); $index++)\r\n { \r\n //this check for the end of th array\r\n if($index > sizeof($stringToArray)-4 && $index < sizeof($stringToArray)-1)\r\n {\r\n $data .= $stringToArray[$index];\r\n if($count >= 1 )\r\n {\r\n $Output.= $data+1; \r\n }\r\n //counter\r\n $count++;\r\n \r\n }else{\r\n\r\n //regular expression to check all digits\r\n if(preg_match('/^\\d+$/', $stringToArray[$index]))\r\n {\r\n //store data back to string output\r\n $Output.= $stringToArray[$index]+=1; \r\n }else{\r\n $Output.=$stringToArray[$index]; \r\n }\r\n }\r\n \r\n }\r\n\r\n //return value in output\r\n return $Output;\r\n }",
"function voiceServerUpdate(?array $data);",
"public function setValue($entries) {}",
"public function update( Array $updatingArray ) {\n $this->_lastUpdate = $updatingArray;\n return $this;\n }",
"function update($ids, $name, $value)\n{\n\tglobal $db;\n\tstatic $update=null;\n\n\tif (!isset($update)) $update = $db->prepare('UPDATE results SET notes=:notes WHERE branch=:branch AND script=:script AND suite=:suite AND test=:test');\n\n\tlist($branch, $script, $suite, $test) = explode('-', $ids);\n\t$update->execute(array(\n\t\t'branch' => $branch,\n\t\t'script' => $script,\n\t\t'suite' => $suite,\n\t\t'test' => $test,\n\t\t$name => $value,\n\t));\n\terror_log(__METHOD__.\"('$ids', '$name', '$value')\");\n}",
"public function updateOneValueWhere($tableName,$col,$value,$bindArr){\n $req = $this->getPdo()->prepare(\n ' UPDATE ' . $tableName .\n ' SET ' . $col .\n ' = ' . $col .\n ' ' . $value .\n ' WHERE id = ?'\n );\n $req->execute($bindArr);\n\n }",
"public function update_meta( $key, $value, $prev_value = '' );",
"public function update()\n\t{\n\n\t}",
"protected function _updateDbValue($arr)\n\t{\n\t\tglobal $classEscape;\n\n\t\t$tm = TIMESTAMP;\n\t\t$arrSpaceStrTag = $classEscape->splitSpaceArrayData(array('data' => $arr['arr']['arrSpaceStrTag']));\n\t\t$arrSpaceStrTag = $classEscape->joinSpaceArray(array('arr' => $arrSpaceStrTag));\n\t\t$strTitle = $arr['arr']['strTitle'];\n\t\t$arrCommaIdModuleAdmin = $arr['arr']['arrCommaIdModuleAdmin'];\n\t\t$arrCommaIdModuleUser = $arr['arr']['arrCommaIdModuleUser'];\n\n\t\tif ($arr['flagEdit']) {\n\t\t\t$data = array(\n\t\t\t\t'arrColumn' => array('strTitle', 'arrCommaIdModuleUser', 'arrCommaIdModuleAdmin', 'arrSpaceStrTag'),\n\t\t\t\t'arrValue' => array($strTitle, $arrCommaIdModuleUser, $arrCommaIdModuleAdmin, $arrSpaceStrTag),\n\t\t\t);\n\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'arrColumn' => array('stampRegister', 'stampUpdate', 'strTitle', 'arrCommaIdModuleUser', 'arrCommaIdModuleAdmin', 'arrSpaceStrTag'),\n\t\t\t\t'arrValue' => array($tm, $tm, $strTitle, $arrCommaIdModuleUser, $arrCommaIdModuleAdmin, $arrSpaceStrTag),\n\t\t\t);\n\t\t}\n\n\t\treturn $data;\n\t}",
"public function update(array $input = null)\n\t{\t\n\t\tif(count($input) == 0 || !isset($input['uid'])) {\n\t\t\t$this->result = new Ce_Return_Object();\r\n\t\t\t$this->result->data = array();\r\n\t\t\t$this->result->status_code = '415';\r\n\t\t\t$this->result->message = 'A valid array is required to update a '.$this->objName.' entry.';\r\n\t\t\t\t\r\n\t\t\treturn $this->result->returnAsArray();\r\n\t\t}\r\n\t\t\n\t\t$exit_status = parent::update($input);\n\t\treturn $this->result->returnAsArray();\n\t}",
"public function update(array $input)\n {\n // add checkboxes data\n foreach (Config::get('app.locales') as $locale) {\n $input[$locale]['status'] = Input::get($locale.'.status', 0);\n }\n\n $inputDot = array_dot($input);\n\n if (! $this->valid($inputDot)) {\n return false;\n }\n\n if (isset($input['tags'])) {\n $input['tags'] = $this->processTags($input['tags']);\n }\n\n return $this->repository->update($input);\n }",
"public function update(array $values)\n {\n return parent::update(Factory::resolve($values));\n }",
"public function update() {\r\n\r\n\t}",
"public function update(array $data)\n\t{\n\t\t$ret = parent::update($data);\n\t\t//debug($this->db->lastQuery);\n\t\t$this->originalData = $this->data;\n\t\t$this->stateHash = $this->getStateHash();\n\t\treturn $ret;\n\t}",
"public function setValue(array $arr){\r\n $this->_valores = $arr;\r\n }",
"public function update()\r\n {\r\n \r\n }",
"public function update($value) {\n return $this->setProperty('update', $value);\n }",
"public function update($value) {\n return $this->setProperty('update', $value);\n }",
"public function testUpdateValuesTooLong(): void { }",
"public function setFromArray(array &$_data);",
"public function setItems(?array $value): void {\n $this->getBackingStore()->set('items', $value);\n }",
"public function db_update_string()\n {\n $key = $this->key;\n $value = $this->value;\n $string = $key . \" = \\\"\" . addslashes($value) . \"\\\",\";\n return $string;\n }",
"public function __set( $name, $value )\n\t\t{\n\t\t\tif ( isset ( $this->data[ $name ] ) && is_array( $this->data[ $name ] ) ) {\n\t\t\t\t$this->data[ $name ] = array_merge( $this->data[ $name ], $value );\n\t\t\t} else {\n\t\t\t\t$this->data[ $name ] = $value;\n\t\t\t}\n\t\t}",
"public function updateAttribute(array $params)\n {\n }"
] | [
"0.64449745",
"0.6397754",
"0.6241766",
"0.62135637",
"0.61436486",
"0.60610247",
"0.58764994",
"0.58764994",
"0.58764994",
"0.5872042",
"0.5857526",
"0.58362186",
"0.5834522",
"0.5834522",
"0.577558",
"0.57270944",
"0.57270944",
"0.5697672",
"0.5686683",
"0.56456715",
"0.5602494",
"0.55944604",
"0.55771446",
"0.5508221",
"0.55020905",
"0.5393012",
"0.5366843",
"0.53324616",
"0.5326455",
"0.52843463",
"0.5272571",
"0.5263479",
"0.52392924",
"0.5197992",
"0.51960087",
"0.5194963",
"0.5193895",
"0.5187069",
"0.5183218",
"0.518273",
"0.517771",
"0.51688325",
"0.51688325",
"0.51672673",
"0.5155851",
"0.51510924",
"0.5143237",
"0.51392025",
"0.51368487",
"0.51286155",
"0.51153076",
"0.51153076",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.5106299",
"0.51050955",
"0.51045424",
"0.50930417",
"0.50852984",
"0.50786304",
"0.5077913",
"0.5077077",
"0.5077077",
"0.5077077",
"0.5058481",
"0.50573766",
"0.505123",
"0.5050955",
"0.5043372",
"0.50376976",
"0.5035836",
"0.50277764",
"0.50101906",
"0.50068927",
"0.50051415",
"0.49958816",
"0.4995623",
"0.49946275",
"0.4989078",
"0.49873653",
"0.49823087",
"0.49814808",
"0.49742362",
"0.49742362",
"0.49708134",
"0.49610478",
"0.4959841",
"0.49566323",
"0.4949058",
"0.49447146"
] | 0.0 | -1 |
Returns the current value. This method will always return a singular value. If this was a multivalue object, some decision will be made first on how to represent it as a string. To get the correct multivalue version, use getParts. | public function getValue()
{
if (is_array($this->value)) {
if (0 == count($this->value)) {
return;
} elseif (1 === count($this->value)) {
return $this->value[0];
} else {
return $this->getRawMimeDirValue();
}
} else {
return $this->value;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function valueOf() {\n return $this->_value;\n }",
"function getValue() {\n\t\treturn $this->sValue;\n\t}",
"public function value() { return $this->_m_value; }",
"public function getValue()\n {\n return $this->str_value;\n }",
"public function value()\n\t{\n\t\treturn (string) $this->value;\n\t}",
"public function getValue()\n {\n $value = $this->value;\n\n switch ($this->type) \n {\n case 'boolTrue':\n $value = true;\n break;\n\n case 'boolFalse':\n $value = false;\n break;\n\n case 'string':\n $value = str_replace(\"\\\\\", \"\", substr($value, 1, -1));\n break;\n\n case 'number':\n $value = $value + 0;\n break;\n\n case 'null':\n $value = null;\n break;\n }\n\n return $value;\n }",
"public function getValue()\n {\n return self::decodeValue($this->value);\n }",
"protected function value_get(){\n\t\t\n\t\tif ( is_serialized( $this->value ) ) {\n\t\t\t$this->value = unserialize( $this->value );\n\t\t} elseif ( is_string( $this->value ) && 0 === strpos( $this->value, '{' ) && is_object( $_value = json_decode( $this->value ) ) ) {\n\t\t\t$this->value = (array) $_value;\n\t\t}\n\n\t\treturn $this->value;\n\t\t\n\t}",
"public function getValue()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'value'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'value'];\n\t\t}\n\n\t\treturn '';\n\t}",
"protected function getValue() {\r\n return $this->_value;\r\n }",
"public function get_value() {\n return $this->value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }",
"public function GetValue() {\n\t\treturn $this->_value;\n\t}",
"public function getValue()\n {\n return $this->get(self::_VALUE);\n }",
"public function getValue()\n {\n return $this->get(self::_VALUE);\n }",
"public function get_value()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->_fields['Value']['FieldValue'];\n }",
"public function value(): string\n {\n return $this->get('value');\n }",
"public function getValue() {\n return $this->_value;\n }",
"public function getValue()\n {\n return $this->_value;\n }",
"public function getValue()\n {\n return $this->_value;\n }",
"public function getValue()\n {\n return $this->_value;\n }",
"public function getValue()\n {\n return isset($this->value) ? $this->value : '';\n }",
"public function getValue()\n {\n return isset($this->value) ? $this->value : '';\n }",
"public function getValue()\n {\n if ($this->isArrayField()) {\n return json_decode($this->value);\n }\n return $this->value;\n }",
"public function getValue()\n {\n return $this->get(self::VALUE);\n }",
"public function getValue()\n {\n return $this->get(self::VALUE);\n }",
"final public function value()\n {\n return $this->value;\n }",
"public function getValue() {\n\t\treturn $this -> value;\n\t}",
"public function get_value()\n\t{\n\t\treturn $this->value;\n\t}",
"public function get_value() {\n\t\treturn $this->_value;\n\t}",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function value()\n {\n return $this->value;\n }",
"public function getStringValue()\n {\n return $this->string_value;\n }",
"public function getValue()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}",
"public function getValue()\r\n {\r\n return $this->value;\r\n }",
"public function getValue()\n {\n return $this->_db->prepareStringToOut($this->_value);\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}",
"public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}",
"public function getValue() {\n \n return $this->toScalar();\n }",
"public function value() {\n\t\treturn $this->__toString();\n\t}",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue() {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }",
"public function getValue()\n {\n return $this->value;\n }"
] | [
"0.7281043",
"0.7149458",
"0.7119671",
"0.70677346",
"0.69635963",
"0.6960775",
"0.69368017",
"0.6928",
"0.69275326",
"0.6926312",
"0.69118303",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.68937355",
"0.689093",
"0.6885976",
"0.6885976",
"0.68835276",
"0.6874656",
"0.68674797",
"0.6866114",
"0.6856617",
"0.6856617",
"0.6856617",
"0.6856227",
"0.6856227",
"0.6853139",
"0.68518627",
"0.68518627",
"0.6846451",
"0.6842857",
"0.6842576",
"0.68385875",
"0.6837305",
"0.6837305",
"0.6837305",
"0.6837305",
"0.6837305",
"0.6837305",
"0.68360734",
"0.68306744",
"0.6830027",
"0.6828193",
"0.68114626",
"0.68114626",
"0.68114626",
"0.6807722",
"0.6807722",
"0.68029404",
"0.68007827",
"0.6799678",
"0.6799678",
"0.6799678",
"0.6799678",
"0.6799678",
"0.6799678",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979",
"0.6796979"
] | 0.0 | -1 |
Sets a multivalued property. | public function setParts(array $parts)
{
$this->value = $parts;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setMultivaluedAttributes(array $multivaluedAttributes)\n {\n $this->multivaluedAttributes = $multivaluedAttributes;\n }",
"function setMultiple($properties) {\n foreach ($properties as $property => $value) {\n $this->set($property, $value);\n }\n }",
"public function set_the_multiple_properties($key, $value) {\n\n if ( !isset(self::$the_multilpe_properties[$key]) ) {\n self::$the_multilpe_properties[$key] = array();\n }\n\n self::$the_multilpe_properties[$key][] = $value;\n\n }",
"protected function setSingleProperty($property, $typoscript, $submittedValues) {\n\n\t\tif (!isset($submittedValues[$typoscript['field']])) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t$this->vcard->{'set' . $property}($submittedValues[$typoscript['field']]);\n\t\t} catch (Exception $e) {}\n\t}",
"public function setMultiple($multiple) {\n $this->multiple = $multiple;\n }",
"public function addMultiField($baseField, $field, MultiFieldProperty $property);",
"protected function addMultiProperty($property, $typoscript, $submittedValues) {\n\n\t\t$entryArray[0] = array();\n\n\t\t// (e.g. postProcessor.1.properties.1.zip = zip-fieldname\n\t\t// or postProcessor.1.properties.2.field = phone-fieldname)\n\n\t\tforeach ($typoscript as $key => $field) {\n\n\t\t\tif ($key == 'type.') {\n\t\t\t\t$entryArray[0]['type'] = self::getPropertyTypes($typoscript[$key]);\n\n\t\t\t} elseif ($key == 'messenger') {\n\t\t\t\t// addInstantmessenger() takes the type of messenger as an additional parameter\n\t\t\t\t// (e.g. postProcessor.1.properties.1.messenger = X-JABBER)\n\t\t\t\t$entryArray[0][$key] = $typoscript[$key];\n\n\t\t\t} elseif (isset($submittedValues[$field])) {\n\t\t\t\tif ($key == 'field') {\n\t\t\t\t\t$entryArray[0]['value'] = $submittedValues[$field];\n\n\t\t\t\t} else {\n\t\t\t\t\t$entryArray[0][$key] = $submittedValues[$field];\n\t\t\t\t}\n\n\t\t\t} elseif ($key == 'field' && $property != 'Address') {\n\t\t\t\t// all this properties except address require 'value'\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$this->vcard->{'add' . $property}($entryArray);\n\t}",
"public function set(string $property, $value);",
"public function setMultiValue($key, $value, $boost = FALSE) {\n $this->addField($key, $value, $boost);\n }",
"public function set($property, $value);",
"function setMultiple($bool) {\n\t\t$this->multiple = $bool;\n\t}",
"public function setMultiple(?bool $multiple = null): void\n {\n $this->multiple = $multiple ?? true;\n }",
"private function setProperties($array)\n\t{\t\n\t\tif(is_array($array)){\n\t\t\tforeach($array as $key => $value)\n\t\t\t\t$this->$key = $value;\n\t\t}\n\t}",
"public function set($params = array()) {\n\n /**\n * HACK: Limelight API has a bug where it expects a string 'true' or 'false'\n * instead of a boolean value. Because of this, we need to iterate through\n * each of the parameters and turn it into the string representation of a\n * boolean.\n */\n foreach ($params as &$value) {\n if (is_bool($value)) {\n $value = $value ? 'true' : 'false';\n }\n }\n\n // Set the parent first.\n parent::set($params);\n\n // Now set the custom data.\n $endpoint = $this->endpoint('set') . '/custom';\n $custom = isset($params['custom']) ? $params['custom'] : array();\n $this->setProperties('custom_property', $endpoint, $custom, array(\n 'deleteeach' => TRUE\n ));\n\n // Return the this pointer.\n return $this;\n }",
"public function __set($property, $value) {}",
"abstract protected function propertySet($name, $value);",
"public function setProperties(array $properties);",
"function __set($property, $value) {\n global $DB;\n if(is_array($value) && @$this->TYPE[$property] === 'CSV') $value = join(',',$value);\n if(!isset($this->DATA[$property])\n || $this->DATA[$property] !== $value) {\n $DB->config->update(array('value' => $value), array('property' => $property, 'section' => $this->NAME), true);\n $this->DATA[$property] = $value;\n }\n }",
"public static function setting($mixed)\n {\n // Check for array\n if ( is_array($mixed) ) {\n\n // Iterate through keypairs\n foreach ($mixed as $index => $key) {\n\n // Recursion\n self::set($key, true);\n }\n\n // Normal setter\n } else {\n\n // Set the keypair\n self::$data['vars'][$mixed] = null;\n }\n }",
"function setValues($array){\r\n\t\tforeach($array as $key => $val)\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t}",
"public function isMultivalue();",
"public function setMultiSelect($multiSelect = true) {}",
"protected function setProperties($array) {\n\t\tforeach (array_keys($this->data) as $field) {\n\t\t\t$this->data[$field]['value'] = $array[$field];\n\t\t}\n\t\treturn True;\n\t}",
"public static function mset($_arg) {\n\t\tif (!is_array($_arg)) {\n\t\t\t// Invalid argument\n\t\t\ttrigger_error(self::TEXT_MSet);\n\t\t\treturn;\n\t\t}\n\t\t// Bind key-value pairs\n\t\tarray_map('self::set',array_keys($_arg),$_arg);\n\t}",
"public function set_multiselect($multiselect) {\n $this->multiselect = $multiselect;\n }",
"function set_multiple_post_meta( int $post_id, string $base_key, array $vals, ?array $keys = null, ?string $special_key = null ): void {\n\t\t\\wpinc\\meta\\set_multiple_post_meta( $post_id, $base_key, $vals, $keys, $special_key );\n\t}",
"function __set($property, $value)\n {\n\n if( $value != null )\n $this->fields[$property] = $value;\n }",
"public function setMultiple($values) : bool;",
"public function setPropArray($array)\n {\n $this->engine->assign($array);\n }",
"public function setMultiple($key)\n {\n return $this->doSet($key);\n }",
"public function setFromArray(array $data): AbstractEntity {\n\n foreach ($data as $property => $value) {\n\n if(true === is_array($value)) {\n $value = filter_var_array($value, FILTER_SANITIZE_SPECIAL_CHARS);\n } else {\n $value = filter_input(INPUT_POST, $property, FILTER_SANITIZE_SPECIAL_CHARS);\n }\n $this->vars[$property] = $value;\n }\n return $this;\n }",
"public function setMultiple($value)\n {\n if (trim(strtoupper($value)) == \"Y\") {\n $this->internalMultiSelect = true;\n } else {\n $this->internalMultiSelect = false;\n }\n }",
"public function __set($property, $value) {\n\t\tif (array_key_exists($property, $this->_allowedColumns)) {\n\t\t\t$this->_valueArray[$property] = $value;\n\t\t} else {\n\t\t\tthrow new L8M_Exception('Property does not exist: ' . $property);\n\t\t}\n\t}",
"function setProperties($properties) {\n\t\t$properties = ( array ) $properties; //cast to an array\n\n\t\tif (is_array ( $properties )) {\n\t\t\tforeach ( $properties as $k => $v ) {\n\t\t\t\t$this->$k = $v;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function __set( $property, $value ) {\n\t\t\tif ( property_exists( $this, $property ) ) {\n\n\t\t\t\t// Latitude hard-wired callback\n\t\t\t\t//\n\t\t\t\tif ( $property === 'latitude' ) {\n\t\t\t\t\t$this->set_LatLong( $value , null );\n\n\t\t\t\t// Longitude hard-wired callback\n\t\t\t\t//\n\t\t\t\t} elseif ( $property === 'longitude' ) {\n\t\t\t\t\t$this->set_LatLong( null , $value );\n\n\t\t\t\t// All other standard properties\n\t\t\t\t//\n\t\t\t\t} else {\n\t\t\t\t\t$this->$property = $value;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Extended Data, allow property as long as it does not conflict\n\t\t\t// with a built-in property.\n\t\t\t//\n\t\t\tif ( ! property_exists( $this, $property ) ) {\n\t\t\t\tif ( $this->slplus->database->is_Extended() &&\n\t\t\t\t\t$this->slplus->database->extension->has_field( $property )\n\t\t\t\t) {\n\t\t\t\t\t$this->exdata[ $property ] = $value;\n\t\t\t\t} else {\n\t\t\t\t\t$this->temporary[ $property ] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this;\n\t\t}",
"public function set($params) {}",
"function set(array $data) {\n\t\tforeach ($data as $key => $value) {\n\t\t\t$this->$key = $value;\n\t\t}\n\t}",
"abstract public function &setRawAdditionalProperties($value);",
"function __set($property, $value)\n {\n if($property == \"id\")\n {\n $this->id = $value;\n }\n else\n {\n return call_user_func_array(array($this, \"setAttribute\"), array($property, $value));\n }\n }",
"public function setProperties(array $data)\n {\n $this->properties = $data;\n }",
"public function setMultiple($value = null)\n {\n $this->multiple = false;\n }",
"function __set($property, $value) {\n global $USER, $DB;\n if(in_array($property, array('title', 'header'))) {\n return ($this->{'_'.$property} = $value);\n } elseif($property == 'content') {\n return ($this->$property = $value);\n } else {\n return parent::__set($property, $value);\n }\n }",
"public function propertySet($varname, $value)\n {\n $value = base64_encode($value);\n $this->run(\"property_set -i {id} -n \\${$varname} -- {$value}\");\n }",
"public function set($data);",
"public function __set($name, $value) {\n if (ctype_alnum($name) && (ctype_digit($name[0]) == FALSE)) {\n $this->$name = $this->db->quote($value);\n $this->properties[$name] = $value;\n }\n }",
"public function __set($property, $value)\n {\n // convert from Phalcon\\Mvc\\Model\\Resultset\\Simple\n if ($value instanceof \\Phalcon\\Mvc\\Model\\ResultSetInterface)\n {\n // converts resultset into array instead\n // note: you would think you could do $value->toArray() but that converts everything to an array, not just the outer part\n // just track the result sets that we have to convert if in the event we are setting the resultset to the property\n // need to do it this way for performance, filter is too slow\n // this gets triggered for every field for every fetch query (but only when using model relationships aliases\n// $this->fixResultSets[$property] = true;\n //\n $value = $value->filter(function($r) {\n return $r;\n });\n } else\n {\n unset($this->fixResultSets[$property]);\n }\n parent::__set($property, $value);\n }",
"public function set()\n {\n $args = func_get_args();\n $num = func_num_args();\n if ($num == 2) {\n self::$data[$args[0]] = $args[1];\n } else {\n if (is_array($args[0])) {\n foreach ($args[0] as $k => $v) {\n self::$data[$k] = $v;\n }\n }\n }\n }",
"public function setProps($props)\n {\n if (! is_array($props) && ! ($props instanceof \\Traversable)) {\n return $this;\n }\n foreach ($props as $name => $value) {\n $this->set($name, $value);\n }\n\n return $this;\n }",
"public function __set($name, $value) {\r\n if (is_scalar($value)) {\r\n // store the property's value\r\n $this->properties[$name] = $value;\r\n }\r\n }",
"protected function value_set( $value ){\n\t\tif( is_array( $value ) ){\n\t\t\t$this->value = $value;\n\t\t}elseif( is_serialized( $value ) ){\n\t\t\t$this->value = unserialize( $value );\n\t\t}elseif( 0 === strpos( $value, '{' ) && is_object( $_value = json_decode( $value ) ) ){\n\t\t\t$this->value = (array) $_value;\n\t\t}else{\n\t\t\t$this->value = $value;\n\t\t}\n\t}",
"public function setElementPropertyValue($element, $property_index, $value) {\n // Evaluates to $item =& $this->form[foo][bar][baz];\n $item =& $this->getElementPropertyValue($element, $property_index);\n $item = $value;\n }",
"function __set($strProperty, $strValue)\r\n\t{\r\n\t\t$this->_arrWhere[$strProperty] = $strValue;\r\n\t}",
"public function set( $property, $value = '' ) {\n\n\t\tif ( is_array( $property ) ) {\n\t\t\tforeach ( $property as $key => $value ) {\n\t\t\t\t$this->set( $key, $value );\n\t\t\t}\n\t\t} else {\n\n\t\t\t$key = $property;\n\n\t\t\t$property_name = '_' . $key;\n\n\t\t\tif ( property_exists( $this, $property_name ) ) {\n\t\t\t\t$value = $this->$property_name;\n\t\t\t\t_wpsc_doing_it_wrong( __FUNCTION__, __( 'Using set to change a well-known WPSC_Region property is deprecated as of version 3.8.14. Use the class constructor and specify all properties together to perform and insert or an update.', 'wpsc' ), '3.8.14' );\n\t\t\t\tif ( defined( 'WPSC_LOAD_DEPRECATED' ) && WPSC_LOAD_DEPRECATED ) {\n\t\t\t\t\t$country_array = $this->as_array();\n\t\t\t\t\t$country_array[ $key ] = $value;\n\t\t\t\t\t$this->_save_region_data( $country_array );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twpsc_update_meta( $this->_id, $key, $value, __CLASS__ );\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function setProperties(array $properties) \n\t{\n\t\tforeach ($properties as $name => $value) {\n\t\t\t$this->set($name, $value);\n\t\t}\n\t}",
"function setValues($array){\r\n\t\tforeach($array as $key => $val){\r\n\t\t\t$key = lcfirst(str_replace(\" \",\"\",ucwords(str_replace(\"_\",\" \",$key))));\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t\t}\r\n\t}",
"function setValues($array){\r\n\t\tforeach($array as $key => $val){\r\n\t\t\t$key = lcfirst(str_replace(\" \",\"\",ucwords(str_replace(\"_\",\" \",$key))));\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t\t}\r\n\t}",
"public function dset($property,$value){\n $this->$property = $value;\n $table = $this->table;\n $id = $this->id; \n LAIKA_Database::update($table, $property, $value, \"id = $id\");\n }",
"abstract function setUserProfileProperty($user, $property_name, $property);",
"public function setProperty($property, $value)\n\t{\n\t\tglobal $mysql;\n\t\t$property = real_escape_string($property);\n\t\t$value = real_escape_string($value);\n\t\t\n\t\treturn $mysql->query(\"UPDATE laptops SET `\".$property.\"` = '\".$value.\"' WHERE `id` = \".$this->getID());\n\t}",
"public function setIsMultiValued(?bool $value): void {\n $this->getBackingStore()->set('isMultiValued', $value);\n }",
"public function setInputProperty($key, $value);",
"function wppb_save_multiple_select_value( $field, $user_id, $request_data, $form_location ){\r\n\tif( $field['field'] == 'Select (Multiple)' ){\r\n\t\t$selected_values = wppb_process_multipl_select_value( $field, $request_data );\r\n\t\tupdate_user_meta( $user_id, $field['meta-name'], trim( $selected_values, ',' ) );\r\n\t}\r\n}",
"public function setMixed($mixed);",
"public function setProperty($key, $value, $params = array()) {\n $value = str_replace('\\\\', '\\\\\\\\', $value);\n $value = str_replace('\"', '\\\\\"', $value);\n $value = str_replace(',', '\\\\,', $value);\n $value = str_replace(';', '\\\\;', $value);\n $value = preg_replace(\"/\\r\\n|\\r|\\n/\", '\\\\n', $value);\n\n if ($params) {\n foreach ($params as $pKey => $pValue) {\n $key .= \";{$pKey}={$pValue}\";\n }\n }\n\n $this->_properties[$key] = $value;\n }",
"abstract public function set();",
"public function setFromArray(array $data);",
"function __set($a_sProperty, $a_sValue) \n {\n // convert property name\n $sMethod = 'set'.$this->_propertyNameConverter($a_sProperty);\n if (method_exists($this, $sMethod)) {\n $this->{\"$sMethod\"}(mysql_real_escape_string($a_sValue));\n }\n }",
"public function __set($property, $value) {\n if (isset($this->translation[$property])) {\n $property = $this->translation[$property];\n }\n $this->_magicProperties[$property] = $value;\n }",
"public function setProperty($key, $value);",
"public /*void*/ function __set(/*scalar*/ $key, /*mixed*/ $value){}",
"public function setAllowMult($allowMult) {}",
"public function set($strProperty, $mxdValue) {\n\t\t\t$this->$strProperty = $mxdValue;\n\t\t\tswitch ($strProperty) {\n\t\t\t\tcase 'password_plaintext':\n\t\t\t\t\tif ($mxdValue) {\n\t\t\t\t\t\t$this->set('password', PasswordHelper::encryptPassword($mxdValue));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'rolebits':\n\t\t\t\t\t$this->set('roles', !empty($mxdValue) ? array_sum($mxdValue) : 0);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'birthdate':\n\t\t\t\t\tif (preg_match('/([0-9]{4})-([0-9]{2})-([0-9]{2})/', $mxdValue, $arrMatches)) {\n\t\t\t\t\t\t$this->birthdate_year = $arrMatches[1];\n\t\t\t\t\t\t$this->birthdate_month = $arrMatches[2];\n\t\t\t\t\t\t$this->birthdate_day = $arrMatches[3];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'birthdate_year':\n\t\t\t\tcase 'birthdate_month':\n\t\t\t\tcase 'birthdate_day':\n\t\t\t\t\tif (($intYear = $this->get('birthdate_year')) && ($intMonth = $this->get('birthdate_month')) && ($intDay = $this->get('birthdate_day'))) {\n\t\t\t\t\t\t$this->birthdate = sprintf('%04d-%02d-%02d', $intYear, $intMonth, $intDay);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->birthdate = null;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'avatar':\n\t\t\t\t\t$this->set('thumb', sprintf($mxdValue, 'thumb'));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $this->$strProperty;\n\t\t}",
"public function __set($property, $value)\n {\n switch ($property) {\n\n case 'name':\n if(!empty($value) && is_string($value)) {\n $this->name = $value;\n $this->changed = true;\n break;\n } else {\n echo 'Wrong type of property, it should be string';\n break;\n }\n \n case 'status':\n if(!empty($value) && is_int($value)) {\n $this->status = $value;\n $this->changed = true;\n break;\n } else {\n echo 'Wrong type of property, it should be integer';\n break;\n }\n \n }\n }",
"private function set_properties($properties=array()){\n\n if ((!isset($properties)) || (!is_array($properties))){\n $properties=$this->$properties;\n return $properties;\n }\n else\n {\n $this->$properties=$properties; //set object properties\n }\n\n }",
"public function setProperties($properties)\n {\n\n }",
"function setProperty($property,$value=null){\n\t\t/*\n\t\t * This function is useful to call right after adding the filed:\n\t\t *\n\t\t * $this->addField('line','login')->setProperty('not null');\n\t\t */\n\t\treturn $this->setFieldProperty($this->last_field,$property,$value);\n\t}",
"function __set($name, $value){\n //var_dump($value);\n\n $this->_properties[$name] = $value;\n }",
"public function set_meta( $meta, $single = false ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\n\t\tif ( $single ) {\n\t\t\tupdate_comment_meta( $this->id, key( $meta ), $meta[ key( $meta ) ] );\n\t\t} else {\n\t\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_DATA_KEY, $this->meta );\n\t\t}\n\t}",
"public function __set( $name, $value )\n {\n switch ( $name )\n {\n case 'bulletChar':\n if ( !is_string( $value ) || iconv_strlen( $value, 'UTF-8' ) !== 1 )\n {\n throw new ezcBaseValueException( $name, $value, 'string, length = 1' );\n }\n break;\n case 'numPrefix':\n case 'numSuffix':\n if ( !is_string( $value ) )\n {\n throw new ezcBaseValueException( $name, $value, 'string' );\n }\n break;\n default:\n return parent::__set( $name, $value );\n }\n $this->properties[$name] = $value;\n }",
"protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}",
"public function __set($property, $value) {\r\n $param = '_' . $property;\r\n $this->$param = $value;\r\n }",
"public function __set($property, $value) {\n switch ($property) {\n case 'value':\n $this->data[$property] = $value;\n break;\n case 'labels':\n /* Labels should always be an array */\n if (! is_array($value)) { $value = array($value); }\n $this->data[$property] = $value;\n break;\n default:\n throw new Exception(\"XN_Cache_Entry property $property is not settable\");\n }\n }",
"function is_property_multi_value($entity_type, $name) {\n $controller = entity_toolbox_controller($entity_type);\n $helper = $controller->getPropsHelper();\n\n return $helper->propIsMulti($name);\n}",
"public function __set($param, $value)\n\t{\n\t\tswitch($param)\n\t\t{\n\t\t\tcase 'type':\n\t\t\t\tif(in_array($type, array('data', 'xref') ) )\n\t\t\t\t\t$this->type = $type;\n\t\t\t\tbreak;\n\t\t\tcase 'caption':\n\t\t\tcase 'class':\n\t\t\tcase 'id':\n\t\t\tcase 'xref_x':\n\t\t\t\tif(is_string($value))\n\t\t\t\t\t$this->$param = $value;\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function __set($property, $value) {\n\t\tswitch($property) {\n\t\t\tcase 'question':\n\t\t\t\t$this->question = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'rubric':\n\t\t\t\t$this->rubric = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'answer':\n\t\t\t\t$this->answer = $value;\n\t\t\t\tbreak;\n\n\t\t\tcase 'more':\n\t\t\t\t$this->more = $value;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$trace = debug_backtrace();\n\t\t\t\ttrigger_error(\n\t\t\t\t\t'Undefined property ' . $property .\n\t\t\t\t\t' in ' . $trace[0]['file'] .\n\t\t\t\t\t' on line ' . $trace[0]['line'],\n\t\t\t\t\tE_USER_NOTICE);\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function setSubProperty($path,$value)\n\t{\n\t\t$object=$this;\n\t\tif(($pos=strrpos($path,'.'))===false)\n\t\t\t$property=$path;\n\t\telse\n\t\t{\n\t\t\t$object=$this->getSubProperty(substr($path,0,$pos));\n\t\t\t$property=substr($path,$pos+1);\n\t\t}\n\t\t$object->$property=$value;\n\t}",
"function setType($property, $to, $set=false) {\n global $DB;\n if(@$this->TYPE[$property] != $to) {\n $upd = array('type' => $to, 'set' => $set);\n if($to == 'CSV' && is_array(@$this->DATA[$property])) {\n $this->DATA[$property] = $upd['value'] = join(',',$this->DATA[$property]);\n } elseif(@$this->TYPE[$property] == 'CSV') {\n $this->DATA[$property] = $upd['value'] = explode(',',$this->DATA[$property]);\n }\n $this->TYPE[$property] = $to;\n $DB->config->update($upd, array('section' => $this->NAME, 'property' => $property), true);\n }\n }",
"public function isMultiValuedProperty($propertyName)\n {\n return ($this->properties[$propertyName]['type'] === 'array' || $this->properties[$propertyName]['type'] === 'SplObjectStorage' || $this->properties[$propertyName]['type'] === 'Doctrine\\Common\\Collections\\Collection' || $this->properties[$propertyName]['type'] === 'Doctrine\\Common\\Collections\\ArrayCollection');\n }",
"protected static function setter($node, $property, $value, $subProperty = false)\n {\n\n //if there is a sub-property and there is only one, replace it\n if ($subProperty && isset($node->$property->$subProperty) && count($node->$property->$subProperty) === 1) {\n $node->$property->$subProperty = $value;\n } elseif (property_exists($node, $property)) {\n $node->$property = $value;\n }\n }",
"public function setPropertyRef(array $propertyRef)\n {\n if (!$this->isValidArrayOK(\n $this->propertyRef,\n '\\AlgoWeb\\ODataMetadata\\MetadataV3\\edm\\TPropertyRefType',\n $msg,\n 1\n )\n ) {\n throw new \\InvalidArgumentException($msg);\n }\n $this->propertyRef = $propertyRef;\n return $this;\n }",
"public function __set( $propertyName, $propertyValue )\n {\n switch ( $propertyName )\n {\n \n\t\t\tcase 'badwordId':\n\t\t\t\tif ( !is_int( $propertyValue ) )\n\t\t\t\t{\n\t\t\t\t\tthrow new ezcBaseValueException(\n\t\t\t\t\t\t$propertyName,\n\t\t\t\t\t\t$propertyValue,\n\t\t\t\t\t\t'int'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'substitution':\n\t\t\t\tif ( !is_string( $propertyValue ) )\n\t\t\t\t{\n\t\t\t\t\tthrow new ezcBaseValueException(\n\t\t\t\t\t\t$propertyName,\n\t\t\t\t\t\t$propertyValue,\n\t\t\t\t\t\t'string'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'word':\n\t\t\t\tif ( !is_string( $propertyValue ) )\n\t\t\t\t{\n\t\t\t\t\tthrow new ezcBaseValueException(\n\t\t\t\t\t\t$propertyName,\n\t\t\t\t\t\t$propertyValue,\n\t\t\t\t\t\t'string'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\tbreak;\n\n default:\n throw new ezcBasePropertyNotFoundException(\n\t\t\t\t\t$propertyName,\n\t\t\t\t\t$propertyValue\n\t\t\t\t);\n }\n $this->properties[$propertyName] = $propertyValue;\n }",
"public function __set($param, $value);",
"public function set_the_single_property($key, $value) {\n\n self::$the_single_property[$key] = $value;\n\n }",
"public function setOptions($mixed)\n\t{\n\t\t$args \t= func_get_args();\n\t\t$sign \t= !isset($args[1]) ? 'set' : 'get'; \n\t\t\n\t\t\t$names = Tools::toArray($args[1]);\n\t\t\t\n\t\t\tforeach ( $names as $name => $value ){ $this->setOption($name, $value); }\n\t}",
"function __set($property, $value)\n {\n $this->setValue($value);\n }",
"public function setProperties($properties, $params)\n {\n foreach ($properties as $property) {\n if (array_key_exists($property, $params)) {\n $this->{$property} = $params[$property];\n }\n }\n }",
"public function multiple($multiple = 'multiple') {\r\n\t\t$this->setAttribute('multiple',$multiple);\r\n\t\treturn $this;\r\n\t}",
"public function __set($name, $value) {\n // almacenamos los valores atribuidos\n // el array properties\n $this->properties[$name] = $value;\n }",
"public function __set($property, $value) {\n\t\tswitch($property) {\n\t\t\tcase 'key':\n\t\t\t\t$this->key = $value;\n\t\t\t\tbreak;\n\n case 'after':\n $this->after = strtotime($value);\n break;\n\n case 'cards':\n $this->cards = $value;\n break;\n\n\t\t\tdefault:\n\t\t\t\tparent::__set($property, $value);\n\t\t\t\tbreak;\n\t\t}\n\t}",
"protected static function set_field( $field, $multi = false ) {\n\t\tif ( $field ) {\n\t\t\tif ( $multi ) {\n\t\t\t\treturn 'ecommerce_notification_params[' . $field . '][]';\n\t\t\t} else {\n\t\t\t\treturn 'ecommerce_notification_params[' . $field . ']';\n\t\t\t}\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}"
] | [
"0.6653804",
"0.64490235",
"0.6063194",
"0.5949035",
"0.59296364",
"0.5835365",
"0.58082116",
"0.57395494",
"0.57071227",
"0.56968164",
"0.5676443",
"0.5521121",
"0.55210805",
"0.5473919",
"0.54721874",
"0.54564106",
"0.54215497",
"0.54201746",
"0.54077053",
"0.5405099",
"0.53791255",
"0.5351466",
"0.5347442",
"0.53394043",
"0.5334444",
"0.5270224",
"0.5265632",
"0.526341",
"0.5238078",
"0.5231539",
"0.5225955",
"0.5222828",
"0.5215658",
"0.51983327",
"0.5171947",
"0.51675206",
"0.51536065",
"0.5143957",
"0.51261836",
"0.51251733",
"0.51234114",
"0.51082367",
"0.5095634",
"0.5093475",
"0.5089853",
"0.5085545",
"0.5083714",
"0.50817204",
"0.5079635",
"0.5076826",
"0.5069986",
"0.5069768",
"0.506972",
"0.5068794",
"0.5066713",
"0.5066713",
"0.5059045",
"0.5054773",
"0.50514543",
"0.5045643",
"0.5043088",
"0.50328493",
"0.5023523",
"0.5023316",
"0.50192034",
"0.5011129",
"0.5008273",
"0.5008043",
"0.5007454",
"0.5001987",
"0.49989003",
"0.49907592",
"0.49907055",
"0.49882764",
"0.49710825",
"0.49701184",
"0.4951728",
"0.49420843",
"0.494204",
"0.49298015",
"0.49258876",
"0.49183363",
"0.49178395",
"0.4911227",
"0.49084735",
"0.49073115",
"0.4904032",
"0.49008754",
"0.49000674",
"0.48997837",
"0.4896356",
"0.4889121",
"0.48713183",
"0.4859357",
"0.48525932",
"0.48454544",
"0.4840694",
"0.4834488",
"0.4828852",
"0.48269382"
] | 0.5325679 | 25 |
Returns a multivalued property. This method always returns an array, if there was only a single value, it will still be wrapped in an array. | public function getParts()
{
if (is_null($this->value)) {
return [];
} elseif (is_array($this->value)) {
return $this->value;
} else {
return [$this->value];
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMultiValuedProp($obj,$propName) {\n\t\tif (isset($obj->properties[$propName])) {\n\t\t\treturn CmisRepositoryWrapper::getAsArray($obj->properties[$propName]);\n\t\t}\n\t\treturn array();\n\t}",
"public function getArray($prop) {\n\n\t\t\t// Get property\n\t\t\t$val = $this->get($prop);\n\n\t\t\t// Parse as a string\n\t\t\tif (is_array($val)) {\n\t\t\t\treturn $val;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t}",
"public function getMultiple()\n {\n return $this->multiple;\n }",
"protected function configureValidate($property, &$value)\n {\n if ($property == 'primary' && !\\is_array($value)) {\n $value = [$value];\n }\n return $value;\n }",
"public static function multiple() {\n $params = func_get_args();\n\n // Null if no arguments passed\n if (count($params) == 0) {\n return new qti_variable('multiple', 'identifier');\n } else {\n $result = new qti_variable('multiple', 'identifier', array('value' => array()));\n }\n \n // Allow a single array as well as a parameter list\n if (count($params) == 1 && is_array($params[0])) {\n $params = $params[0];\n }\n \n $allnull = true;\n foreach ($params as $param) {\n if (is_null($param->value)) {\n continue;\n } else {\n $allnull = false;\n $result->type = $param->type;\n if (is_array($param->value)) {\r\n $result->value = array_merge($result->value, $param->value);\n } else {\n $result->value[] = $param->value;\n }\n }\n }\n if ($allnull) {\n $result->value = null;\n }\n \n return $result;\n }",
"public function toArray()\n {\n $return = array();\n foreach ( $this as $property => $value ) {\n if ( '__' == substr( $property, 0, 2 ) || '' === $value || is_null( $value ) || ( is_array( $value ) && empty( $value ) ) ) {\n continue;\n }\n $return[ $property ] = $value;\n }\n\n return $return;\n }",
"function __get($property) {\n if(isset($this->DATA[$property])) {\n if(@$this->TYPE[$property] == 'CSV' && @is_string($this->DATA[$property]))\n $val = explode(',', @$this->DATA[$property]);\n else $val = @$this->DATA[$property];\n\n return $val;\n }\n }",
"function isArrayVal()\n {\n return $this->_arrayVal;\n }",
"protected function value_get(){\n\t\t\n\t\tif ( is_serialized( $this->value ) ) {\n\t\t\t$this->value = unserialize( $this->value );\n\t\t} elseif ( is_string( $this->value ) && 0 === strpos( $this->value, '{' ) && is_object( $_value = json_decode( $this->value ) ) ) {\n\t\t\t$this->value = (array) $_value;\n\t\t}\n\n\t\treturn $this->value;\n\t\t\n\t}",
"public function toArray()\n {\n return (array)$this->properties;\n }",
"public function isMultivalue();",
"public function getProperties(array &$properties);",
"public function getValue()\n {\n if ($this->isArrayField()) {\n return json_decode($this->value);\n }\n return $this->value;\n }",
"public function getAsArray();",
"public function getTSPropertyArray()\n {\n return $this->tsPropertyArray;\n }",
"public function getValue(): array {\n\t\t\treturn $this->value;\n\t\t}",
"public function getProperties() {\n if (is_array($this->_props)) {\n return $this->_props;\n } else {\n return array();\n }\n }",
"public function get(): array;",
"public function get(): array;",
"public function getMultiple() {}",
"public function getArray()\n {\n return $this->get(self::_ARRAY);\n }",
"protected function getValueAsArray()\n {\n if(strpos($this->value, '|') > 1){\n $values = array_filter(explode(\"|\", $this->value));\n } else {\n $values = [$this->value];\n }\n return $values;\n }",
"public function getArray(){\n\t\treturn $this->products;\n\t}",
"public function toArray() {\n $output = array();\n foreach($this->_magicProperties as $key => $value) {\n if (in_array($key,$this->translation)) {\n $output[array_search($key,$this->translation)] = $value;\n }else{\n $output[$key] = $value;\n }\n }\n return $this->_postarray($output);\n }",
"public function asArray(): ?array\n {\n $return = [];\n\n // iterate over all defined properties (class definition)\n foreach (\\get_class_vars(\\get_class($this)) as $key => $unused_val) {\n $key = (string) $key;\n if (null !== $this->{$key} && !isset($return['query'][$key])) {\n $value = $this->{$key};\n\n // for boolean values use numeric representation\n if (\\is_bool($value)) {\n $value = (int) $value;\n }\n\n $return['query'][$key] = $value;\n }\n }\n\n if (empty($return)) {\n return null;\n }\n\n return $return;\n }",
"public function multiple(){\n\t\t$this->lastItem->isArray = true;\n\t\treturn $this;\n\t}",
"public static function get_prop_array( array $mf, $properties, $args = null ) {\n\t\tif ( ! self::is_microformat( $mf ) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$data = array();\n\t\tforeach ( $properties as $p ) {\n\t\t\tif ( array_key_exists( $p, $mf['properties'] ) ) {\n\t\t\t\tforeach ( $mf['properties'][ $p ] as $v ) {\n\t\t\t\t\tif ( self::is_microformat( $v ) ) {\n\t\t\t\t\t\t$v = self::parse_item( $v, $mf, $args );\n\t\t\t\t\t}\n\t\t\t\t\t$data[ $p ] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}",
"public function get() : array;",
"public function getProperties(): array;",
"public function getProperties(): array;",
"public function testGetReturnsValueFromArrayBySinglePath()\n {\n $array = ['a' => 1];\n $actual = $this->property->get($array, 'a');\n $this->assertEquals(1, $actual);\n }",
"public function getAsArray(): array\n {\n return \\GuzzleHttp\\json_decode(\\GuzzleHttp\\json_encode($this->values), true);\n }",
"function is_property_multi_value($entity_type, $name) {\n $controller = entity_toolbox_controller($entity_type);\n $helper = $controller->getPropsHelper();\n\n return $helper->propIsMulti($name);\n}",
"public function getArray () {\n\n return $this->values;\n\n }",
"public function getValues(): ?array {\n $val = $this->getBackingStore()->get('values');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n /** @var array<string>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'values'\");\n }",
"public function toArray() \n\t{\n\t\t$properties = array_merge(parent::toArray(), $this->properties);\n\t\tforeach ($properties as $name => $rawValue) {\n\t\t\t$value = $this->get($name, $rawValue);\n\t\t\t\n\t\t\tif ($value instanceof \\Bliss\\Component || $value instanceof \\Bliss\\Collection) {\n\t\t\t\t$properties[$name] = $value->toArray();\n\t\t\t} else {\n\t\t\t\t$properties[$name] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $properties;\n\t}",
"public function getValues(): array;",
"public function getValues(): array;",
"private function filter_array( $value ) {\n\t\tif ( empty( $this->type ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( Schema_Type::ARRAY !== $this->type->case() ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( empty( $value ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$property = self::from_json( $this->schema, $this->get_id() . '::items', $this->items );\n\t\t$array = array();\n\n\t\tforeach ( $value as $item ) {\n\t\t\t$array[] = $property->filter( $item );\n\t\t}\n\n\t\treturn $array;\n\t}",
"public function getMultivaluedAttributes()\n {\n return $this->multivaluedAttributes;\n }",
"public function populatableProperties() : array;",
"public function toArray(): array\n\t{\n\t\t$array = [];\n\n\t\tforeach ($this->propertyData as $key => $value) {\n\t\t\t$value = $this->$key;\n\n\t\t\tif (is_object($value) === true) {\n\t\t\t\t$value = $value->toArray();\n\t\t\t}\n\n\t\t\t$array[$key] = $value;\n\t\t}\n\n\t\treturn $array;\n\t}",
"public function getArray()\n {\n return $this->array;\n }",
"protected static function getPropertyFromArray(array $dataArray, string $property, array $subProperties = [])\n {\n\n if (isset($dataArray[$property])) {\n\n if (is_array($dataArray[$property])) {\n\n self::getPropertiesFromArray($dataArray[$property], $subProperties);\n\n } else {\n\n if (is_bool($dataArray[$property])) {\n return intval($dataArray[$property]);\n\n } else {\n return $dataArray[$property];\n }\n }\n }\n\n return null;\n }",
"protected function propertyValuesArray($resource, $property, $inverse = false)\n {\n // Is an inverse property being requested?\n if ($inverse) {\n if (isset($this->revIndex[$resource])) {\n $properties = &$this->revIndex[$resource];\n }\n } else {\n if (isset($this->index[$resource])) {\n $properties = &$this->index[$resource];\n }\n }\n\n if (isset($properties[$property])) {\n return $properties[$property];\n } else {\n return null;\n }\n }",
"public function getArray() {\n\t\treturn $this->data; \n\t}",
"public function getArray() {\n\t\treturn $this->data; \n\t}",
"public function toArray()\n {\n $params = array();\n\n //prepare an array of scalar properties\n $this->prepareParams($this->_request, $params);\n\n return $params;\n }",
"function get_array_value($arr, $props = array()) {\n\tif ($arr == null) {\n\t\treturn null;\n\t}\n\n\tforeach($props as $prop) {\n\t\tif (array_key_exists($prop, $arr)) {\n\t\t\t$arr = $arr[$prop];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\treturn $arr;\n}",
"public function getPropertiesList() : array;",
"public function getMultiOptions() {\n\t\treturn $this->_multioption;\n\t}",
"public function getData($propertyPath = null)\n {\n if (!$propertyPath) {\n return $this->getBean()->asDeepArray();\n }\n\n return $this->getBean()->getLocalProperty($propertyPath);\n }",
"public function getValues()\n\t{\n\t\t$params = array();\n\n\t\tforeach($this->values as $value)\n\t\t{\n\t\t\tswitch($value[self::TYPE])\n\t\t\t{\n\t\t\t\tcase self::TYPE_RAW:\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_IN:\n\n\t\t\t\t\t$params+= $value[self::VALUE];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_SCALAR:\n\t\t\t\tdefault:\n\n\t\t\t\t\t$params[] = $value[self::VALUE];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $params;\n\t}",
"public function get(): array\n {\n return Arr::map(\n $this->query->get(),\n fn($item) => call_user_func($this->class . \"::__createInstanceFromArray\", $item)\n );\n }",
"public function getArrayParameters(): array;",
"function get($type){\n\t// PARAM $type : type of data, as above\n\n\t\tif (!is_array($this->$type)) { die(\"Not a valid data type\"); }\n\t\treturn $this->$type;\n\t}",
"public function multiple()\n {\n /** @var self $elt */\n $elt = with(clone $this)->attribute('multiple');\n $name = $elt->getAttribute('name');\n\n return $elt->if($name && ! Str::endsWith($name->value(), '[]'), function (self $elt) use ($name) {\n return $elt->name($name->value().'[]');\n })->applyValueToOptions();\n }",
"function get_value_list()\n\t{\n\t\treturn $this->value;\n\t}",
"public function getFieldValues()\n {\n if($this->isNewRecord){\n return []; //TODO: LOAD DEFAULT FIELDS OF TYPE\n }\n\n //pull meta values from DB\n $table = self::tablePrefix().'cms_post_field';\n $strSql = \"SELECT id, field_id, value \n\t\t\t\t\tFROM {$table}\n\t\t\t\t\tWHERE post_id = :pid\n\t\t\t\t \";\n $cmd = self::getDb()->createCommand($strSql);\n $cmd->bindValue(\":pid\",$this->id,\\PDO::PARAM_STR);\n $arrResults = $cmd->queryAll();\n\n return ArrayHelper::index($arrResults, 'id', 'field_id');\n }",
"public function getInternalValueAttribute()\n {\n $value = $this->data->get($this->localKey);\n if (!$this->is_serialized) {\n return $value;\n }\n \n return (@unserialize($value) ?: []);\n }",
"public function getProperties() : array;",
"public function getData() {\n if ($this->_multiple) {\n return $this->_data;\n }\n return isset($this->_data[0])? $this->_data[0] : [];\n }",
"function get(array $data) {\n\t\t$values = [];\n\t\tforeach ($data as $key) {\n\t\t\t$values[$key] = $this->$key ?? null;\n\t\t}\n\n\t\treturn $values;\n\t}",
"public function getIsArray()\n {\n return $this->_isArray;\n }",
"public function getPropData(): array{\n if(!$this->logged) throw new ClientNotLogged();\n else return $this->proprietary;\n }",
"function getArrayProperty($object, $name) {\r\n\r\n\r\n\t}",
"public function isMultiValuedProperty($propertyName)\n {\n return ($this->properties[$propertyName]['type'] === 'array' || $this->properties[$propertyName]['type'] === 'SplObjectStorage' || $this->properties[$propertyName]['type'] === 'Doctrine\\Common\\Collections\\Collection' || $this->properties[$propertyName]['type'] === 'Doctrine\\Common\\Collections\\ArrayCollection');\n }",
"protected function getPropertyValue() {}",
"public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}",
"public function as_array(){\n return isset($this->data[$this->alias])? $this->data[$this->alias] : $this->data;\n }",
"public function __get($property) {\t\tif (array_key_exists($property, $this->data)) \n\t\t\treturn $this->data[$property]['value'];\n\t\t// is it related?\n\t\tif (array_key_exists($property, $this->relatedObjects))\n\t\t\treturn $this->relatedObjects[$property];\n\n\t\tthrow new InvalidArgumentException(\"Unknown property: $property\");\n\t}",
"public function getValue()\n {\n $value = $this->value;\n $attribute = $this->getAttribute();\n if ($attribute->getFieldTypeChoiceType()) {\n if ($value) {\n $value = json_decode($value);\n } else {\n $value = [];\n }\n }\n\n return $value;\n }",
"public function get()\n {\n return $this->arr;\n }",
"public function values() : array;",
"private function getProperty() {\n\t\t$return = NULL;\n\t\tif (session('reviewcycle') && session('property')) {\n\t\t\t$sql = 'SELECT `#__Property`.* FROM `#__Property` WHERE `#__Property`.`id` = ?';\n\t\t\t$result = $this->execute($sql, session('property'));\n\t\t} else {\n\t\t\t$sql = 'SELECT `#__Property`.* FROM `#__Property` LEFT JOIN `#__Property_User` ON `#__Property_User`.`property_id` = `#__Property`.`id` WHERE `#__Property_User`.`user_id` = ?';\n\t\t\t$result = $this->execute($sql, $this->id);\n\t\t}\n\n\t\tif (count($result) > 0) {\n\t\t\t$return[$result[0]['id']] = $result[0];\n\t\t}\n\t\treturn $return;\n\t}",
"public function toArray ( )\n {\n return (array) $this->_values;\n }",
"public function getArray(): array\n {\n return $this->array;\n }",
"public function getArray(): array\n {\n return $this->array;\n }",
"function GetMultifield($value)\r\n\t{\r\n\t\t$ValsArr = explode(\"|::|\", $value);\r\n\t\t$RetArr = array();\r\n\t\tforeach($ValsArr as $field)\r\n\t\t{\r\n\t\t\tif($field!=\"\")\r\n\t\t\t{\r\n\t\t\t\t$DataField = explode(\"|++|\", $field);\r\n\t\t\t\t$FTitle = $DataField[0]; // field title\r\n\t\t\t\t$FTtype = $DataField[1]; // field type\r\n\t\t\t\t$FValue = $DataField[2]; // field value\r\n\t\t\t\t$FinalVal = $this->GetTrueValue($FValue, $FTtype);\r\n\t\t\t\t$RetArr[''.$FTitle.''] = $FinalVal;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $RetArr;\r\n\t}",
"public function asArray()\r\n {\r\n return $this->data;\r\n }",
"public function toArray()\n\t{\n\t\treturn $this->values;\n\t}",
"public function toArray()\n\t{\n\t\treturn $this->values;\n\t}",
"public function getValue()\n\t{\n\t\t$data = array();\n\t\tforeach($this->_collection as $subform)\n\t\t{\n\t\t\tforeach($subform->_collection as $name => $item)\n\t\t\t{\n\t\t\t\t$data[$name] = $item->getValue();\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}",
"public function getValues(): ?array {\n $val = $this->getBackingStore()->get('values');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, SettingValue::class);\n /** @var array<SettingValue>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'values'\");\n }",
"public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}",
"public function getProperties(): array\n {\n return $this->getParam('properties');\n }",
"private function createParamArray()\n {\n $data = [];\n /** @var Property $property */\n foreach($this->properties as $name => $property)\n {\n if ($property->initialized() && !$property->isReadOnly())\n {\n $data[$property->name()] = $property->preparedForDb();\n }\n }\n return $data;\n }",
"public function getAsArray(): array {\n\t\t$result = [];\n\t\tforeach ( self::FIELD_MAPPING as $field => $_ ) {\n\t\t\t$result[$field] = $this->$field;\n\t\t}\n\t\treturn $result;\n\t}",
"public function getParams():mixed\n { \n return count($this->params) == 1 ? $this->params[0] : $this->params;\n }",
"public function getProductPropertyOptions($inPropertyOptions) {\n \n $productPropertyOptions = [];\n \n if (!$inPropertyOptions) { return $productPropertyOptions; }\n if (is_array($inPropertyOptions) == false) { return $productPropertyOptions; }\n \n foreach ($inPropertyOptions as $property_id => $option_title) {\n $property = \\Olabs\\Oims\\Models\\Property::find($property_id);\n // only select box + select multi\n if (($property->type != 1) && ($property->type != 2)) { continue; }\n \n // prepair options (select have one, multi select have many)\n $options = [];\n if (is_array($option_title)) {\n foreach ($option_title as $option_title_item) {\n $options[] = \\Olabs\\Oims\\Models\\PropertyOption::where(\"property_id\", $property_id)->where(\"title\",$option_title_item)->first(); \n }\n }\n else {\n $options[] = \\Olabs\\Oims\\Models\\PropertyOption::where(\"property_id\", $property_id)->where(\"title\",$option_title)->first();\n }\n \n // get option / options\n foreach ($options as $option) {\n\n // get product option with pivot data\n $productOption = $this->propertyOptions()->find($option->id);\n if ($productOption) {\n $productPropertyOptions[] = $productOption;\n }\n }\n }\n \n \n return $productPropertyOptions;\n }",
"public function toArrayWithMappedValue()\n {\n $array = $this->toArray(false);\n \n $array['value'] = $this->_getI18n('value');\n \n return $array;\n }",
"public function toArray()\n {\n // build the list of properties to retrieve\n $properties = array_keys(static::$properties);\n\n // remove any hidden properties\n $hide = (property_exists($this, 'hidden')) ? static::$hidden : [];\n $properties = array_diff($properties, $hide);\n\n // add any appended properties\n $append = (property_exists($this, 'appended')) ? static::$appended : [];\n $properties = array_merge($properties, $append);\n\n // get the values for the properties\n $result = $this->get($properties);\n\n foreach ($result as $k => &$value) {\n // convert any models to arrays\n if ($value instanceof self) {\n $value = $value->toArray();\n }\n }\n\n // DEPRECATED\n // apply the transformation hook\n if (method_exists($this, 'toArrayHook')) {\n $this->toArrayHook($result, [], [], []);\n }\n\n return $result;\n }",
"public function asArray() : array\n {\n return $this->a;\n }",
"public function getValue()\r\n\t{\r\n\t\treturn $this->getValues(true);\r\n\t}",
"public function getValues()\n {\n return $this->getVal('value', []);\n }",
"public function get_values(){ return $this->values; }",
"public function toJsonArray() {\n $array = $this->_properties;\n foreach ($array as $key => $value) {\n if (in_array($key, $this->fields) && !is_null($value)) {\n $parser = $this->getParser($key);\n $array[$key] = $parser->unparse($value);\n }\n else unset($array[$key]);\n }\n return $array;\n }",
"public function asArray(){\n return $this->data;\n }",
"public function getAdditionalProperties()\n {\n if ($this->decoded_additional_properties === false) {\n $raw = trim($this->getRawAdditionalProperties());\n $this->decoded_additional_properties = empty($raw) ? [] : json_decode($raw, true);\n\n if (!is_array($this->decoded_additional_properties)) {\n $this->decoded_additional_properties = [];\n }\n }\n\n return $this->decoded_additional_properties;\n }",
"public function scalarArray()\n {\n if($this->result_array) {\n $arr = array();\n $keys = array_keys($this->result_array[0]);\n foreach($this->result_array as $v) {\n $arr[] = $v[$keys[0]];\n }\n return $arr;\n }\n return [];\n }"
] | [
"0.66065663",
"0.65915537",
"0.615041",
"0.6074771",
"0.60474443",
"0.6039081",
"0.5952988",
"0.5952752",
"0.59083545",
"0.58923835",
"0.58785385",
"0.5867496",
"0.58608335",
"0.58434033",
"0.57784754",
"0.5752701",
"0.57506514",
"0.573795",
"0.573795",
"0.5685176",
"0.5679419",
"0.56477636",
"0.5646606",
"0.563428",
"0.5615019",
"0.5612455",
"0.56102204",
"0.5609549",
"0.55560523",
"0.55560523",
"0.55533946",
"0.5550943",
"0.55418676",
"0.552656",
"0.55257165",
"0.5519982",
"0.5511961",
"0.5511961",
"0.5507062",
"0.550653",
"0.5504666",
"0.5489179",
"0.5473301",
"0.5451524",
"0.54446363",
"0.54296386",
"0.54296386",
"0.5414624",
"0.5406619",
"0.53990144",
"0.53837466",
"0.5375491",
"0.5359558",
"0.53532004",
"0.534812",
"0.5346434",
"0.53309304",
"0.5328831",
"0.53194404",
"0.531199",
"0.5311933",
"0.530748",
"0.5302932",
"0.5302226",
"0.53013164",
"0.528654",
"0.52861524",
"0.5283694",
"0.5277962",
"0.5268626",
"0.52587676",
"0.52519345",
"0.52476907",
"0.5234019",
"0.52310103",
"0.5230347",
"0.5229862",
"0.5229862",
"0.5224795",
"0.522206",
"0.52172476",
"0.52172476",
"0.5214955",
"0.520755",
"0.5206183",
"0.5200987",
"0.5197332",
"0.51955587",
"0.5188514",
"0.5181746",
"0.5178746",
"0.5177768",
"0.5174786",
"0.5171952",
"0.5170099",
"0.51674473",
"0.51559985",
"0.51493996",
"0.5144556",
"0.51402503"
] | 0.65192133 | 2 |
Adds a new parameter. If a parameter with same name already existed, the values will be combined. If nameless parameter is added, we try to guess its name. | public function add($name, $value = null)
{
$noName = false;
if (null === $name) {
$name = Parameter::guessParameterNameByValue($value);
$noName = true;
}
if (isset($this->parameters[strtoupper($name)])) {
$this->parameters[strtoupper($name)]->addValue($value);
} else {
$param = new Parameter($this->root, $name, $value);
$param->noName = $noName;
$this->parameters[$param->name] = $param;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addParameter(string $name, $value): self;",
"function addParam($name, $value) {\n if (!isset($this->params[$name])) {\n $this->setParam($name, $value);\n }\n else {\n $oldParam = $this->getParam($name);\n if (!is_array($oldParam)) {\n $oldParam = array($oldParam);\n }\n array_push($oldParam, $value);\n $this->setParam($name, $oldParam);\n }\n }",
"public function addParam($name,$value)\n\t\t{\n\t\t\t$this->param[$name] = $value;\n\t\t}",
"public function addParameterByName(string $name, mixed $value): ParametersInterface;",
"function addExtraParameter($name) {\n\t\t$this->addParameter($name, Request::getParameter($name));\n\t}",
"public function addParam($name, $value){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}",
"public function addParameter(string $name, $value) : Method\n {\n if ($this->parameters->has($name)) {\n throw new InvalidArgumentException(\"The parameter {$name} has been added previously.\");\n }\n\n $this->parameters->add($name, $value);\n\n return $this;\n }",
"function addParameter($name, $value) {\n\t\t$this->link->addParameter($name, $value);\n\t}",
"public function addParam($name, $value)\n {\n $this->params[$name] = $value;\n return $this;\n }",
"public function addParam($param, $value){\n\t\t\tif(is_string($param)){\n\t\t\t\t$this->parameters[$param] = $value;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}",
"protected function add_parameter($name, $details)\n\t{\n\t\t$this->P->add_parameter($name, $details);\n\t}",
"public function addParameter(mixed $value): ParametersInterface;",
"public function AddParam(Param $param){\r\n\t\t$this->params[] = $param;\r\n\t}",
"public function addParam (string $key, $value)\n {\n if (!$this->paramExists($key))\n $this->params[$key] = $value;\n\n $this->save();\n\n return $this;\n }",
"public final function addParameter($arg1, $arg2=null)\n {\n $this->setParameter($arg1, $arg2, false);\n }",
"public function addParameter(string $parameterName, $parameterValue): void\n {\n $this->parameters[$parameterName] = $parameterValue;\n }",
"public function addParam($key, $value)\n {\n $this->_params[$key] = $value;\n }",
"public function addQueryParameter($name, ProviderInterface $queryParameter)\n {\n $this->queryParameters[$name] = $queryParameter;\n }",
"function addPrivateParam($name, $value) {\n\t\t$this->privateParams[$name] = $value;\n\t}",
"function addParam($par)\n\t{\n\t\tif(is_object($par) && is_a($par, 'jmap_xmlrpcval'))\n\t\t{\n\t\t\t$this->params[]=$par;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function addTransactionParam($name, $value)\n {\n newrelic_add_custom_parameter($name, $value);\n }",
"public function add(string $name, ?string $description = null): self\n {\n $this->parameters[] = new Parameter($name, $description);\n\n return $this;\n }",
"public function addRouteParameter($name, ProviderInterface $routeParameter)\n {\n $this->routeParameters[$name] = $routeParameter;\n }",
"public function add($request_param, $name) \n {\n $this->filters[$request_param] = $name;\n }",
"public function addCustomEventParam(string $name, string $value): ParamsInterface;",
"protected function addParam($key, $value, $method = self::SET_VALUE)\n {\n switch ($method) {\n case self::SET_VALUE:\n $this->params[$key] = $value;\n break;\n case self::ADD_VALUE:\n if (isset($this->params[$key])) {\n $this->params[$key] = array_merge_recursive($this->params[$key], $value);\n } else {\n $this->params[$key] = $value;\n }\n break;\n default:\n throw new InvalidArgumentException('Unknown method type.');\n }\n }",
"function add_param($link, $param_name, $value) {\n\t$newlink = \"\";\n\t//verifica se ja existe ?\n\tif(stripos($link,\"?\")) {\n\t\t$newlink = $link.\"&\".$param_name.\"=\".$value;\n\t} else {\n\t\t$newlink = $link.\"?\".$param_name.\"=\".$value;\n\t}\n\treturn $newlink;\n}",
"public function addPostFieldParameter($name, ProviderInterface $postFieldParameter)\n {\n $this->postFieldsParameters[$name] = $postFieldParameter;\n }",
"public function addPostParameter($name, $value)\n {\n if (!$this->hasGetPostParamValue($name, true))\n {\n $this->postParams[$name] = $value;\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function addParam ($key, $value) {\n\t\t$this->params->setParam($key, $value);\n\t\treturn $this;\n\t}",
"protected function add_parameters($params = array())\n\t{\n\t\tforeach ($params as $param)\n\t\t{\n\t\t\t$this->add_parameter($param['name'], $param);\n\t\t}\n\t}",
"public function add_parameter( $param_id, $type, $heading = NULL, $note = NULL )\n {\n $util_class_name = lib::get_class_name( 'util' );\n\n // add timezone info to the note if the parameter is a time or datetime\n if( 'time' == $type || 'datetime' == $type )\n {\n // build time time zone help text\n $date_obj = $util_class_name::get_datetime_object();\n $time_note = sprintf( 'Time is in %s\\'s time zone (%s)',\n lib::create( 'business\\session' )->get_site()->name,\n $date_obj->format( 'T' ) );\n $note = is_null( $note ) ? $time_note : $time_note.'<br>'.$note;\n }\n\n $this->parameters[$param_id] = array( 'type' => $type );\n if( !is_null( $heading ) ) $this->parameters[$param_id]['heading'] = $heading;\n if( !is_null( $note ) ) $this->parameters[$param_id]['note'] = $note;\n }",
"public function addParam($param, $raw = true)\n {\n if ($param instanceof PMA_Message) {\n $this->_params[] = $param;\n } elseif ($raw) {\n $this->_params[] = htmlspecialchars($param);\n } else {\n $this->_params[] = PMA_Message::notice($param);\n }\n }",
"public function addParam($name, $value){\n $obj = $this->root->appendChild(new FianetXMLElement('obj'));\n $obj->appendChild(new FianetXMLElement('name', $name));\n $obj->appendChild(new FianetXMLElement('value', $value));\n return $obj;\n }",
"public function addQueryParameter($name, $value)\n {\n if ($this->method === Utils::$METHOD_GET)\n {\n if (!$this->hasGetPostParamValue($name, true))\n {\n $this->addGetParameter($name, $value);\n return true;\n }\n else\n {\n return false;\n }\n }\n else if ($this->method === Utils::$METHOD_POST)\n {\n if (!$this->hasGetPostParamValue($name, true))\n {\n $this->addPostParameter($name, $value);\n return true;\n }\n else\n {\n return false;\n }\n }\n }",
"public function addParam($value, $type = null)\n {\n $this->_params[] = $value;\n if (null === $type) {\n // Detect type if not provided explicitly\n if ($value instanceof Zend_XmlRpc_Value) {\n $type = $value->getType();\n } else {\n $xmlRpcValue = Zend_XmlRpc_Value::getXmlRpcValue($value);\n $type = $xmlRpcValue->getType();\n }\n }\n $this->_types[] = $type;\n $this->_xmlRpcParams[] = ['value' => $value, 'type' => $type];\n }",
"public function addGetParameter($name, $value)\n {\n if (!$this->hasGetPostParamValue($name, true))\n {\n $this->getParams[$name] = $value;\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function addParameter($name, $description, $required = true)\n {\n $name = \"{$name}\";\n if (($required) && (!in_array($name, $this->_requiredParameterNames))) {\n $this->_requiredParameterNames[] = $name;\n }\n $this->_allParameters[$name] = $description;\n return $this;\n }",
"public function addParameter(string $id, $parameter): void\n {\n $this->addDefinition($id, $parameter, [], self::DEFINITION_PARAMETER);\n }",
"public function add($name);",
"public function addParam($key, $value)\n {\n if ($value !== null) {\n $this->params[$key] = (string) $value;\n }\n\n return $this;\n }",
"public function addParam($name, $value){\r\n $obj = $this->root->appendChild(new KwixoXMLElement('obj'));\r\n $obj->appendChild(new KwixoXMLElement('name', $name));\r\n $obj->appendChild(new KwixoXMLElement('value', $value));\r\n return $obj;\r\n }",
"public function AddParameter($value)\n {\n throw new \\ErrorException('Parameters not suppered for groups. It is only for single directives.');\n }",
"public function addFilterParams($name)\n {\n if ($this->getRequestParameter($name))\n {\n foreach ($this->params as &$params)\n {\n $params[$name] = $this->getRequestParameter($name);\n }\n }\n \n // set an array for building a link to this filter (we don't want it to already have the filter in there)\n $this->params[$name] = $this->params['pagination'];\n unset($this->params[$name][$name]);\n }",
"public function add(ParamConverterInterface $converter, ?int $priority, ?string $name): void;",
"protected function addParameterToResult($result, $param)\n {\n // Commandline arguments must be strings, so ignore any\n // parameter that is typehinted to any non-primitive class.\n if ($param->getType() && (!$param->getType() instanceof \\ReflectionNamedType || !$param->getType()->isBuiltin())) {\n return;\n }\n $result->add($param->name);\n if ($param->isDefaultValueAvailable()) {\n $defaultValue = $param->getDefaultValue();\n if (!$this->isAssoc($defaultValue)) {\n $result->setDefaultValue($param->name, $defaultValue);\n }\n } elseif ($param->getType() && $param->getType()->getName() === 'array') {\n $result->setDefaultValue($param->name, []);\n }\n }",
"public function add(array $parameters);",
"function set_parameter($name, $value)\r\n {\r\n //dump(get_class($this) . ' | ' . $name);\r\n $this->parameters[$name] = $value;\r\n }",
"public function registerParamInfo(\n $name, \n $occurrence= self::OCCURRENCE_UNDEFINED,\n $default= NULL,\n $caster= NULL, \n $precheck= NULL, \n $postcheck= NULL,\n $type= 'core:string',\n $values= array()\n ) {\n $this->paraminfo[$name]= array(\n self::PARAM_OCCURRENCE => $occurrence,\n self::PARAM_DEFAULT => $default,\n self::PARAM_PRECHECK => $this->checkerInstanceFor($precheck),\n self::PARAM_CASTER => $this->checkerInstanceFor($caster),\n self::PARAM_POSTCHECK => $this->checkerInstanceFor($postcheck),\n self::PARAM_TYPE => $type,\n self::PARAM_VALUES => $values\n );\n }",
"private function createParameter($name, $value)\n {\n $origValue = $value;\n\n $encoded = false;\n // Allow room for parameter name, indices, \"=\" and DQUOTEs\n $maxValueLength = $this->getMaxLineLength() - \\strlen($name.'=*N\"\";') - 1;\n $firstLineOffset = 0;\n\n // If it's not already a valid parameter value...\n if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) {\n // TODO: text, or something else??\n // ... and it's not ascii\n if (!preg_match('/^[\\x00-\\x08\\x0B\\x0C\\x0E-\\x7F]*$/D', $value)) {\n $encoded = true;\n // Allow space for the indices, charset and language\n $maxValueLength = $this->getMaxLineLength() - \\strlen($name.'*N*=\"\";') - 1;\n $firstLineOffset = \\strlen(\n $this->getCharset().\"'\".$this->getLanguage().\"'\"\n );\n }\n }\n\n // Encode if we need to\n if ($encoded || \\strlen($value) > $maxValueLength) {\n if (isset($this->paramEncoder)) {\n $value = $this->paramEncoder->encodeString(\n $origValue, $firstLineOffset, $maxValueLength, $this->getCharset()\n );\n } else {\n // We have to go against RFC 2183/2231 in some areas for interoperability\n $value = $this->getTokenAsEncodedWord($origValue);\n $encoded = false;\n }\n }\n\n $valueLines = isset($this->paramEncoder) ? explode(\"\\r\\n\", $value) : [$value];\n\n // Need to add indices\n if (\\count($valueLines) > 1) {\n $paramLines = [];\n foreach ($valueLines as $i => $line) {\n $paramLines[] = $name.'*'.$i.\n $this->getEndOfParameterValue($line, true, 0 == $i);\n }\n\n return implode(\";\\r\\n \", $paramLines);\n } else {\n return $name.$this->getEndOfParameterValue(\n $valueLines[0], $encoded, true\n );\n }\n }",
"public function addParameter( string $key, $value = null, ?string $sQuote = null ): self {\n\t\t$this->addParameterArray( [ $key => $value ], $key, $sQuote );\n\n\t\treturn $this;\n\t}",
"public function add($name, $value){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}",
"public function addParams($parameters){\n\t\t\tif(is_array($parameters)){\n\t\t\t\tforeach ($parameters as $key=>$value) {\n\t\t\t\t\t$this->addParam($key, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this;\n\t\t}",
"public function parameter(string $paramName, $paramValue);",
"protected function addParameter($value)\n {\n static $count = 1;\n \n static $id;\n \n if(null === $id)\n {\n $id = md5_file(__FILE__);\n }\n\n $service_id = $id . '_' . $count;\n \n $this->container->setParameter($service_id, $value);\n \n $count ++;\n \n return $service_id;\n }",
"public function setParam($name, $value) {\n $this->parameter[$name] = $value;\n }",
"function setParam($name, $value) {\n $this->params[$name] = $value;\n }",
"public function addParam($value, $type = null) {\n\t\tif (is_null($type)) {\n\t\t\t$type = $this->_typecast($value);\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$t = $this->_typecast($v);\n\t\t\t\t$value[$k] = array('value' => $v, 'type' => $t);\n\t\t\t}\n\t\t}\n\t\t$this->_data[] = array('type' => $type, 'value' => $value);\n\t}",
"public function addIndividualParam($key, $value, $method)\n {\n $this->addParam($key, $value, $method);\n return $this;\n }",
"private function addParameterInSql($sql, $paramName, $paramValue) {\n//\n// if (array_key_exists($parameter->name, $this->parameters)) {\n// $value = $this->parameters[$parameter->name];\n// } else {\n// $value = trim(str_replace($toReplace, \"\", $parameter->defaultValueExpression->content));\n// }\n\n $sql = str_replace(\"\\$P{\" . $paramName . \"}\", $paramValue, $sql);\n\n return $sql;\n }",
"public function setParameter($name, $value);",
"public function addServiceExtensionParameter($keyword, $value = null)\n\t{\n\t\t$this->_extparams[$keyword] = $value;\n\t}",
"function setParamaters($valuetoadd=null) {\n if (empty($valuetoadd)) {\n $this->preparedvalues = array();\n return null;\n } else \n return array_push($this->preparedvalues, $valuetoadd); \n\t}",
"public function setParameter($name, $value) {\n $this->parameters[$name]= $value;\n }",
"public function addParameter(Parameter $parameter)\n {\n if (array_key_exists($parameter->getName(), $this->definitions)) {\n throw new \\Exception(sprintf('Parameter with name \\'%s\\' already exists!', $parameter->getName()));\n }\n\n $this->definitions[$parameter->getName()] = $parameter;\n\n if ($parameter->getIsRequired()) {\n $this->required[] = $parameter->getName();\n }\n\n return $this;\n }",
"function param(string $name, string $value, string $type = 'ref', string $attributes = ''): string\n {\n return '<param name=\"' . $name\n . '\" type=\"' . $type\n . '\" value=\"' . $value\n . '\" ' . $attributes . _solidus() . '>';\n }",
"public function setParam($name, $value);",
"public function addParameter($name, $value)\n {\n $name = strtolower($name);\n $value = (string) $value;\n\n if (!HeaderValue::isValid($name)) {\n throw new InvalidArgumentException('Invalid content-disposition parameter name detected');\n }\n if (!HeaderValue::isValid($value)) {\n throw new InvalidArgumentException('Invalid content-disposition parameter value detected');\n }\n\n $this->parameters[$name] = $value;\n\n return $this;\n }",
"public function getParam($name);",
"public function addParameters(array $parameters): ParametersInterface;",
"public function setParam($name, $value = null) {\n\t\tif (is_array($name))\n\t\t{\n\t\t\t$this->params = $this->params + (array)$name;\n\n\t\t\t/*foreach ($name as $key => $value) {\n\t\t\t\tif (null === $value) {\n\t\t\t\t\tunset($this->_params[$key]);\n\t\t\t\t}\n\t\t\t}*/\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$name = (string)$name;\n\n\t\t\t/*if ((null === $value) && isset($this->_params[$name])) {\n\t\t\t\tunset($this->_params[$name]);\n\t\t\t} elseif (null !== $value) {\n\t\t\t\t$this->_params[$name] = $value;\n\t\t\t}*/\n\t\t\t$this->params[$name] = $value;\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function addParams(): Params\n {\n $params = new Params();\n $this->batch[] = $params;\n\n return $params;\n }",
"public function setParam($name, $value){\n\t\t$this->params[(string)$name] = $value;\n\t}",
"protected function setParameter($name, $value)\n {\n $this->parameters[$name] = $value;\n }",
"public function param(string $name, $value): self\n {\n $this->params[$name] = $value;\n\n return $this;\n }",
"public function addActionParameter(string $actionName, string $newParam, string $domainClassCode): string;",
"public static function parameter(string $key, $value): void\n {\n if (!static::hasNewRelic()) {\n return;\n }\n\n if (!is_scalar($value)) {\n $value = json_encode($value);\n }\n\n newrelic_add_custom_parameter($key, $value);\n }",
"public function setParameter($name, $value) {\n $this->parameters[$name] = $value;\n }",
"public function add($parameter, $value) {\n $parameter = trim(strtoupper($parameter));\n\n $paramIsOk = !empty($parameter);\n $valueIsOk = is_string($value) ? strlen(trim($value)) > 0 : !is_null($value);\n\n if ($paramIsOk && $valueIsOk) {\n $this->message[$parameter] = $value;\n }\n\n return $this;\n }",
"public function setParam(string $name, $value): void\n {\n $this->params[$name] = $value;\n }",
"public function set_parameter($name, $value)\n {\n $this->_parameters[ $name ] = $value;\n }",
"public function getParamDirect($name = \"\");",
"public function hasParameter($name);",
"public function hasParameter($name);",
"public function addParameter($key, $mandatory = false, $list = '', $default = '', $description = '')\n\t{\n\t\tif(!isset($key) || $key == '') {\n\t\t\ttrigger_error('Please specify a parameter name', E_USER_ERROR);\n\t\t\treturn FALSE;\n\t\t}\n\t\tif($mandatory != true && $mandatory != false) {\n\t\t\ttrigger_error('mandatory setting must either be true or false', E_USER_ERROR);\n\t\t\treturn FALSE;\n\t\t}\n\t\t$this->parameters[$key] = array('mandatory' => $mandatory, 'list' => $list, 'default' => $default, 'description' => $description);\n\t\treturn TRUE;\n\t}",
"function addURLParam() //strRule, strValue[,strRule, strValue...]\n{\n\t/*\n\taddURLParam([string $URL,] string $paramName1, string $paramValue1 [, string $paramName2, string $paramValue2 [, ...]]):\n\t\tThis function accepts a variable number of arguments. You must specify at least one pair of paramName and paramValue\n\t\targuments. You do not need to specify a URL parameter if you are affecting the current page's URL (obtained using\n\t\t$_SERVER['PHP_SELF']). However, if you do want to pass in a URL to use instead it must be the first parameter.\n\t\t\n\t\tURL: Optional String. String containing the URL to add, update, remove parameters from. If not specified then the current pages\n\t\t\tURL is assumed (obtained using $_SERVER['PHP_SELF'])\n\n\t\tparamName: Required String. A string containing the name of the parameter that you wish to affect in the querystring of the given URL.\n\t\t\tMust be coupled with a paramValue.\n\t\t\n\t\tparamValue: Required Mixed. The value that you want to set the parameter to in the querystring. If the paramName parameter already \n\t\t\texists in the given querystring then the current value will be replaced by paramValue. paramValue will be interpreted in the following\n\t\t\tway:\n\t\t\t\tIf paramValue is of type: It will return:\n\t\t\t\tArray A URL-encoded serialized representation\n\t\t\t\tNULL Nothing. The paramName parameter will be removed from the querystring (NULL was introduced in PHP Version 4)\n\t\t\t\tBoolean TRUE or FALSE The value TRUE or FALSE, respectively\n\t\t\t\tObject A byte-stream (serialized) representation (In PHP 3, serialized objects will lose their class association)\n\t\t\t\tString, Integer, Float, Etc. The URL-encoded value\n\t\t\t\t\n\t\tAs many paramName/paramValue pairs can be passed as requred, but you must always pass them as a name/value pair. An odd number of arguments will\n\t\tcause the first parameter to be interpreted as the URL and the rest to be interpreted as paramName/paramValue pairs. An even number of arguments \n\t\twill be interpreted as only paramName/paramValue pairs and will assume the current URL.\n\t*/\n\t\n\t//Set this to true to enable debugging messages\n\t$blnTesting = false;\n\t\n\t$args = func_get_args();\n\tif ($blnTesting) echo ('<br>' . (sizeof($args)) . ' arguments');\n\n\t//Get URL and QueryString values\t\n\t$URL = (((sizeof($args) % 2) == 1) \n\t\t? /* an odd number of args - get URL from first */ array_shift($args) \n\t\t: $_SERVER['PHP_SELF'] . \"?\" . ((sizeof($_GET)) ? rawurldecode(http_build_query($_GET)) : \"\"));\n\t$QS = \"\";\n\tif (strpos($URL, \"?\") !== FALSE) {\n\t\tlist($URL, $QS) = explode(\"?\", $URL, 2);\n\t}\n\tif ($blnTesting) echo ('<br>URL = ' . $URL);\n\tif ($blnTesting) echo ('<br>QS = ' . $QS);\n\n\t//Discover the servers preferred parameter delimiters. If empty, assume \"&\"\n\t$Delims = ((ini_get(\"arg_separator.input\") == \"\") ? \"&\" : ini_get(\"arg_separator.input\"));\n\tif ($blnTesting) echo ('<br>Delims = ' . $Delims);\n\tif (strlen($Delims) > 1) {\n\t\t$Delims = preg_split('//', $Delims, -1, PREG_SPLIT_NO_EMPTY);\n\t} else {\n\t\t$Delims = array($Delims);\n\t}\n\t$DelimsPregQuoted = array();\n\tforeach ($Delims as $Delim) {\n\t\t$DelimsPregQuoted[] = preg_quote($Delim);\n\t}\n\tif ($blnTesting) echo ('<br>DelimsPregQuoted = <pre>' . print_r($DelimsPregQuoted, TRUE) . '</pre>');\n\t\n\t//Explode QS into name=value pairs\n\tif (strlen($QS) > 0) {\n\t\t$QS = preg_split('/'.implode(\"|\", $DelimsPregQuoted).'/', $QS, -1);\n\t\t\n\t\t//Now explode QS into name/value arrays (split on \"=\")\n\t\t$QSTemp = array();\n\t\tforeach ($QS as $index => $QSParamPair) {\n\t\t\t@list($QSParamName, $QSParamValue) = explode(\"=\", $QSParamPair, 2);\n\t\t\t$QSTemp[$QSParamName] = $QSParamValue;\n\t\t}\n\t\t$QS = $QSTemp;\n\t} else {\n\t\t$QS = array();\n\t}\n\tif ($blnTesting) echo ('<br>QS = <pre>' . print_r($QS, TRUE) . '</pre>');\n\t\n\t//Loop through the paramName/paramValue argument pairs\n\tfor ($i=0; $i<sizeof($args); $i+=2) {\n\t\t$paramName = $args[$i];\n\t\tswitch (gettype($args[$i+1])) {\n\t\t\tcase \"array\":\n\t\t\tcase \"object\":\n\t\t\t\t$paramValue = serialize($args[$i+1]);\n\t\t\t\tbreak;\n\t\t\tcase \"boolean\":\n\t\t\t\t$paramValue = (($args[$i+1]) ? \"TRUE\" : \"FALSE\");\n\t\t\t\tbreak;\n\t\t\tcase \"NULL\":\n\t\t\t\t$paramValue = NULL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$paramValue = (string) $args[$i+1];\n\t\t\t\tbreak;\n\t\t} //END: switch gettype($args[$i+1])\n\t\tif ($blnTesting) echo ('<br>paramValue #' . $i . ' type = ' . gettype($args[$i+1]));\n\t\tif ($blnTesting) echo ('<br>paramName/paramValue pair #' . $i . ' = ' . $paramName . '/' . $paramValue);\n\t\t\n\t\tif ($paramValue == NULL) {\n\t\t\tif (array_key_exists($paramName, $QS)) {\n\t\t\t\tif ($blnTesting) echo ('<br>NULL value specified - key is present - remove old key rule');\n\t\t\t\tunset($QS[$paramName]);\n\t\t\t} else {\n\t\t\t\tif ($blnTesting) echo ('<br>NULL value specified - key is not present - do nothing');\n\t\t\t} //END: if (array_key_exists($paramName, $QS))\n\t\t} else {\n\t\t\tif (array_key_exists($paramName, $QS)) {\n\t\t\t\tif ($blnTesting) echo ('<br>NULL value not specified - key is present - replace current key value');\n\t\t\t} else {\n\t\t\t\tif ($blnTesting) echo ('<br>NULL value not specified - key is not present - add new rule');\n\t\t\t} //END: if (array_key_exists($paramName, $QS))\n\t\t\t$QS[$paramName] = $paramValue;\n\t\t} //END: if ($paramValue == NULL)\n\t} //END: for ($i=0; $i<sizeof($args); $i+=2)\n\tif ($blnTesting) echo ('<br>QS = <pre>' . print_r($QS, TRUE) . '</pre>');\n\t\n\t$QSTemp = \"\";\n\tif (sizeof($QS)) {\n\t\t$Delim = $Delims[0];\n\t\tforeach ($QS as $QSParamName => $QSParamValue) {\n\t\t\tif (strlen($QSTemp) > 0) $QSTemp .= $Delim;\n\t\t\t$QSTemp .= rawurlencode($QSParamName) . \"=\" . rawurlencode($QSParamValue);\n\t\t}\n\t\t$QSTemp = \"?\" . $QSTemp;\n\t}\n\t$QS = $QSTemp;\n\n\tif ($blnTesting) echo ('<br>Returning ' . $URL . $QS);\n\treturn $URL . $QS;\n}",
"public function addVariable($name, $value);",
"public function setParameter($name, $value)\n {\n $this->parameters[$name] = $value;\n }",
"public function withParameter($name, $value)\n {\n if (empty($this->_model['parameters'])) $this->_model['parameters'] = [];\n $this->_model['parameters'][$name] = $value;\n return $this;\n }",
"function add($a, $b);",
"public function setParameter ($name, $value)\n {\n\n $this->parameters[$name] = $value;\n\n }",
"function param($name, $value = null)\n {\n if (func_num_args() > 1) {\n if ($this->property(\"param\") == null) $this->property(\"param\", array());\n $param = $this->property(\"param\");\n if (is_string($name) == false) throw new AjaxIllegalArgumentException('In class <b>' . get_class($this) . '</b> in method <b>param($name,$value)</b>: Argument <b>$name</b> MUST BE of type String - <b style=\"color:red\">' . (is_object($name) ? get_class($name) : gettype($name)) . '</b> given!');\n // if String\n if (is_string($value)) {\n $param[$name] = $value;\n }\n // if TextField, TextArea\n elseif (($value instanceof Input) == true || ($value instanceof TextArea) == true) {\n $param[$name] = '\"+document.getElementById(\"' . $value->id() . '\").value+\"';\n }\n // else Not Supported\n else {\n throw new AjaxIllegalArgumentException('In class <b>' . get_class($this) . '</b> in method <b>param($name,$value)</b>: Argument <b>$value</b> MUST BE of type String, S_TextField or S_TextArea - <b style=\"color:red\">' . (is_object($value) ? get_class($value) : gettype($value)) . '</b> given!');\n }\n $this->property(\"param\", $param);\n return $this;\n } else {\n if (is_string($name)) {\n if ($this->property(\"param\") == null) return null;\n $param = $this->property(\"param\");\n return (isset($param[$name]) == true) ? $param[$name] : null;\n } elseif (($name instanceof Input) == true || ($name instanceof TextArea) == true) {\n //s_alert($name->name());\n $param[$name->name()] = '\"+document.getElementById(\"' . $name->id() . '\").value+\"';\n $this->property(\"param\", $param);\n } else {\n throw new AjaxIllegalArgumentException('In class <b>' . get_class($this) . '</b> in method <b>param($name)</b>: Argument <b>$name</b> MUST BE of type String, Input or TextArea - <b style=\"color:red\">' . (is_object($name) ? get_class($name) : gettype($name)) . '</b> given!');\n }\n return $this;\n }\n }",
"protected function defineParameter($name, $dataType, $from, $to, $required, $value)\n {\n $this->parameters[$name] = array(\n 'dataType' => $dataType,\n 'from' => $from,\n 'to' => $to,\n 'required' => $required,\n 'value' => $value,\n );\n }",
"public function param($param, $value)\n {\n // Add or overload a new parameter\n $this->_parameters[$param] = $value;\n\n return $this;\n }",
"public function add($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"public function addUrlParameter($key, $value)\n {\n $this->urlParameters[$key] = $value;\n }",
"public function queryParam($name);",
"function add_param($argument, $type = 'string') {\n\n $allowed_types = array('none',\n 'empty',\n 'base64',\n 'boolean',\n 'datetime',\n 'double',\n 'int',\n 'i4',\n 'string',\n 'array',\n 'struct');\n if (!in_array($type, $allowed_types)) {\n return false;\n }\n\n if ($type != 'datetime' && $type != 'base64') {\n $this->params[] = $argument;\n return true;\n }\n\n // Note weirdness - The type of $argument gets changed to an object with\n // value and type properties.\n // bool xmlrpc_set_type ( string &value, string type )\n xmlrpc_set_type($argument, $type);\n $this->params[] = $argument;\n return true;\n }",
"public function addQuerystringParameter($key, $value)\n {\n $this->querystringParams[$key] = $value;\n }",
"public function getParam($name)\n {\n // TODO: Implement getParam() method.\n }"
] | [
"0.7609425",
"0.74151254",
"0.723744",
"0.72016764",
"0.6903158",
"0.6829956",
"0.6786749",
"0.6768711",
"0.6612406",
"0.6571901",
"0.6442025",
"0.6335826",
"0.6279073",
"0.6260762",
"0.61733204",
"0.6159857",
"0.615111",
"0.6135569",
"0.6121516",
"0.6104",
"0.60984266",
"0.60852975",
"0.60655206",
"0.6031628",
"0.6004066",
"0.5985691",
"0.5931316",
"0.5862232",
"0.5851929",
"0.5805837",
"0.5797123",
"0.57923836",
"0.5786043",
"0.57774687",
"0.5771263",
"0.5757824",
"0.5756568",
"0.5733737",
"0.57325715",
"0.5725829",
"0.57100314",
"0.56953275",
"0.56768435",
"0.5628707",
"0.56183225",
"0.56096363",
"0.5604772",
"0.55765456",
"0.5561597",
"0.5560399",
"0.55316263",
"0.55290365",
"0.5524718",
"0.5498333",
"0.5496546",
"0.5493113",
"0.54824805",
"0.5474815",
"0.54506904",
"0.5447592",
"0.54292727",
"0.54264134",
"0.540809",
"0.5392957",
"0.5385707",
"0.5369261",
"0.53654677",
"0.536227",
"0.53602743",
"0.5359717",
"0.53566796",
"0.53551626",
"0.53375316",
"0.5332737",
"0.53123",
"0.5308345",
"0.5297931",
"0.5283333",
"0.52823275",
"0.52432686",
"0.52371454",
"0.52339315",
"0.52311975",
"0.52311975",
"0.5228619",
"0.52164733",
"0.52128965",
"0.5212826",
"0.52119815",
"0.520798",
"0.5201867",
"0.5188416",
"0.5186319",
"0.51812077",
"0.5175468",
"0.5169716",
"0.5154768",
"0.5150134",
"0.5133245",
"0.51296777"
] | 0.75199574 | 1 |
Returns an iterable list of children. | public function parameters()
{
return $this->parameters;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function children()\n {\n $this->buildTree();\n return $this->childrenInternal();\n }",
"public function get_children();",
"function children() {\n\t\t$this->load_children();\n\t\treturn $this->_children;\n\t}",
"public function children()\n\t{\n\t\treturn $this->descendants(1);\n\t}",
"public function children() {\n return $this->descendants(1);\n }",
"public function children()\r\n\t{\r\n\t\treturn $this->children;\r\n\t}",
"public function iterateChildren();",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}",
"public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}",
"public function getChildren() {\n\t\treturn $this->children;\n\t}",
"public function getChildren() {\n\t\treturn $this->children;\n\t}",
"public function getChildren()\n {\n return $this->_children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren()\n {\n return $this->children;\n }",
"public function getChildren() {\n\t\treturn $this->_children;\n\t}",
"public function get_children() {\n\t\treturn $this->children;\n\t}",
"public function getChildren(): Collection\n {\n return $this->children;\n }",
"public function getChildren(): Collection\n {\n return $this->children;\n }",
"public function getChildren() \n {\n return $this->children;\n }",
"public function getChildren()\n\t{\n\t\treturn $this->current()->getIterator();\n\t}",
"public function getChildren(): array {\n return iterator_to_array(clone $this->children);\n }",
"public function getChildren() {\n\t\t$children = $this->categoryRepository->findAllChildren($this);\n\t\treturn $children;\n\t}",
"public function getChildren(): array\n {\n return $this->children->toArray();\n }",
"public function get_children() : array\n {\n return $this->children;\n }",
"public function GetChildren() {\n\t\treturn $this->Children;\n\t}",
"final public function getChildren() {\n\t\treturn array();\n\t}",
"#[ReturnTypeWillChange]\n public function getChildren()\n {\n return new self($this->iterator->getChildren(), $this->excluded);\n }",
"public function children()\n {\n return (array) $this->children;\n }",
"public function children (){\n\t\treturn array();\n\t}",
"public function children()\n {\n $children = $this->getAttribute('children') ?: [];\n\n if ($children && ! is_array($children) && ! ($children instanceof Collection)) {\n return (array) $children;\n }\n\n return $children;\n }",
"public function getChildren()\r\n\t{\r\n\t\treturn $this->childrenNodes;\r\n\t}",
"public function getChildren() {\n\t\t$placeRepository = t3lib_div::makeInstance('Tx_Wpj_Domain_Repository_PlaceRepository');\n\t\t$children = $placeRepository->findAllChildren($this);\n\t\treturn $children;\n\t}",
"public function getIterator(): \\Traversable\n {\n return $this->children;\n }",
"public function getChildren()\n {\n $query = 'SELECT category_id FROM '. \\rex::getTablePrefix() .'d2u_machinery_categories '\n .'WHERE parent_category_id = '. $this->category_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n $children = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $children[] = new self((int) $result->getValue('category_id'), $this->clang_id);\n $result->next();\n }\n return $children;\n }",
"public function getChildren()\n {\n return $this->inheritanceList;\n }",
"public function getChilds()\n {\n return $this->childs;\n }",
"public function getChildren() {\n $childNodes = $this->getNode()->getChildren();\n $children = array();\n foreach ($childNodes as $childNode) {\n $child = $childNode->getPage($this->getLang());\n if ($child) {\n $children[] = $child;\n }\n }\n return $children;\n }",
"public function getChildren() {}",
"public function getChildren() {}",
"public function getChildren() {}",
"public function childrenRecursive()\n\t\t{\n\t\t\treturn $this->children()->with('childrenRecursive');\n\t\t}",
"public function getChildren()\n\t{\n\t\t$children = $this->current()->getChildren();\n\n\t\t// Using ref as per PHP source\n\t\tif (empty($this->ref))\n\t\t{\n\t\t\t$this->ref = new \\ReflectionClass($this);\n\t\t}\n\n\t\treturn $this->ref->newInstance($children);\n\t}",
"public function getChildren () {\n return $this->current ();\n }",
"public function getChildrenIterative(): array\n {\n //not using $this->getTopLevelParents, it would be concerns violation\n $topLevelParents = $this->categoryRepository->getTopLevelParents();\n\n $results[0] = $topLevelParents;\n $parents = $topLevelParents;\n\n $results = $this->iterate($results);\n\n return $results;\n }",
"public function getChildren();",
"public function getChildren();",
"public function getChildren();",
"public function getChildren();",
"public function getChildren();",
"public function getChildren();",
"public function getChildren();",
"public function getChildren();",
"public function getChildren();",
"public function allChildrenElements() {\n\t\treturn $this->childrenElements()->with('allChildrenElements');\n\t}",
"public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }",
"public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }",
"public function getChildren(): array;",
"#[\\ReturnTypeWillChange]\n public function getChildren()\n {\n $element = $this->current();\n $childContext = $this->elementProcessor->processElementChildren(\n $element,\n $this->contexts[$this->contextMap[$this->key()]]\n );\n return new static($element->childNodes, $childContext, $this->elementProcessor);\n }",
"public function getChilds() {\n return $this->__childs;\n }",
"public function getChildrenQuery();",
"public function getChilds();",
"public function getChildren()\n\t{\n\t\treturn $this->_auth->getItemChildren($this->_calendarId,$this->_name);\n\t}",
"public function Children()\n {\n return $this->childrenOfSection('');\n }",
"public function childrenElements() {\n\t\treturn $this->hasMany('\\App\\Hierarchy', 'parent_id', 'id');\n\t}",
"protected function getIteratorArray()\n {\n return $this->getChildren();\n }",
"public function children() {\n\n if(isset($this->cache['children'])) return $this->cache['children'];\n\n $this->cache['children'] = new Children($this);\n\n $inventory = $this->inventory();\n\n // with page models\n if(!empty(static::$models)) {\n foreach($inventory['children'] as $dirname) {\n $child = new Page($this, $dirname);\n // let's create a model if one is defined\n if(isset(static::$models[$child->intendedTemplate()])) {\n $model = static::$models[$child->intendedTemplate()];\n $child = new $model($this, $dirname);\n }\n $this->cache['children']->data[$child->id()] = $child;\n }\n // without page models\n } else {\n foreach($inventory['children'] as $dirname) {\n $child = new Page($this, $dirname);\n $this->cache['children']->data[$child->id()] = $child;\n }\n }\n\n return $this->cache['children'];\n\n }",
"public function childrens()\n {\n return $this->hasMany(self::class, 'parent_id');\n }",
"public function getIterator() {\n\t\treturn new \\ArrayIterator($this->children);\n\t}",
"public function Children()\n {\n return $this->Root->childrenOfSection($this->URLSegment);\n }",
"function &getChildren()\n\t{\n\t\tif (!is_object($this->_item))\n\t\t{\n\t\t\t$this->getCategory();\n\t\t}\n\n\t\t// Order subcategories\n\t\tif (count($this->_children))\n\t\t{\n\t\t\t$params = $this->getState()->get('params');\n\t\t\tif ($params->get('orderby_pri') == 'alpha' || $params->get('orderby_pri') == 'ralpha')\n\t\t\t{\n\t\t\t\tjimport('joomla.utilities.arrayhelper');\n\t\t\t\tJArrayHelper::sortObjects($this->_children, 'title', ($params->get('orderby_pri') == 'alpha') ? 1 : -1);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_children;\n\t}",
"public function getChildren()\n\t{\n\t\treturn new static($this->getInnerIterator()->getChildren(), $this->excludeMasks);\n\t}",
"public function getChildrenForIndependentMenu()\n {\n $IndependentMenu = Independent\\Handler::getMenu($this->getAttribute('menuId'));\n\n return $IndependentMenu->getChildren();\n }",
"public function children()\n {\n return $this->hasMany(static::class, 'parent_id')->orderBy('name', 'asc');\n }",
"public function children()\n {\n if (is_a($this->children, 'Kirby\\Cms\\Pages') === true) {\n return $this->children;\n }\n\n return $this->children = Pages::factory($this->inventory()['children'], $this);\n }",
"public function getChildren()\n {\n }",
"public function getChildren()\n {\n }",
"public function grandChildren() {\n return $this->children()->children();\n }",
"public function myChildren()\n {\n return File::get()->filter(\"ParentID\", $this->ID);\n }",
"public function getChildren($node): iterable\n {\n if (!method_exists($node, 'getChildren')) {\n return;\n }\n\n yield from $node->getChildren();\n }",
"public function children()\n {\n return $this->hasMany(self::class, 'parent_id', 'id');\n }",
"public function grandChildren()\n {\n return $this->children()->children();\n }",
"function &getChildren()\n\t{\n global $jlistConfig;\n \n\t\tif (!is_object($this->_item)) {\n\t\t\t$this->getCategory();\n\t\t}\n\n\t\t// Order subcategories\n\t\tif (sizeof($this->_children)) {\n\t\t\t$params = $this->getState()->get('params');\n \n // Sort order defined in menu?\n $orderby_pri = $params->get('orderby_pri');\n \n if (!$orderby_pri){\n // When not we use jD settings\n $cats_order = (int)$jlistConfig['cats.order'];\n if ($cats_order == 1){\n $params->set('orderby_pri', 'alpha');\n } elseif ($cats_order == 2){\n $params->set('orderby_pri', 'ralpha');\n } \n }\n \n\t\t\tif ($params->get('orderby_pri') == 'alpha' || $params->get('orderby_pri') == 'ralpha') {\n\t\t\t\t$this->_children = ArrayHelper::sortObjects($this->_children, 'title', ($params->get('orderby_pri') == 'alpha') ? 1 : (-1));\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_children;\n\t}",
"public function getDescendants();",
"public function getChildren()\n {\n // Singleton: both getChild and getChildren are called\n // by the Sabre_DAV_Browser_Plugin\n if (empty($this->children)) {\n $storedFiles = $this->fileStorage->get_directory_files(\n $this->storedFile->get_contextid(),\n $this->storedFile->get_component(),\n $this->storedFile->get_filearea(),\n $this->itemId,\n $this->storedFile->get_filepath(),\n false, // recursive\n true, // includedirs\n 'filepath ASC, filename ASC' // sort\n );\n\n foreach ($storedFiles as $storedFile) {\n if ($storedFile->is_directory()) {\n $this->children[][] = new DAVRootPoolDirectory($storedFile);\n } else {\n $this->children[][] = new DAVRootPoolFile($storedFile);\n }\n }\n }\n\n return $this->children;\n }",
"public function children()\n\t{\n\t\tif (is_null($this->children)) {\n\t\t\t$this->children = \\App::make('Illuminate\\Database\\Eloquent\\Collection');\n\t\t\tforeach (\\PagesRepository::retrieveChildren($this->id) as $child) {\n\t\t\t\t$this->children->add(\\App::make('Monal\\Pages\\Models\\FrontendPage', $child));\n\t\t\t}\n\t\t}\n\t\treturn $this->children;\n\t}",
"function getChildren() {\n foreach ( $this->parents as $parent ) {\n $this->children[$parent->name()]=array();\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $parent->id() ) {\n $this->children[$parent->name()][]=$item;\n }\n }\n }\n }",
"public function getChildren()\n {\n return $this\n ->hasMany(MenuItem::class, ['menuId' => 'id'])\n ->andWhere(['is', 'parentId', null])\n ->orderBy(['order' => SORT_ASC]);\n }",
"public function findChildren()\n {\n return self::where('code_parrent',$this->id)->get();\n }",
"public function &getChildren($id)\n {\n return $this->elts[$id]['children'];\n }",
"protected function getChildren()\n\t{\n\t\t$listing = $this->modelListing->getListing($this->size, $this->offset);\n\t\treturn $listing;\n\t}",
"public function getChildren()\n {\n $editors = BaseManager::build('FelixOnline\\Core\\Category', 'category', 'id')\n ->filter(\"parent = %i\", array($this->getId()))\n ->values();\n\n return $editors;\n }",
"public function children($self = FALSE, $direction = 'ASC', $limit = FALSE)\n {\n return $this->descendants($self, $direction, TRUE, FALSE, $limit);\n }",
"public function getChildNodes()\n {\n return array_values($this->getChildNodesById());\n }",
"public function children() {\n\t\treturn $this->fieldset_children;\n\t}"
] | [
"0.81731623",
"0.8165131",
"0.81080747",
"0.8102014",
"0.80517507",
"0.8026795",
"0.80030817",
"0.79813147",
"0.7974746",
"0.7974746",
"0.7974185",
"0.7974185",
"0.7972899",
"0.7972714",
"0.7972714",
"0.7972714",
"0.7972714",
"0.7972714",
"0.7972714",
"0.7972714",
"0.7972714",
"0.79567987",
"0.79202944",
"0.7907608",
"0.7907608",
"0.7886132",
"0.78839535",
"0.78732455",
"0.78371304",
"0.7821722",
"0.77545047",
"0.77326256",
"0.7711377",
"0.7638678",
"0.7633501",
"0.75935966",
"0.7564106",
"0.7564007",
"0.75589126",
"0.748345",
"0.74715424",
"0.7442679",
"0.7430749",
"0.7423717",
"0.7379695",
"0.7379695",
"0.7379695",
"0.736938",
"0.7320052",
"0.7309964",
"0.7292091",
"0.7261142",
"0.7261142",
"0.7261142",
"0.7261142",
"0.7261142",
"0.7261142",
"0.7261142",
"0.7261142",
"0.7261142",
"0.7253131",
"0.72496474",
"0.72496474",
"0.72411376",
"0.72071314",
"0.72054845",
"0.7179278",
"0.7117119",
"0.7115247",
"0.7106732",
"0.70965797",
"0.70783246",
"0.707326",
"0.7054573",
"0.7054234",
"0.70281506",
"0.7018879",
"0.6994692",
"0.698697",
"0.6986437",
"0.6973659",
"0.6954499",
"0.6954499",
"0.6952835",
"0.6951439",
"0.6951156",
"0.69322807",
"0.69226915",
"0.69145805",
"0.68933415",
"0.688712",
"0.6865977",
"0.6860894",
"0.6795517",
"0.6785133",
"0.67637867",
"0.67316604",
"0.67044944",
"0.6687706",
"0.6687322",
"0.6678575"
] | 0.0 | -1 |
Returns the type of value. This corresponds to the VALUE= parameter. Every property also has a 'default' valueType. | abstract public function getValueType(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValueType()\n {\n return $this->valueType;\n }",
"public function getSettingValueType()\n {\n if (array_key_exists(\"settingValueType\", $this->_propDict)) {\n return $this->_propDict[\"settingValueType\"];\n } else {\n return null;\n }\n }",
"public function getType()\n {\n return $this->_value->getType();\n }",
"public function getValueType();",
"public function get_type()\n {\n return $this->get_default_property(self::PROPERTY_TYPE);\n }",
"public function getValueType($valueName);",
"public function getValue() {\n return $this->type;\n }",
"public function type($value = null){\n return $this->attr(ATTR_TYPE, $value);\n }",
"public static function typeOfValue($value)\n {\n if (is_null($value)) {\n return self::TYPE_NULL;\n }\n if (is_int($value)) {\n return self::TYPE_INT;\n }\n if (is_bool($value)) {\n return self::TYPE_BOOL;\n }\n return self::TYPE_STR;\n }",
"public function getType()\n {\n $value = $this->get(self::TYPE);\n return $value === null ? (integer)$value : $value;\n }",
"public function getType()\n {\n return $this->fields['Type']['FieldValue'];\n }",
"protected static function getType($value) {\n\t\t\tif ($value === NULL) {\n\t\t\t\t$result = 'NULL';\n\t\t\t} elseif (is_array($value)) {\n\t\t\t\t$result = 'array';\n\t\t\t} elseif (is_scalar($value)) {\n\t\t\t\t$scalarType = gettype($value);\n\t\t\t\t$result = $scalarType;\n\t\t\t} else {\n\t\t\t\t$valueClassType = get_class($value);\n\t\t\t\t$result = $valueClassType;\n\t\t\t}\n\t\t\treturn $result;\n\t\t}",
"public function getSettingDisplayValueType()\n {\n if (array_key_exists(\"settingDisplayValueType\", $this->_propDict)) {\n return $this->_propDict[\"settingDisplayValueType\"];\n } else {\n return null;\n }\n }",
"private function GetType($value){\n\t\tswitch (true) {\n\t\t\tcase is_int($value):\n\t\t\t\t$type = PDO::PARAM_INT;\n\t\t\t\tbreak;\n\t\t\tcase is_bool($value):\n\t\t\t\t$type = PDO::PARAM_BOOL;\n\t\t\t\tbreak;\n\t\t\tcase is_null($value):\n\t\t\t\t$type = PDO::PARAM_NULL;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$type = PDO::PARAM_STR;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $type;\n\t}",
"public function setTypeValue()\n {\n if($this->getType() === null){\n $this->setType(self::TYPE_SIMPLE);\n }\n }",
"public function getType()\n {\n return parent::getValue('type');\n }",
"function fiftyone_degrees_get_typed_value($property, $profile_value) {\n $value_string = $profile_value['value'];\n switch ($property['value_type_id']) {\n // String and Javascript.\n case 0:\n case 4:\n default:\n return $value_string;\n // Int.\n case 1:\n return (int) $value_string;\n // Double.\n case 2:\n return (double) $value_string;\n // Bool.\n case 3:\n return $value_string === 'True';\n }\n}",
"public function valueType(): ?string;",
"protected function getType(&$value)\n {\n return self::T_FIELD;\n }",
"public function type($value) {\n return $this->setProperty('type', $value);\n }",
"public function type($value) {\n return $this->setProperty('type', $value);\n }",
"public function type($value) {\n return $this->setProperty('type', $value);\n }",
"public function type($value) {\n return $this->setProperty('type', $value);\n }",
"public function type($value) {\n return $this->setProperty('type', $value);\n }",
"public static function getType($value): string\n\t{\n\t\tif(is_string($value)) {\n\t\t\treturn 'string';\n\t\t} else if(is_int($value)) {\n\t\t\treturn 'integer';\n\t\t} else if(is_float($value)) {\n\t\t\treturn 'float';\n\t\t} else if(is_array($value)) {\n\t\t\treturn 'array';\n\t\t} else if(is_bool($value)) {\n\t\t\treturn 'boolean';\n\t\t} else if(is_object($value)) {\n\t\t\treturn 'object';\n\t\t}\n\t\treturn 'different';\n\t}",
"public function getType()\n {\n return $this->getProperty('type');\n }",
"public function getType()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'type'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'type'];\n\t\t}\n\t}",
"static function get_value($value, $type) {\n switch ($type) {\n case 'int':\n return (int)$value;\n break;\n case 'string':\n case 'text':\n case 'reference':\n return $value;\n break;\n case 'bool':\n return str_to_bool($value);\n break;\n case 'float':\n case 'double':\n return (float)$value;\n break;\n }\n\n return null;\n }",
"public function getType()\n {\n if (array_key_exists(\"type\", $this->_propDict)) {\n return $this->_propDict[\"type\"];\n } else {\n return null;\n }\n }",
"public function getType()\n {\n if (array_key_exists(\"type\", $this->_propDict)) {\n return $this->_propDict[\"type\"];\n } else {\n return null;\n }\n }",
"public function getTypeAttribute($value)\n {\n return self::typeToString($value);\n }",
"public static function getValue($value)\n\t{\n\t\tif(is_string($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeString) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeString($value);\n\t\t\t}\n\t\t} else if(is_int($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeInt) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeInt($value);\n\t\t\t}\n\t\t} else if(is_float($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeFloat) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeFloat($value);\n\t\t\t}\n\t\t} else if(is_array($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeArray) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeArray($value);\n\t\t\t}\n\t\t} else if(is_bool($value)) {\n\t\t\tif($value instanceof DataTypes\\TypeBool) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn new DataTypes\\TypeBool($value);\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}",
"public static function getType($value)\n {\n $type = \\strtolower(\\gettype($value));\n if ($type == 'object') {\n if ($value instanceof \\Imperium\\JSON\\ArrayObject) {\n return 'array';\n } elseif ($value instanceof \\Imperium\\JSON\\Undefined) {\n return 'undefined';\n }\n } elseif ($type == 'array') {\n if (!empty($value) && (array_keys($value) !== range(0, count($value) - 1))) {\n return 'object';\n }\n } elseif ($type == 'integer' || $type == 'double') {\n return 'number';\n }\n return $type;\n }",
"protected function getTypeValue($type)\n {\n return $this->typeMapping[$type] ?? self::VALUE_DYNAMIC;\n }",
"public function getValue()\n {\n $value = $this->value;\n\n switch ($this->type) \n {\n case 'boolTrue':\n $value = true;\n break;\n\n case 'boolFalse':\n $value = false;\n break;\n\n case 'string':\n $value = str_replace(\"\\\\\", \"\", substr($value, 1, -1));\n break;\n\n case 'number':\n $value = $value + 0;\n break;\n\n case 'null':\n $value = null;\n break;\n }\n\n return $value;\n }",
"public static function getTypeFromValue($value)\n {\n switch (gettype($value)) {\n case 'boolean':\n return Type::getBool();\n\n case 'integer':\n return Type::getInt();\n\n case 'double':\n return Type::getFloat();\n\n case 'string':\n return Type::getString();\n\n case 'array':\n return Type::getArray();\n\n case 'NULL':\n return Type::getNull();\n\n default:\n return Type::getMixed();\n }\n }",
"public function getTipoValor()\n {\n return $this->tipoValor;\n }",
"private static function valueFromType($value, $type)\n {\n if ($value === null)\n {\n return null;\n }\n \n switch ($type)\n {\n case 'bool':\n case 'boolean':\n return (bool) $value;\n \n case 'int':\n case 'integer':\n return (int) $value;\n \n case 'lob':\n return stream_get_contents($value);\n \n case 'base64':\n return base64_decode($value);\n \n case 'date':\n case 'time':\n case 'timestamp':\n return strtotime($value);\n \n case 'string':\n case 'istring':\n default:\n return (string) $value;\n }\n }",
"public function get_post_type($value='') {\n\t\t\treturn $this->post_type;\n\t\t}",
"public function getType()\n {\n return $this->getParameter('type') ?: 'custom';\n }",
"public function getType()\n {\n $rtn = $this->data['type'];\n\n return $rtn;\n }",
"protected function getValueType($value): int\n {\n if (is_int($value)) {\n return PDO::PARAM_INT;\n } else if (is_string($value)) {\n return PDO::PARAM_STR;\n } else if (is_bool($value)) {\n return PDO::PARAM_BOOL;\n } else if (is_float($value)) {\n return PDO::PARAM_INT;\n } else {\n return PDO::PARAM_STR;\n }\n }",
"public function isValue()\n {\n return\n $this->type === 'string' ||\n $this->type === 'number' ||\n $this->type === 'null' ||\n $this->type === 'boolTrue' ||\n $this->type === 'boolFalse';\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getType()\n {\n return $this->get(self::_TYPE);\n }",
"public function getValueElementType()\n {\n switch ($this->getAttribute()) {\n case 'country_id':\n case 'region_id':\n return 'multiselect';\n }\n\n return 'text';\n }",
"public function getMimicTypeAttribute($value)\n {\n return $this->getMimicType($value);\n }",
"public function getType()\n\t{\n\t\treturn empty($this->type) ? $this->guessType() : $this->type;\n\t}",
"public function getType(): ?PropertyType {\n $val = $this->getBackingStore()->get('type');\n if (is_null($val) || $val instanceof PropertyType) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'type'\");\n }",
"function getType() \n {\n return $this->getValueByFieldName( 'statevar_type' );\n }",
"final public function type($value = null)\n {\n if( null === $value ) {\n return isset($this->_attributes['type']) ? $this->_attributes['type'] : '';\n }\n \n $this->_attributes['type'] = $value;\n return $this;\n }",
"private function GetType($value = NULL) : INT\r\n {\r\n switch(TRUE)\r\n {\r\n case is_int($value) :\r\n return(\\PDO::PARAM_INT);\r\n case is_bool($value):\r\n return(\\PDO::PARAM_BOOL);\r\n case is_null($value):\r\n return(\\PDO::PARAM_NULL);\r\n default:\r\n return(\\PDO::PARAM_STR);\r\n }\r\n }",
"public function getType()\n\t{\n\t\treturn $this->get('type');\n\t}",
"#[Pure]\n public static function convertParameterType(string $type, mixed $value): string|int|bool|null\n {\n return match ($type) {\n 'string' => (string)$value,\n 'int' => (int)$value,\n 'bool' => $value === true || $value === '1' || $value === 'true',\n default => null\n };\n }",
"protected function getPropertyType(\\SimpleXMLElement $propertyNode) {\n\t\t$attributes = $propertyNode->attributes();\n\n\t\tswitch ($attributes['type']) {\n\t\t\tcase 'int':\n\t\t\t\t$dataType = ExpressionValue::TYPE_INTEGER;\n\t\t\t\tbreak;\n\n\t\t\tcase 'float':\n\t\t\t\t$dataType = ExpressionValue::TYPE_FLOAT;\n\t\t\t\tbreak;\n\n\t\t\tcase 'null':\n\t\t\t\t$dataType = ExpressionValue::TYPE_NULL;\n\t\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\t\t$dataType = ExpressionValue::TYPE_STRING;\n\t\t\t\tbreak;\n\n\t\t\tcase 'bool':\n\t\t\t\t$dataType = ExpressionValue::TYPE_BOOLEAN;\n\t\t\t\tbreak;\n\n\t\t\tcase 'object':\n\t\t\t\t$dataType = ExpressionValue::TYPE_OBJECT;\n\t\t\t\tbreak;\n\n\t\t\tcase 'array':\n\t\t\t\t$dataType = ExpressionValue::TYPE_ARRAY;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$dataType = ExpressionValue::TYPE_UNKNOWN;\n\t\t}\n\n\t\treturn $dataType;\n\t}",
"public function getType()\n {\n return $this->getEntityValue('type', '');\n }",
"protected function valueObjectType() : string\n {\n return SeoValueObject::class;\n }",
"public function getValueElementType()\n {\n return 'text';\n }",
"public static function typeMatches ($value, $type) {\n $types = array(\"string\", \"number\", \"array\", \"object\", \"date\", \"boolean\", \"null\");\n $phpType = gettype($value);\n //....?\n }",
"public function getType() {\n return $this->field['type'] ?? '';\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }",
"public function getDataType()\n {\n return $this->_fields['DataType']['FieldValue'];\n }",
"public function getType(): ?string {\n $val = $this->getBackingStore()->get('type');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'type'\");\n }",
"public function GetType()\n {\n return ( $this->type );\n }",
"public function setType($value)\n {\n return $this->set(self::TYPE, $value);\n }",
"public function setType($value){\n return $this->setParameter('type', $value);\n }",
"public function setType($value){\n return $this->setParameter('type', $value);\n }",
"public function getType() {\n\t\treturn $this->getDiscreteField()->getType();\n\t}",
"protected function _typecast($value) {\n\t\t$type = null;\t\t\n\n\t\tif (is_string($value)) {\n\t\t\t$type = 'string';\n\t\t}\n\t\tif (is_int($value)) {\n\t\t\t$type = 'int';\n\t\t}\n\t\tif (is_float($value)) {\n\t\t\t$type = 'double';\n\t\t}\n\t\tif (is_bool($value)) {\n\t\t\t$type = 'boolean';\n\t\t}\n\t\tif (is_array($value)) {\n\t\t\t$type = 'array';\n\t\t\t\n\t\t\t$valueKeys = array_keys($value);\n\t\t\tforeach($valueKeys as $vk) {\n\t\t\t\tif (!is_numeric($vk)) {\n\t\t\t\t\t$type = 'struct';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $type;\n\t}",
"public function getType() {\n return $this->field->type;\n }",
"function smarty_function_get_type_value($params, $smarty) {\n\n if (is_bool($params['value'])) {\n $smarty->assign($params['assign'], 'bool');\n return;\n }\n if (is_float($params['value'])) {\n $smarty->assign($params['assign'], 'float');\n return ;\n }\n if (is_int($params['value'])) {\n $smarty->assign($params['assign'], 'int');\n return ;\n }\n if (is_string($params['value'])) {\n $smarty->assign($params['assign'], 'string');\n return ;\n }\n\n}",
"public function getType()\n {\n return isset($this->type) ? $this->type : 0;\n }",
"function rest_get_best_type_for_value($value, $types)\n {\n }",
"public function get_type();",
"public function getType()\n { return $this->get('type'); }",
"public function getType(){\n return $this->getParameter('type');\n }",
"public function getType(){\n return $this->getParameter('type');\n }"
] | [
"0.79693156",
"0.7820938",
"0.7657003",
"0.76026684",
"0.727911",
"0.7104499",
"0.7099447",
"0.6911751",
"0.68960977",
"0.6884592",
"0.6855649",
"0.67692006",
"0.6716638",
"0.6665632",
"0.6658285",
"0.6627324",
"0.6584003",
"0.65415615",
"0.6537666",
"0.6524587",
"0.6524587",
"0.6524587",
"0.6524587",
"0.6524587",
"0.6495695",
"0.64792866",
"0.64647895",
"0.64628625",
"0.6454585",
"0.6454585",
"0.6398619",
"0.63673586",
"0.63448006",
"0.63412786",
"0.62615615",
"0.6246599",
"0.6245228",
"0.62198913",
"0.6213794",
"0.6192771",
"0.6159659",
"0.6159338",
"0.61535233",
"0.6129777",
"0.6129777",
"0.6129777",
"0.6129777",
"0.6129777",
"0.6129777",
"0.6129777",
"0.6129777",
"0.6129777",
"0.6129777",
"0.6128671",
"0.6128671",
"0.6128671",
"0.612563",
"0.61236507",
"0.61189777",
"0.60979813",
"0.6091648",
"0.6071922",
"0.6068278",
"0.6063577",
"0.6057672",
"0.60550785",
"0.6034147",
"0.60322595",
"0.6030196",
"0.60192037",
"0.60024345",
"0.5998363",
"0.5998363",
"0.5998363",
"0.5998363",
"0.5998363",
"0.5998363",
"0.5998363",
"0.5998363",
"0.5998363",
"0.5998363",
"0.5998363",
"0.5998352",
"0.5998352",
"0.59967554",
"0.59803045",
"0.598015",
"0.5975464",
"0.59712136",
"0.59712136",
"0.59709513",
"0.59681493",
"0.5959533",
"0.592472",
"0.5921424",
"0.5914173",
"0.5913811",
"0.59060526",
"0.5905013",
"0.5905013"
] | 0.72069305 | 5 |
Sets a raw value coming from a mimedir (iCalendar/vCard) file. This has been 'unfolded', so only 1 line will be passed. Unescaping is not yet done, but parameters are not included. | abstract public function setRawMimeDirValue($val); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getRawMimeDirValue();",
"public function setFieldValue($fieldValue) : void\n {\n $parameters = explode(';', $fieldValue);\n $disposition = array_shift($parameters);\n\n $this->setDisposition($disposition);\n\n foreach ($parameters as $parameter)\n {\n $parameter = explode('=', $parameter, 2);\n\n if (count($parameter) === 2)\n {\n $parameter[0] = trim($parameter[0]);\n $parameter[1] = trim($parameter[1], \" \\t\\n\\r\\0\\x0B\\\"\");\n\n // filename\n if ($parameter[0] == 'filename')\n {\n $this->setFilename($parameter[1]);\n }\n }\n }\n }",
"public function setDataFileFromContentRaw($contentRaw)\n {\n $this->dataFile = FileReference::fromContentRaw($contentRaw);\n }",
"public function setRaw($raw)\n {\n $this->raw = $raw;\n }",
"public function setDataFileContent($contentRaw)\n {\n $this->setDataFileFromContentRaw($contentRaw);\n }",
"public function setRawValue($value) {\n\n $this->rawValue = $value;\n }",
"public function set($filepath, $data);",
"public function setRawContent($content);",
"public function setDir($dir);",
"public function setRaw($name, $value)\n\t{\n\t\t$this->set($name, $value, true);\n\t}",
"function setRawLogPath($value)\n {\n $this->_props['RawLogPath'] = $value;\n }",
"public function setValue($value) {\n\t\tparent::setValue(stripslashes($value));\n\t}",
"abstract public function setContentFromFile($file);",
"public function setMediaFileUnwrapped($var)\n {\n $this->writeWrapperValue(\"media_file\", $var);\n return $this;}",
"public static function setFile($file) {}",
"abstract public function setContentFromString($string);",
"public function set(string $path, $value);",
"public function parse(string $rawContent)\n {\n parent::parse($rawContent);\n\n $encoding = $this->tagParser->getEncoding($rawContent{0});\n $content = substr($rawContent, 1);\n $typeParts = Helpers::splitString(\"\\x00\", $content, 2);\n\n $this->encoding = $encoding;\n $this->mimeType = $typeParts[0];\n $this->pictureType = $typeParts[1]{0};\n\n $string = substr($typeParts[1], 1);\n $strings = Helpers::splitString($encoding->getDelimiter(), $string, 2);\n\n $this->description = $strings[0];\n $this->pictureData = $strings[1];\n\n $this->_handleDefaultValues();\n\n // TODO: If MIME type is \"-->\", the picture data is a URL.\n }",
"public function setDataFileFromContentRaw($contentRaw)\n {\n $tempFilePath = parent::createTempFile();\n file_put_contents($tempFilePath, $contentRaw);\n $this->dataFilePath = $tempFilePath;\n }",
"public function set_raw_data($data)\n {\n }",
"public function setFile($file) {}",
"public function setActualPath($actual_path)\n {\n if (strlen($actual_path)) {\n $this->actual_path = $actual_path;\n }\n }",
"function escape_update_media_file($escapeid, $context, $draftitemid) {\n global $DB;\n\n // Set the filestorage object.\n $fs = get_file_storage();\n // Save the file if it exists that is currently in the draft area.\n file_save_draft_area_files($draftitemid, $context->id, 'mod_escape', 'mediafile', 0);\n // Get the file if it exists.\n $files = $fs->get_area_files($context->id, 'mod_escape', 'mediafile', 0, 'itemid, filepath, filename', false);\n // Check that there is a file to process.\n if (count($files) == 1) {\n // Get the first (and only) file.\n $file = reset($files);\n // Set the mediafile column in the escapes table.\n $DB->set_field('escape', 'mediafile', '/' . $file->get_filename(), array('id' => $escapeid));\n } else {\n // Set the mediafile column in the escapes table.\n $DB->set_field('escape', 'mediafile', '', array('id' => $escapeid));\n }\n}",
"abstract public function &setRawAdditionalProperties($value);",
"private function setFile($file)\n {\n $format = $this->format; // fallback\n $extension = '.'.$format;\n\n // don't use strrpos, because files could have dots in their name\n foreach($this->config['valid_formats'] as $ext)\n {\n $ext_pos = strpos($file, '.'.$ext);\n if ($ext_pos !== false)\n {\n $format = strtolower(substr($file, $ext_pos+1));\n $extension = '';\n continue;\n }\n }\n\n $file .= $extension;\n $this->file = $file;\n $this->format = $format;\n }",
"public function setPath($file);",
"public function setContentFromString(string $content): RegularFileInterface;",
"protected function change_variable($value, $escaped)\n {\n return file_put_contents($this->path(), preg_replace(\n \n \"/^{$this->key()}{$escaped}/m\",\n \n \"{$this->key()}={$value}\",\n \n file_get_contents($this->path())\n )\n );\n }",
"public function setFile($v)\r\n\t{\r\n\t\t$this->_file = $v;\r\n\t}",
"public function setEscapeDelimiter($escape) {\n $this->escape= $escape{0};\n }",
"abstract public function setUTF();",
"public function setIdentifier(){\n\n \t$this->fileIdentifier = $this->getIdentifier();\n }",
"final public function setRawInput($rawInput): void\n {\n $this->rawInput = $rawInput;\n }",
"public function setDir($dir) {\n $this->dir = $dir;\n }",
"public function setRawContent(mixed $content = null): void\n {\n $this->content = $content;\n }",
"private function setCurrent($dir)\n\t{\n\t\t$this->current_dir = str_replace(self::$dir, '', $dir);\n\t}",
"public function setValues(){\n if($this->getType() == \"var\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"int\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"bool\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"string\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"nil\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"label\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"type\"){\n $this->setValue($this->getArg());\n }else{\n $this->setValue(\"CHYBA\");\n }\n }",
"public function setPostedFileValue($value)\n {\n $this->postedFileValue = $value;\n }",
"public function setFileSrcFlags($value, $dc)\n {\n if ($dc->activeRecord) {\n switch ($dc->activeRecord->source) {\n case 'download':\n $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['eval']['extensions'] = Config::get('allowedDownload');\n break;\n }\n }\n\n return $value;\n }",
"protected function _setStringValue($name, $value, $encoding) {}",
"public function setData( $raw_data ) {\n $this->data = $raw_data->data;\n $this->convertData( '\\Instagram\\Media' );\n $this->next_max_timestamp = count( $this->data ) ? $this->data[ count( $this->data )-1 ]->getCreatedTime() : null;\n }",
"public function setContents($contents, $encoding = 'UTF-8') {}",
"public function set($field, $value, $type = 'HOME')\n {\n $field = strtolower($field);\n $type_uc = strtoupper($type);\n\n switch ($field) {\n case 'name':\n case 'displayname':\n $this->raw['FN'][0][0] = $this->displayname = $value;\n break;\n\n case 'surname':\n $this->raw['N'][0][0] = $this->surname = $value;\n break;\n\n case 'firstname':\n $this->raw['N'][0][1] = $this->firstname = $value;\n break;\n\n case 'middlename':\n $this->raw['N'][0][2] = $this->middlename = $value;\n break;\n\n case 'prefix':\n $this->raw['N'][0][3] = $value;\n break;\n\n case 'suffix':\n $this->raw['N'][0][4] = $value;\n break;\n\n case 'nickname':\n $this->raw['NICKNAME'][0][0] = $this->nickname = $value;\n break;\n\n case 'organization':\n $this->raw['ORG'][0][0] = $this->organization = $value;\n break;\n\n case 'photo':\n if (strpos($value, 'http:') === 0) {\n // TODO: fetch file from URL and save it locally?\n $this->raw['PHOTO'][0] = array(0 => $value, 'url' => true);\n }\n else {\n $this->raw['PHOTO'][0] = array(0 => $value, 'base64' => (bool) preg_match('![^a-z0-9/=+-]!i', $value));\n }\n break;\n\n case 'email':\n $this->raw['EMAIL'][] = array(0 => $value, 'type' => array_filter(array('INTERNET', $type_uc)));\n $this->email[] = $value;\n break;\n\n case 'im':\n // save IM subtypes into extension fields\n $typemap = array_flip($this->immap);\n if ($field = $typemap[strtolower($type)]) {\n $this->raw[$field][] = array(0 => $value);\n }\n break;\n\n case 'birthday':\n case 'anniversary':\n if (($val = rcube_utils::anytodatetime($value)) && ($fn = self::$fieldmap[$field])) {\n $this->raw[$fn][] = array(0 => $val->format('Y-m-d'), 'value' => array('date'));\n }\n break;\n\n case 'address':\n if ($this->addresstypemap[$type_uc]) {\n $type = $this->addresstypemap[$type_uc];\n }\n\n $value = $value[0] ? $value : array('', '', $value['street'], $value['locality'], $value['region'], $value['zipcode'], $value['country']);\n\n // fall through if not empty\n if (!strlen(join('', $value))) {\n break;\n }\n\n default:\n if ($field == 'phone' && $this->phonetypemap[$type_uc]) {\n $type = $this->phonetypemap[$type_uc];\n }\n\n if (($tag = self::$fieldmap[$field]) && (is_array($value) || strlen($value))) {\n $index = count($this->raw[$tag]);\n $this->raw[$tag][$index] = (array)$value;\n if ($type) {\n $typemap = array_flip($this->typemap);\n $this->raw[$tag][$index]['type'] = explode(',', $typemap[$type_uc] ?: $type);\n }\n }\n else {\n unset($this->raw[$tag]);\n }\n\n break;\n }\n }",
"public function updateValueAction()\n {\n $response = ['error' => ''];\n\n $extFields = \\Cot::$extrafields[File::tableName()];\n\n $id = cot_import('id', 'P', 'INT');\n $field = cot_import('key', 'P', 'ALP');\n $value = cot_import('value', 'P', 'TXT');\n\n if (!$id || !$field) {\n cot_sendheaders('application/json', cot_files_ajax_get_status(404));\n exit;\n }\n\n $file = File::getById($id);\n if (!$file) {\n cot_files_ajax_die(404);\n }\n\n // Можно изменить только title или что-то из экстраполей\n if ($field != 'title') {\n if (empty($extFields)) {\n cot_sendheaders('application/json', cot_files_ajax_get_status(404));\n exit;\n }\n $extfName = str_replace('file_', '', $field); // @todo\n if (!array_key_exists($extfName, $extFields)) {\n cot_sendheaders('application/json', cot_files_ajax_get_status(404));\n exit;\n }\n $value = cot_import_extrafields($_POST['value'], $extFields[$extfName], 'D', $file->{$field});\n }\n\n cot_sendheaders('application/json', cot_files_ajax_get_status(200));\n\n if (cot_error_found()) {\n $response['error'] = cot_implode_messages();\n cot_clear_messages();\n echo json_encode($response);\n exit;\n }\n\n\n if (!cot_auth('files', 'a', 'A') && $file->user_id != \\Cot::$usr['id']){\n $response['error'] = \\Cot::$L['files_err_perms'];\n echo json_encode($response);\n exit;\n }\n\n $file->{$field} = $value;\n $file->save();\n\n $response['written'] = 1;\n\n echo json_encode($response);\n exit;\n }",
"function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)\n {\n }",
"public function setDir($dir)\n {\n $this->dir = $dir;\n }",
"public function setDir($dir)\n {\n $this->dir = $dir;\n }",
"function set($key, $value)\n {\n $this->content = str_replace('${'.$key.'}', $value, $this->content);\t\n }",
"public function setFileOrFolderName(?string $value): void {\n $this->getBackingStore()->set('fileOrFolderName', $value);\n }",
"function setPath($path)\n {\n $this->path = trim($path);\n }",
"public function setRawValue($key, $value) {\n $this->_data[$key] = $value;\n }",
"public function __set($name, $value)\n {\n if(array_key_exists($name, $this->extraFields)){\n $fieldInstance = $this->extraFields[$name];\n if($fieldInstance instanceof File){\n $value = UploadedFile::getInstance($this->owner, 'file');\n }\n $fieldInstance->setValue($value);\n return;\n }else{\n parent::__set($name, $value);\n }\n }",
"protected function determineValue()\n {\n $this->value = trim(mb_substr($this->source, 1));\n }",
"public function setRaw($header) {\n\n\t\t$this->_headers[$header] = null;\n\t}",
"public function setFile($file) {\t\t\n\t\t// set file\n\t\t$this->file = $file;\n\t\t\n\t\t// set extension\n\t\t$file_parts = explode('.', $this->file['name']);\n\t\t$this->extension = strtolower(end($file_parts));\n\n\t}",
"public function setHeaderFromArchiveEntry( ezcArchiveEntry $entry )\n {\n $this->splitFilePrefix( $entry->getPath( false ), $file, $filePrefix );\n $this->fileName = $file;\n $this->filePrefix = $filePrefix;\n\n $this->fileMode = $entry->getPermissions();\n $this->userId = $entry->getUserId();\n $this->groupId = $entry->getGroupId();\n $this->fileSize = $entry->getSize();\n $this->modificationTime = $entry->getModificationTime();\n $this->linkName = $entry->getLink( false );\n\n switch ( $entry->getType() )\n {\n case ezcArchiveEntry::IS_FILE:\n $this->type = 0;\n break;\n\n case ezcArchiveEntry::IS_LINK:\n $this->type = 1;\n break;\n\n case ezcArchiveEntry::IS_SYMBOLIC_LINK:\n $this->type = 2;\n break;\n\n case ezcArchiveEntry::IS_CHARACTER_DEVICE:\n $this->type = 3;\n break;\n\n case ezcArchiveEntry::IS_BLOCK_DEVICE:\n $this->type = 4;\n break;\n\n case ezcArchiveEntry::IS_DIRECTORY:\n $this->type = 5;\n break;\n\n case ezcArchiveEntry::IS_FIFO:\n $this->type = 6;\n break;\n\n // Devices, etc are set to \\0.\n default:\n $this->type = \"\";\n break; // ends up as a \\0 character.\n }\n\n $this->deviceMajorNumber = $entry->getMajor();\n $this->deviceMinorNumber = $entry->getMinor();\n\n $length = strlen( $this->fileName );\n\n if ( $entry->getType() == ezcArchiveEntry::IS_DIRECTORY )\n {\n // Make sure that the filename ends with a slash.\n if ( $this->fileName[ $length - 1] != \"/\" )\n {\n $this->fileName .= \"/\";\n }\n }\n else\n {\n if ( $this->fileName[ $length - 1] == \"/\" )\n {\n $this->fileName = substr( $this->fileName, 0, -1 ); // Remove last character.\n }\n }\n }",
"private function setContentType($key, $val){\n $trimedKey = trim($key);\n if(strcasecmp($trimedKey, CoreConstants::CONTENT_TYPE) == 0){\n $this->contentType = trim($val);\n }\n }",
"public function setFileName(?string $value): void {\n $this->getBackingStore()->set('fileName', $value);\n }",
"public function setArchiveFileStructure( ezcArchiveFileStructure &$struct )\n {\n parent::setArchiveFileStructure( $struct );\n\n if ( $this->filePrefix != '' )\n {\n $struct->path = $this->filePrefix . DIRECTORY_SEPARATOR . $this->fileName;\n }\n else\n {\n $struct->path = $this->fileName;\n }\n $struct->major = $this->deviceMajorNumber;\n $struct->minor = $this->deviceMinorNumber;\n $struct->userName = $this->userName;\n $struct->groupName = $this->groupName;\n\n // Override the link type.\n switch ( $this->type )\n {\n case \"\\0\":\n case 0:\n $struct->type = ezcArchiveEntry::IS_FILE;\n break;\n\n case 1:\n $struct->type = ezcArchiveEntry::IS_LINK;\n break;\n\n case 2:\n $struct->type = ezcArchiveEntry::IS_SYMBOLIC_LINK;\n break;\n\n case 3:\n $struct->type = ezcArchiveEntry::IS_CHARACTER_DEVICE;\n break;\n\n case 4:\n $struct->type = ezcArchiveEntry::IS_BLOCK_DEVICE;\n break;\n\n case 5:\n $struct->type = ezcArchiveEntry::IS_DIRECTORY;\n break;\n\n case 6:\n $struct->type = ezcArchiveEntry::IS_FIFO;\n break;\n\n case 7:\n $struct->type = ezcArchiveEntry::IS_RESERVED;\n break;\n }\n\n if ( $struct->type == ezcArchiveEntry::IS_RESERVED )\n {\n throw new ezcArchiveValueException( $struct->type, \" < \" . ezcArchiveEntry::IS_RESERVED );\n }\n }",
"abstract protected function setFormat();",
"public function setEscape($escape) {\n\n if (!($this->file instanceof SplFileObject)) {\n throw new Exception('Escape character must be set after initializing an instance');\n }\n\n if (strlen($escape) > 1) {\n throw new InvalidArgumentException(\"Escape character must be a single character\");\n }\n\n $this->file->setCsvControl($this->delimiter, $this->enclosure, $escape);\n $this->escape = $escape;\n }",
"public function setHeaders($rawHeaders){\n\n $rawHeaders = str_replace(\"\\r\\n\", \"\\n\", $rawHeaders);\n $response_headers_rows = explode(\"\\n\", trim($rawHeaders));\n foreach ($response_headers_rows as $line) {\n if(strpos($line, ': ') == false){\n continue;\n }else {\n list($key, $value) = explode(': ', $line);\n $this->headers[$key] = $value;\n //set response content type\n $this->setContentType($key, $value);\n $this->setIntuitTid($key, $value);\n }\n }\n\n }",
"public function setPath( $path );",
"public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }",
"public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }",
"public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }",
"public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }",
"function set($path, $value)\n\t\t{\n\t\t\t$this->Init();\n\t\t\t$path = explode(\"/\", $path);\n\t\t\t$pointer = end($path);\n\t\t\t$tmp = $value;\n\t\t\twhile($pointer){\n\t\t\t\tif (!empty($pointer)){\n\t\t\t\t\t$tmp = array($pointer=>$tmp);\n\t\t\t\t\t$pointer = prev($path);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->settings = array_merge_recursive_overwrite($this->settings, $tmp);\n\t\t\t$this->saveSettings();\n\t\t}",
"public function substitutePWD ($fileName) {\n $tempArray = array();\n foreach ($this->sectionContents as $line) {\n if (strpos($line, '{PWD}') !== false) {\n $tempArray[] = str_replace('{PWD}', dirname($fileName), $line);\n } else {\n $tempArray[] = $line;\n }\n\n }\n \n $this->sectionContents = $tempArray;\n foreach ($this->sectionContents as $line) {\n $this->commandLineArguments[] = addslashes($line);\n }\n }",
"public function setBanerraMimeType($data)\n {\n\n if ($this->_banerraMimeType != $data) {\n $this->_logChange('banerraMimeType');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_banerraMimeType = $data;\n\n } else if (!is_null($data)) {\n $this->_banerraMimeType = (string) $data;\n\n } else {\n $this->_banerraMimeType = $data;\n }\n return $this;\n }",
"function setFilename($key);",
"public function setUnicodeFileSpecification($fileSpecification, $encoding = 'UTF-8') {}",
"private function setFieldValue(ContentfulEntryField $field, ContentfulEntry $entry, array $innerField): void\n {\n try {\n if (array_key_exists('content', $innerField) && array_key_exists('nodeType', $innerField)) {\n $field->setValue($this->richTextParser->parseLocalized($innerField, null), ContentfulEntryFieldType::RICHTEXT);\n } elseif (array_key_exists('lon', $innerField) && array_key_exists('lat', $innerField)) {\n $field->setValue($innerField, ContentfulEntryFieldType::GEOLOCATION);\n } elseif (array_key_exists('sys', $innerField)) {\n if ($innerField['sys']['linkType'] === 'Entry') {\n $field->setValue($this->loadEntry($entry->getSpace(), $innerField['sys']['id']), ContentfulEntryFieldType::ENTRY);\n } elseif ($innerField['sys']['linkType'] === 'Asset') {\n $field->setValue($this->loadAsset($entry->getSpace(), $innerField['sys']['id']), ContentfulEntryFieldType::ASSET);\n }\n } elseif (array_is_list($innerField)) {\n $fieldValues = [];\n $fieldType = ContentfulEntryFieldType::ENTRIES;\n\n foreach ($innerField as $subField) {\n if ($subField instanceof Entry) {\n $type = $subField->getType();\n $id = $subField->getId();\n } else {\n $type = $subField['sys']['linkType'];\n $id = $subField['sys']['id'];\n }\n\n if ($type === 'Entry') {\n $fieldValues[] = $this->loadEntry($entry->getSpace(), $id);\n } elseif ($type === 'Asset') {\n $fieldValues[] = $this->loadAsset($entry->getSpace(), $id);\n $fieldType = ContentfulEntryFieldType::ASSETS;\n }\n }\n\n $field->setValue($fieldValues, $fieldType);\n } else {\n $field->setValue($innerField, ContentfulEntryFieldType::JSON);\n }\n } catch (Throwable) {\n // Do nothing\n }\n }",
"public function setRawContent(string $rawContent): self\n {\n $this->postFields = [];\n $this->files = [];\n $this->rawContent = $rawContent;\n\n return $this;\n }",
"function SetItemfileid($value) { $this->itemFileId=$value; }",
"public function setParsedContentAttribute($value)\n {\n $this->attributes['content'] = $value;\n }",
"public function setBaseArchiveFile($baseArchiveFile) {\n $this->baseArchiveFile = escapeshellarg($baseArchiveFile);\n }",
"private function _handleDefaultValues()\n {\n if ($this->mimeType === \"\") {\n $this->mimeType = \"image/\";\n }\n }",
"public function setCodDir($codDir) {\n $this->codDir = $codDir;\n }",
"public function setRaw($key,$value) {\n $this->rawValues[count($this->columns)] = true;\n\n $this->values[count($this->columns)] = $value;\n $this->columns[count($this->columns)] = $key;\n\n return $this;\n }",
"public function setUploadFolderAttribute($value)\n {\n $this->attributes['upload_folder'] = folder_decode($value, false, false);\n }",
"function setPath($path) {\r\n\t\tif($this->configured) {\r\n\t\t\treturn 'Configuration is frozen';\r\n\t\t}\r\n\t\t$URLDecodedPath = '';\r\n\t\t$URLDecodedPath = urldecode($path);\r\n\t\t$this->path = $URLDecodedPath;\r\n\t}",
"public function setIrudiaMimeType($data)\n {\n\n if ($this->_irudiaMimeType != $data) {\n $this->_logChange('irudiaMimeType');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_irudiaMimeType = $data;\n\n } else if (!is_null($data)) {\n $this->_irudiaMimeType = (string) $data;\n\n } else {\n $this->_irudiaMimeType = $data;\n }\n return $this;\n }",
"protected function __Set($_Attr, $_Value){\r\n switch($_Attr){\r\n case 'PhpArray' : $this->BuildXls($_Value); break;\r\n case 'XlsDir' :\r\n if(isset($_Value)) {\r\n $_Value = rtrim($_Value, \"/\\\\\");\r\n if(!is_dir($_Value))\r\n if(!@mkdir($_Value, 0777, true))\r\n throw new exception(\"Unable to create directory <u><b>$_Value</b></u>\");\r\n $this->_XlsDir = $_Value;\r\n } else\r\n $this->_XlsDir = getcwd();\r\n break;\r\n case 'FileName' :\r\n if(isset($_Value)){\r\n $P_ = pathinfo($_Value, PATHINFO_FILENAME);\r\n $N_ = preg_match (\"/[\\\"%,\\'\\/:;<>?]/\", $_Value);\r\n if(empty($P_) || (bool)$N_)\r\n throw new exception(\"Invalid Xls file name <u><b>\\\"$_Value\\\"</b></u>\");\r\n if(strtolower(pathinfo($_Value, PATHINFO_EXTENSION)) <> 'xls')\r\n $_Value = \"$_Value.xls\";\r\n $this->_FileName = $_Value;\r\n } else\r\n $this->_FileName = self::C_DefName;\r\n break;\r\n default : throw new exception(\"Unknown SET attribute <u><b>$_Attr</b></u>\");\r\n }\r\n }",
"public function setFileToSignContent($contentRaw)\n {\n $this->setFileToSignFromContentRaw($contentRaw);\n }",
"public function setFileToSignContent($contentRaw)\n {\n $this->setFileToSignFromContentRaw($contentRaw);\n }",
"function setTokenPickupFile($value)\n {\n $this->_props['TokenPickupFile'] = $value;\n }",
"protected function setPlainContent() {}",
"public function setSignatureFileContent($contentRaw)\n {\n $this->setSignatureFileFromContentRaw($contentRaw);\n }",
"public static function raw($value)\n {\n }",
"protected function setFieldValue ($field) {\n if ($this->$field instanceof Newforms_File)\n $this->$field->setValue('');\n if (!$this->__bound) return;\n if (is_array($this->__Data)) {\n if (isset($this->__Data[$field])) {\n $this->$field->setValue ($this->__Data[$field]);\n return;\n }\n return;\n }\n if (is_object ($this->__Data)) {\n if (isset($this->__Data->$field)) {\n $this->$field->setValue ($this->__Data->$field);\n return;\n }\n return;\n }\n }",
"protected function setPath( string $path ) : void\n {\n $this->path = DIGITAL_BASE_PATH.$path;\n }",
"public function setDataFileFromContentBase64($contentBase64)\n {\n $this->dataFile = FileReference::fromContentBase64($contentBase64);\n }",
"function setPlainBody( $plainbody )\n {\n $this->body= stripslashes( $plainbody );\n $sql = \"UPDATE\n \".$this->table.\"\n SET\n plainbody = '\". addslashes( trim( $plainbody ) ) .\"'\n WHERE\n id=\".$this->id;\n $this->dba->exec( $sql );\n }",
"public function setRawData($data)\n {\n // Call the parent's set method...\n parent::setRawData($data);\n\n // Also process the MARC record:\n $marc = trim($data['fullrecord']);\n\n // check if we are dealing with MARCXML\n if (substr($marc, 0, 1) == '<') {\n $marc = new \\File_MARCXML($marc, \\File_MARCXML::SOURCE_STRING);\n } else {\n // When indexing over HTTP, SolrMarc may use entities instead of certain\n // control characters; we should normalize these:\n $marc = str_replace(\n ['#29;', '#30;', '#31;'], [\"\\x1D\", \"\\x1E\", \"\\x1F\"], $marc\n );\n $marc = new \\File_MARC($marc, \\File_MARC::SOURCE_STRING);\n }\n\n $this->marcRecord = $marc->next();\n if (!$this->marcRecord) {\n throw new \\File_MARC_Exception('Cannot Process MARC Record');\n }\n }",
"public function setFileToSignFromContentRaw($contentRaw)\n {\n $tempFilePath = parent::createTempFile();\n file_put_contents($tempFilePath, $contentRaw);\n $this->fileToSignPath = $tempFilePath;\n }",
"public function setFileToSignFromContentRaw($contentRaw)\n {\n $tempFilePath = parent::createTempFile();\n file_put_contents($tempFilePath, $contentRaw);\n $this->fileToSignPath = $tempFilePath;\n }",
"public function setPath($path = '');",
"public function setRawBody($rawBody)\n {\n $this->_rawBody = $rawBody;\n }",
"public function setFileSingle($field, $value)\n {\n\n if (Session::has('upload.' . $this->config . '.' . $field)) {\n $value = Request::session()->pull('upload.' . $this->config . '.' . $field);\n $value = end($value);\n Request::session()->save();\n } elseif (!empty($value)) {\n $value = $value;\n } elseif (Request::has($field)) {\n $value = Request::get($field);\n } else {\n return;\n }\n\n if (empty($value)) {\n $value = [];\n }\n\n $this->setAttribute($field, $value);\n }"
] | [
"0.5918399",
"0.53737795",
"0.5217325",
"0.5209312",
"0.51658964",
"0.51127756",
"0.5105218",
"0.49936762",
"0.49791798",
"0.49730372",
"0.49530643",
"0.4891328",
"0.48733544",
"0.48447856",
"0.48376006",
"0.48191825",
"0.4815819",
"0.48105448",
"0.4789574",
"0.47602153",
"0.47494873",
"0.47152618",
"0.47080705",
"0.47080243",
"0.46914098",
"0.4654894",
"0.46352237",
"0.4609818",
"0.45882618",
"0.45881224",
"0.45747405",
"0.45455542",
"0.45411888",
"0.45331848",
"0.45218265",
"0.44922346",
"0.4491793",
"0.44873375",
"0.44629645",
"0.446293",
"0.445695",
"0.44565392",
"0.44470468",
"0.44453537",
"0.4441811",
"0.4433761",
"0.4433761",
"0.44266292",
"0.4425806",
"0.4419669",
"0.44177827",
"0.44114378",
"0.43891096",
"0.43782467",
"0.43717316",
"0.43712902",
"0.4367274",
"0.43653494",
"0.43484125",
"0.43461323",
"0.43448603",
"0.4343781",
"0.4340329",
"0.4338661",
"0.4338661",
"0.4338661",
"0.43365857",
"0.43288422",
"0.4326121",
"0.4325544",
"0.43203548",
"0.43154377",
"0.43045497",
"0.4299523",
"0.4294153",
"0.42930308",
"0.42872727",
"0.42830786",
"0.4277011",
"0.42708772",
"0.42694938",
"0.4268197",
"0.4261871",
"0.42587635",
"0.42498937",
"0.42498937",
"0.4248658",
"0.42459238",
"0.4237327",
"0.42217103",
"0.42202547",
"0.42199922",
"0.42189404",
"0.4218548",
"0.42142168",
"0.4208216",
"0.4208216",
"0.42059916",
"0.42058074",
"0.4202602"
] | 0.7474023 | 0 |
Returns a raw mimedir representation of the value. | abstract public function getRawMimeDirValue(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValue()\n {\n if (is_array($this->value)) {\n if (0 == count($this->value)) {\n return;\n } elseif (1 === count($this->value)) {\n return $this->value[0];\n } else {\n return $this->getRawMimeDirValue();\n }\n } else {\n return $this->value;\n }\n }",
"abstract public function setRawMimeDirValue($val);",
"public function getRawValue ()\n {\n return $this->files->getFile( $this->getName() );\n }",
"public function getMediaFieldValue()\n {\n return $this->isBinary() ? base64_encode($this->{$this->getMediaField()}) : $this->{$this->getMediaField()};\n }",
"public function getMimeType(): string\n {\n return (string) $this->mimeType;\n }",
"public function getMimeType() : string\n {\n return $this->mimeType;\n }",
"public function getMediaFileUnwrapped()\n {\n return $this->readWrapperValue(\"media_file\");\n }",
"function getMimeType ()\n\t{\n\t\treturn $this->mainType.'/'.$this->subType;\n\t}",
"public function getMimeType(): string;",
"public function getMimeType() {}",
"public function getMimeType() {}",
"public function getMimeType() {}",
"public function getMimeType() {}",
"public function mimeType(): string\n {\n return $this->mimeType ??= FileSystem::mimeType($this->path);\n }",
"public function getOriginalMimeType(): string\n {\n return $this->mimeType;\n }",
"public function getMimeType(): string\n {\n return $this->mimeType;\n }",
"public function getMimeType(): string\n {\n return $this->mimeType;\n }",
"public function serialize()\n {\n $str = $this->name;\n if ($this->group) {\n $str = $this->group.'.'.$this->name;\n }\n\n foreach ($this->parameters() as $param) {\n $str .= ';'.$param->serialize();\n }\n\n $str .= ':'.$this->getRawMimeDirValue();\n\n $str = \\preg_replace(\n '/(\n (?:^.)? # 1 additional byte in first line because of missing single space (see next line)\n .{1,74} # max 75 bytes per line (1 byte is used for a single space added after every CRLF)\n (?![\\x80-\\xbf]) # prevent splitting multibyte characters\n )/x',\n \"$1\\r\\n \",\n $str\n );\n\n // remove single space after last CRLF\n return \\substr($str, 0, -1);\n }",
"public function getMimeType();",
"public function getMimeType();",
"public function getMimeType();",
"public function getMimeType();",
"public function getMimeType();",
"public function getUploadFolderAttribute($value)\n {\n\n if (!empty($value)) {\n return folder_encode($value, false, false);\n } else {\n $folder = folder_new(null, null);\n $this->attributes['upload_folder'] = $folder;\n\n return folder_encode($folder, false, false);\n }\n\n }",
"function getMimeType() {\n\t\treturn $this->getParam(self::PARAM_DISTRIBUTOR_MIMETYPE);\n\t}",
"private function getMediaDirTmpDir(): string\n {\n return $this->directoryList->getPath(DirectoryList::MEDIA) . DIRECTORY_SEPARATOR . 'tmp';\n }",
"public function getMimeType() : string\n {\n $mimeType = $this->mimeType;\n if ($this->shouldBeCompressed()) {\n $mimeType = $this->compression->getMimeType();\n }\n return $mimeType;\n }",
"public function getMimeType()\n {\n return Formats::getFormatMimeType($this->format);\n }",
"public function getTypeString()\n {\n switch ( $this->fileStructure->type )\n {\n case self::IS_DIRECTORY:\n return \"d\";\n\n case self::IS_FILE:\n return \"-\";\n\n case self::IS_SYMBOLIC_LINK:\n return \"l\";\n\n case self::IS_LINK:\n return \"h\";\n\n default:\n return \"Z\";\n }\n }",
"public function mime () {\n\t\treturn $this->mime;\n\t}",
"public function getMimeType() {\n\t\treturn parent::getMimeType();\n\t}",
"static public function filter_type_dir($value)\n\t{\n\t\treturn (substr($value, -1) != '/') ? $value.'/' : $value;\n\t}",
"public function getMimeType()\n {\n return $this->mimeType;\n }",
"abstract public function getMimeType();",
"public function getMimeType()\r\n {\r\n $this->caseClosedOrFail();\r\n\r\n return $this->mime;\r\n }",
"public function getMime(): string\n {\n return $this->applicableFormat[$this->contentType];\n }",
"public function mime() : string {\n return $this->file->type;\n }",
"public function getBaseDir()\n {\n return $this->filesystem\n ->getDirectoryRead(DirectoryList::MEDIA)\n ->getAbsolutePath(self::MEDIA_PATH);\n }",
"public function getBaseDir()\n {\n return $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA)->getAbsolutePath(self::MEDIA_PATH);\n\n }",
"public function getFileOrFolderName(): ?string {\n $val = $this->getBackingStore()->get('fileOrFolderName');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'fileOrFolderName'\");\n }",
"public function getDir(): string;",
"function getMimeType() ;",
"public function getMimeType()\n {\n return $this->mime_type;\n }",
"public function getMimeType()\n {\n return $this->mime_type;\n }",
"public function getMimeType()\n {\n return $this->mime_type;\n }",
"public function getBase64Content(): string;",
"public function getFullPath(): string\n {\n $store = $this->getStore();\n return $store ? $store->getBaseMediaDir() . '/' . $this->getPath() : '';\n }",
"public function renderUri() {\n\n\t\t$relativePath = sprintf('Icons/MimeType/%s.png', $this->file->getProperty('extension'));\n\t\t$fileNameAndPath = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getFileAbsFileName('EXT:media/Resources/Public/' . $relativePath);\n\t\tif (!file_exists($fileNameAndPath)) {\n\t\t\t$relativePath = 'Icons/UnknownMimeType.png';\n\t\t}\n\n\t\treturn Path::getRelativePath($relativePath);\n\t}",
"public function getMimeType() {\n return explode('/', $this->contentType)[0];\n }",
"protected function getUploadDir()\r\n {\r\n // get rid of the __DIR__ so it doesn't screw when displaying uploaded doc/image in the view.\r\n return $this->getMediaType();\r\n }",
"public function getMime() {\n return $this->mime;\n }",
"public function getArchiveFolder(): ?string {\n $val = $this->getBackingStore()->get('archiveFolder');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'archiveFolder'\");\n }",
"private function getMediaDirectory()\n {\n return $this->filesystem->getDirectoryRead(DirectoryList::MEDIA);\n }",
"public function getMime()\n {\n return $this->mime;\n }",
"public function getMimeBasedClassname() {\n $mime = $this->getData('mediatype');\n return strstr($mime, '/', true);\n }",
"public function getMimeType()\n {\n return $this->getActiveFactory()->getMimeType();\n }",
"public function getMimeType()\n {\n if (!class_exists('finfo', false)) return $this->type;\n $info = new \\finfo(FILEINFO_MIME);\n return $info->file($this->tmp);\n }",
"public function toString()\n {\n $path = '';\n if (!empty($this->dirs)) {\n foreach ($this->dirs as $dir) {\n $path .= $dir . DIRECTORY_SEPARATOR;\n }\n }\n $path .= $this->file;\n return $path;\n }",
"public function getFilenamePlain() : string\n {\n return $this->getFilename(true);\n }",
"public function getMimeType(){\n return (new \\finfo())->buffer($this->getContent(), FILEINFO_MIME_TYPE);\n }",
"public function guessMimeType(): string\n {\n $mimeType = mime_content_type($this->getPath());\n\n if ($mimeType === false) {\n return '';\n }\n\n return $mimeType;\n }",
"public function __toString()\n {\n return (string)$this->_sPath;\n }",
"protected function getMediaDirTmpDir()\n {\n return $this->directoryList->getPath(DirectoryList::MEDIA) . DIRECTORY_SEPARATOR . 'tmp';\n }",
"public function dir() {\n\t\treturn dirname($this->_path) . '/';\n\t}",
"public function getDirectory(): string\n {\n return $this->directory;\n }",
"public function getDirectory(): string\n {\n return $this->directory;\n }",
"protected function _dir(): string\n {\n if ($container = $this->_container()) {\n assert($container->hasId());\n return \"{$container}/\" . static::DIR;\n }\n return static::DIR;\n }",
"public function getMimeType(): string\n {\n return $this->filesystem->mimeType(\n $this->resource->getPath()\n ) ?: 'application/octet-stream';\n }",
"public function wt_parse_download_file_field($value) {\n // Absolute file paths.\n if (0 === strpos($value, 'http')) {\n return esc_url_raw($value);\n }\n // Relative and shortcode paths.\n return wc_clean($value);\n }",
"public function getMimeType()\n\t{\n\t\treturn mime_content_type($this->tmp_name);\n\t}",
"public function getType() {\n\t\tif ($this->getIsDir()) {\n\t\t\treturn '<DIR>';\n\t\t} else {\n\t\t\treturn $this->getExtension().' file';\n\t\t}\n\t}",
"public function getRaw()\n {\n return $this->raw;\n }",
"public function getRaw()\n {\n return $this->raw;\n }",
"public function getRaw()\n {\n return $this->raw;\n }",
"public function __toString() {\n\t\treturn (string) $this->basename; \n\t}",
"public function getDirectory() : ?string;",
"public function getMimeType(): ?string\n {\n return $this->mime_type;\n }",
"public function mime ();",
"public function getMimetype();",
"public function getMimeType(): ?string\n\t{\n\t\treturn $this->mimeType;\n\t}",
"function getMime () {\r\n return $this->sourceMime;\r\n }",
"public function getMimeType($path){\n return $this->disk->mimeType($path);\n //mimeType() will only search the path under root directory\n }",
"protected function getMediaDirTmpDir()\n {\n\n return $this->directoryList->getPath(DirectoryList::MEDIA) . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR;\n }",
"public function getPath(): string {\n $meta_data = stream_get_meta_data($this->file);\n return $meta_data[\"uri\"];\n }",
"public static function toPathValue($value)\n {\n return rawurlencode($value);\n }",
"public function GetMimeType() {\n\n if ($this->IsValid() && $this->MimeType === null) {\n if (function_exists('mime_content_type')) {\n $this->MimeType= mime_content_type($this->TmpName);\n } elseif (function_exists('finfo_open')) {\n $fInfo= finfo_open(FILEINFO_MIME);\n $this->MimeType= finfo_file($fInfo, $this->TmpName);\n finfo_close($fInfo);\n }\n }\n return $this->MimeType;\n }",
"public function getStorageDir() : string\n {\n return $this->storageDir;\n }",
"protected function getJsonTypeFolder(): string\n {\n $path = self::getJsonFolder();\n return $path . DIRECTORY_SEPARATOR . $this->type;\n }",
"public function getMIMEType()\n {\n return $this->mimetype;\n }",
"public function getDir() {\n\t\treturn $this->_dir;\n\t}",
"public function getMediaUrlAttribute($value)\n {\n if(filter_var($value, FILTER_VALIDATE_URL) !== false){\n return $value;\n }else{\n return route('getFile', [\"path\" => \\Crypt::encrypt($value)]);\n }\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDir()\n {\n return $this->dir;\n }",
"public function getDirectory(): string;",
"function drive()\r\n {\r\n $r='';\r\n foreach (range(\"A\", \"Z\") as $val) {\r\n if(is_dir($val.\":\".DIRECTORY_SEPARATOR))\r\n {\r\n \r\n $ad=$val.\":\".DIRECTORY_SEPARATOR;\r\n $r=$r.=\"<a href='?act=file&dir=$ad'>$val:\".DIRECTORY_SEPARATOR.\"</a> \";\r\n }\r\n }\r\n return $r;\r\n }",
"public function getFileVuesexterne(): string\n {\n return (string) $this->fileVuesexterne;\n }"
] | [
"0.6638165",
"0.64884347",
"0.5961147",
"0.5959728",
"0.5773959",
"0.5760775",
"0.5721037",
"0.5710786",
"0.5683365",
"0.5672719",
"0.5672719",
"0.5672719",
"0.5672719",
"0.56609946",
"0.56423485",
"0.5634405",
"0.5634405",
"0.5598874",
"0.55460304",
"0.55460304",
"0.55460304",
"0.55460304",
"0.55460304",
"0.5538269",
"0.55296326",
"0.5524618",
"0.55107206",
"0.5507461",
"0.5482971",
"0.5481631",
"0.5465655",
"0.54624814",
"0.543199",
"0.5423169",
"0.5404907",
"0.5402846",
"0.53497237",
"0.53468835",
"0.5335686",
"0.53080714",
"0.52970195",
"0.52908593",
"0.52736866",
"0.52736866",
"0.52736866",
"0.52706397",
"0.526484",
"0.525312",
"0.52502906",
"0.52459615",
"0.5207543",
"0.5206177",
"0.52029634",
"0.51961124",
"0.5174484",
"0.5156521",
"0.51384676",
"0.51299316",
"0.5125146",
"0.5124054",
"0.50979066",
"0.50843024",
"0.508293",
"0.50752217",
"0.50606525",
"0.50606525",
"0.5059998",
"0.5053365",
"0.504289",
"0.5029357",
"0.5028606",
"0.50231844",
"0.50231844",
"0.50231844",
"0.5021554",
"0.5015066",
"0.501479",
"0.5013174",
"0.500722",
"0.49976832",
"0.4991688",
"0.49870917",
"0.4985147",
"0.49795073",
"0.49773738",
"0.49769032",
"0.49558583",
"0.49554938",
"0.49552286",
"0.49548915",
"0.49477383",
"0.49441817",
"0.49441817",
"0.49441817",
"0.49441817",
"0.49441817",
"0.49441817",
"0.49431494",
"0.4942489",
"0.49318877"
] | 0.8279742 | 0 |
Turns the object back into a serialized blob. | public function serialize()
{
$str = $this->name;
if ($this->group) {
$str = $this->group.'.'.$this->name;
}
foreach ($this->parameters() as $param) {
$str .= ';'.$param->serialize();
}
$str .= ':'.$this->getRawMimeDirValue();
$str = \preg_replace(
'/(
(?:^.)? # 1 additional byte in first line because of missing single space (see next line)
.{1,74} # max 75 bytes per line (1 byte is used for a single space added after every CRLF)
(?![\x80-\xbf]) # prevent splitting multibyte characters
)/x',
"$1\r\n ",
$str
);
// remove single space after last CRLF
return \substr($str, 0, -1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function toBlob($obj){\n return json_encode($obj);\n }",
"public function binarySerialize();",
"public function SerializeObject () {\n return serialize ($this);\n }",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize();",
"public function serialize();",
"public function serialize();",
"public abstract function serialize();",
"public function serialize(stubObject $entity);",
"public function __toString(){\r\n\t\t$data = serialize($this->_data);\r\n\t\t// Obfuscate the data with base64 encoding\r\n\t\t$data = base64_encode($data);\r\n\t\treturn $data;\r\n\t}",
"public function serialize()\n {\n return serialize($this->data);\n }",
"public function serialize()\n {\n return serialize($this->data);\n }",
"abstract public function serialize();",
"abstract public function serialize();",
"public function toObject()\r\n\t{\r\n\t\treturn (object)$this->m_data;\r\n\t}",
"public function convert_to_raw()\n {\n return $this->convert_to_storage();\n }",
"public function serialize()\r\n {\r\n $data = $this->toArray();\r\n\r\n return serialize($data);\r\n }",
"public function toObject();",
"private function objectFromBlob($blob){\n return json_decode($blob);\n }",
"public function getBlob()\n {\n return $this->blob;\n }",
"public function getBlob()\n {\n return $this->blob;\n }",
"public static function blob() {}",
"public function toSerial() {\n\t\treturn serialize($this->toArray());\n\t}",
"public static function serialize($filename,$obj) {\r\n return \\tools::file_put_contents($filename. '.obj', serialize($obj));\r\n }",
"public function serialize()\n {\n return serialize($this->toArray());\n }",
"final public function serialize(): string\n {\n return \\serialize($this);\n }",
"public function serialize(){ }",
"public function serialize($data);",
"public function serialize()\n {\n return serialize(get_object_vars($this));\n }",
"public function serialize()\n {\n return serialize(get_object_vars($this));\n }",
"public function serialize()\n {\n return serialize(get_object_vars($this));\n }",
"function serialise(): string;",
"abstract protected function serializeData();",
"abstract public function convert_to_storage();",
"public function raw() {\n return $this->obj;\n }",
"public function toObject() \n {\n return $this->toJson();\n }",
"public function toObject(){\r\n return json_decode($this->toJson());\r\n }",
"public function encodeBlob( $b ) {\n\t\treturn $b;\n\t}",
"public function objectToString($obj);",
"public function getBinaryContent();",
"function to_json(tSerializable $object){\r\n return json_encode($object->jsonData());\r\n}",
"abstract public function serialize($data);",
"function __toString(){\n\treturn serialize($this->__data);\n\t}",
"public function dbSerialize(): string;",
"public function serialize()\n {\n // Interface for convenience.\n return serialize($this->__serialize());\n }",
"public function serialize(): string\n {\n return serialize($this->toArray());\n }",
"public function serialize()\n {\n $data = parent::serialize();\n $crypt = $this->getCrypt();\n $data = $crypt->encrypt($data);\n $data = base64_encode($data);\n return ($data);\n }",
"public function __toString() {\n return (string)$this->rawData;\n }",
"function dataToString($object=null) {\r\n\t\treturn $object->__toString();\r\n\t}",
"public function saveObjectState() {\n $this->objectState = base64_encode(serialize($this));\n $this->isNewRecord = false;\n $this->update();\n $this->reconstructCombatants();\n }",
"public function serialize(Card $card);",
"public function serialize()\n {\n }",
"public function serialize()\n {\n }",
"public function serialize()\n {\n // TODO: Implement serialize() method.\n }",
"public function serialize(): string\n {\n return $this->toRawString();\n }",
"public function serializer($var){\n\t\treturn base64_encode(serialize($var));\n\t}",
"public function __toString(): string\n {\n return serialize($this->toArray());\n }",
"public function serialize($data)\n {\n return Base64Native::serialize($data);\n }",
"public function serialize () {\n return (object) array(\n 'id' => $this->getId(),\n 'data' => (object) $this->getData(),\n 'definitionId' => $this->getDefinitionId(),\n 'createdAt' => $this->getCreatedAt()\n );\n }",
"public function getBinary();",
"public function serialize(){\n return serialize($this->id);\n }",
"public function serialize()\n {\n return serialize($this->text);\n }",
"public function serialize(){\n return serialize([\n 'data' => $this->data,\n 'table' => $this->table,\n 'key' => $this->key,\n ]);\n }",
"public function serialize()\n {\n $data = array();\n foreach( $this->toSerialize as $var ) { $data[ $var ] = $this->$var; }\n return serialize( $data );\n }",
"public function jsonSerialize()\n {\n return $this->tinydb_get_serializable_data();\n }",
"public function serialize():String {\n\n\t\treturn json_encode($this->data);\n\n\t}",
"#[ReturnTypeWillChange]\n public function __serialize()\n {\n return $this->toArray();\n }",
"public static function safeSerialize($toSerialize)\n\t{\n\t\t$serialized = serialize($toSerialize);\n\n\t\tif (self::serializedContainsObject($serialized))\n\t\t{\n\t\t\tthrow new InvalidArgumentException(\"Serialized value contains an object and this is not allowed\");\n\t\t}\n\n\t\treturn $serialized;\n\t}",
"public function serialize(){\n return serialize($this->id);\n }",
"public function getForCsvExport($object) {\r\n $data = $this->getDataFromObjectParam($object);\r\n if ($data instanceof Object_Data_Hotspotimage) {\r\n return base64_encode(Pimcore_Tool_Serialize::serialize($data));\r\n } else return null;\r\n }",
"public function serialize($entity)\n {\n }",
"function maybe_unserialize($data)\n {\n }",
"function toJson($object);",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"protected function serialize($data)\n {\n return serialize($data);\n }",
"public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}",
"public function serialize()\n {\n return serialize([\n $this->execute,\n $this->update\n ]);\n }",
"public function __toString() {\n return (string) $this->buffer;\n }",
"public function toMixed();",
"public function serialize()\n {\n return serialize(array(\n \"id\"=>$this->getId()\n ));\n }",
"public function serialize()\n {\n $data = [\n 'uid' => $this->getIdentifier()\n ];\n return serialize($data);\n }",
"public function serialize($data)\n {\n }",
"abstract protected function serializeData($unSerializedData);",
"public function readObject();",
"public function serialize()\n {\n return serialize(array($this->facebookId, parent::serialize()));\n }",
"public function serialize()\n {\n return json_encode($this);\n }",
"public function serialize() {\r\n return json_encode($this);\r\n }",
"public static function decodeWireObject( $object )\n\t{\n\t\treturn base64_decode( $object );\n\t}",
"public function retrieveStorable(): Storable;",
"public function __toString() {\n\t\treturn json_encode($this->document);\n\t}",
"abstract protected function unSerializeData();",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"function objectToString( &$object ) {\n\n\t}",
"public function toJSON(): string\n {\n $this->update();\n\n // Copied from DataObjectToJSONTrait. Do not modify here !!!\n $toJSON = function($object): string {\n $result = [];\n\n $vars = get_object_vars($object);\n foreach ($vars as $name => $value) {\n if ($name !== 'internalDataObjectData') {\n $reflectionProperty = new \\ReflectionProperty($object, $name);\n if ($reflectionProperty->isPublic()) {\n $result[$name] = null;\n }\n }\n }\n $propertiesToEncode = [];\n if (isset($object->internalDataObjectData)) {\n foreach ($object->internalDataObjectData as $name => $value) {\n $result[substr($name, 1)] = null;\n if (substr($name, 0, 1) === 'p' && isset($value[7])) { // encodeInJSON is set\n $propertiesToEncode[substr($name, 1)] = true;\n }\n }\n }\n ksort($result);\n foreach ($result as $name => $null) {\n $value = $object instanceof \\ArrayAccess ? $object[$name] : (isset($object->$name) ? $object->$name : null);\n if (method_exists($value, 'toJSON')) {\n $result[$name] = $value->toJSON();\n } else {\n if ($value instanceof \\DateTime) {\n $value = $value->format('c');\n }\n if (isset($propertiesToEncode[$name]) && $value !== null) {\n if (is_string($value)) {\n $value = 'data:;base64,' . base64_encode($value);\n } else {\n throw new \\Exception('The value of the ' . $name . ' property cannot be JSON encoded. It must be of type string!');\n }\n }\n $result[$name] = json_encode($value);\n if ($result[$name] === false) {\n throw new \\Exception('Invalid characters in ' . $name . '! Cannot JSON encode the value: ' . print_r($value, true));\n }\n }\n }\n $json = '';\n foreach ($result as $name => $value) {\n $json .= '\"' . addcslashes($name, '\"\\\\') . '\":' . $value . ',';\n }\n $json = '{' . rtrim($json, ',') . '}';\n return $json;\n };\n\n $json = '';\n foreach ($this->data as $index => $object) {\n $object = $this->updateValueIfNeeded($this->data, $index);\n if (method_exists($object, 'toJSON')) {\n $json .= $object->toJSON() . ',';\n } else {\n $json .= $toJSON($object) . ',';\n }\n }\n $json = '[' . rtrim($json, ',') . ']';\n return $json;\n }"
] | [
"0.76529354",
"0.69340897",
"0.687526",
"0.6444655",
"0.6444655",
"0.6444526",
"0.6444526",
"0.6444526",
"0.6444526",
"0.6444526",
"0.6444526",
"0.6431026",
"0.6431026",
"0.6431026",
"0.6409894",
"0.6346356",
"0.63043797",
"0.6257019",
"0.6257019",
"0.6253273",
"0.6253273",
"0.62363064",
"0.6235182",
"0.6195867",
"0.6154371",
"0.6142061",
"0.6116429",
"0.6116429",
"0.6093309",
"0.6025086",
"0.60070634",
"0.59944975",
"0.5958174",
"0.5958146",
"0.5957189",
"0.5957079",
"0.5957079",
"0.5957079",
"0.5953601",
"0.5951552",
"0.5942478",
"0.593047",
"0.59282506",
"0.58802134",
"0.5876314",
"0.5861396",
"0.5842872",
"0.5829362",
"0.5814061",
"0.58083844",
"0.5793423",
"0.57429475",
"0.5733619",
"0.57256514",
"0.57246137",
"0.57019114",
"0.5691338",
"0.5686584",
"0.5684855",
"0.5684855",
"0.56633866",
"0.5662399",
"0.56510717",
"0.5606288",
"0.5605111",
"0.5584624",
"0.55791456",
"0.5575429",
"0.5572677",
"0.5571224",
"0.55553806",
"0.5547187",
"0.55255276",
"0.5517767",
"0.55166054",
"0.5511724",
"0.5499337",
"0.5498689",
"0.54939914",
"0.54887193",
"0.5485449",
"0.5463623",
"0.5450795",
"0.5443278",
"0.54350626",
"0.54282904",
"0.54192644",
"0.54128224",
"0.54109365",
"0.5399438",
"0.53818446",
"0.5380949",
"0.5380367",
"0.5372829",
"0.5361632",
"0.5358456",
"0.53560096",
"0.5353995",
"0.53443295",
"0.5335866",
"0.53294796"
] | 0.0 | -1 |
Returns the value, in the format it should be encoded for JSON. This method must always return an array. | public function getJsonValue()
{
return $this->getParts();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function value_get(){\n\t\t\n\t\tif ( is_serialized( $this->value ) ) {\n\t\t\t$this->value = unserialize( $this->value );\n\t\t} elseif ( is_string( $this->value ) && 0 === strpos( $this->value, '{' ) && is_object( $_value = json_decode( $this->value ) ) ) {\n\t\t\t$this->value = (array) $_value;\n\t\t}\n\n\t\treturn $this->value;\n\t\t\n\t}",
"public function jsonSerialize() {\n return json_encode($this->value);\n }",
"public function jsonSerialize()\n {\n return $this->getValue();\n }",
"public function getValue()\n {\n if ($this->isArrayField()) {\n return json_decode($this->value);\n }\n return $this->value;\n }",
"public function jsonSerialize(): array\n {\n return $this->values;\n }",
"public function jsonSerialize(): mixed {\n\t\t\treturn $this->toArray();\n\t\t}",
"function jsonSerialize() {\n return $this->asArray();\n }",
"public function jsonSerialize(): mixed\n {\n return $this->toArray();\n }",
"public function jsonSerialize(): mixed\n {\n return $this->toArray();\n }",
"public function GetJson(): string\n {\n $json = json_encode($this->GetArray());\n if ($json == false) Error(\"GetJson failed\");\n\n return $json;\n }",
"function jsonSerialize()\r\n {\r\n return $this->to_array();\r\n }",
"public function _format_value($value)\n\t\t{\n\n\t\t\t$data = array();\n\n\t\t\tif ( is_array( $value ) && count( $value ) > 0 ) {\n\t\t\t\tforeach ( $value as $k => $v ) {\n\t\t\t\t\t$data[] = json_decode( $v, true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $data;\n\n\t\t}",
"public function Encode()\r\n {\r\n if (!is_array($this->data))\r\n {\r\n $this->data = array();\r\n }\r\n return json_encode($this->data);\r\n }",
"function asJSON(){\n\t\t\treturn json_encode($this->asArray());\n\t\t}",
"function jsonSerialize()\n {\n return $this->to_array();\n }",
"public function asJson(): string\n {\n return json_encode($this->asArray());\n }",
"public function getValue(): array {\n\t\t\treturn $this->value;\n\t\t}",
"public function jsonSerialize() {\n\t\treturn $this->toArray();\n\t}",
"public function jsonSerialize(): array;",
"public function jsonSerialize()\r\n {\r\n return $this->toArray();\r\n }",
"public function getJsonData() {\n\t\treturn FormatJson::decode( $this->getNativeData(), true );\n\t}",
"private function json()\n {\n return json_encode($this->data);\n }",
"public function getValue()\n {\n $value = $this->value;\n $attribute = $this->getAttribute();\n if ($attribute->getFieldTypeChoiceType()) {\n if ($value) {\n $value = json_decode($value);\n } else {\n $value = [];\n }\n }\n\n return $value;\n }",
"private function asJson($value)\n {\n return json_encode($value);\n }",
"protected function asJson($value)\n {\n return json_encode($value);\n }",
"protected function asJson($value)\n {\n return json_encode($value);\n }",
"public function jsonize()\n {\n return json_encode($this->toArray());\n }",
"public function jsonSerialize() {\n return $this->toArray();\n }",
"public function toJSON() {\n return json_encode($this->_values);\n }",
"public function jsonSerialize()\n {\n $json = array();\n foreach ($this as $key => $value) {\n if ($value) {\n $json[$key] = $value;\n }\n }\n return $json;\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function __toString()\n {\n if (is_array($this->value)) {\n return (string)json_encode($this->value);\n }\n return (string)$this->value;\n }",
"public function jsonEncode()\n {\n return json_encode($this->activeValue);\n }",
"public function asJson()\n {\n return array();\n }",
"public function getAsArray(): array\n {\n return \\GuzzleHttp\\json_decode(\\GuzzleHttp\\json_encode($this->values), true);\n }",
"public function jsonSerialize()\n {\n return [\n \"type\" => \"VALUE\",\n \"config\" => new stdClass,\n ];\n }",
"public function toJson(): array | string\n {\n /** @var PrimitiveSerializer $serializer */\n $serializer = radix()->get(PrimitiveSerializer::class);\n return $serializer->toJson($this);\n }",
"function jsonSerialize()\n {\n return $this->toArray();\n }",
"function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function toJSONString(){\n $this->buildArray();\n return json_encode($this->array);\n }",
"public function jsonSerialize() {\n\t\treturn [\n\t\t\t'label' => $this->label,\n\t\t\t'value' => $this->value,\n\t\t\t'icon' => $this->get_icon(),\n\t\t];\n\t}",
"public function toJson()\n {\n return json_encode($this->toArray(), JSON_FORCE_OBJECT | JSON_NUMERIC_CHECK);\n }",
"public function jsonSerialize () {\n\t\t\treturn array('value' => $this->__toString(), 'id' => $this->intId );\n\t\t}",
"public function jsonSerialize () {\n\t\t\treturn array('value' => $this->__toString(), 'id' => $this->intId );\n\t\t}",
"public function getJsonArray()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}",
"public function getValue()\n {\n return self::decodeValue($this->value);\n }",
"public static function toJsonValue($value) {\n if (is_object($value)) {\n $ret = static::objectToString($value);\n } elseif (is_resource($value)) {\n $ret = static::resourceToString($value);\n } elseif (is_array($value)) {\n $ret = array();\n foreach ($value as $key => $sub) {\n $ret[$key] = static::toJsonValue($sub);\n }\n } else {\n $ret = $value;\n }\n //$c[$n] = strval($v);\n return $ret;\n }",
"public function jsonSerialize()\n {\n // TODO: Implement jsonSerialize() method.\n return $this->toArray();\n }",
"public function getJSON()\n {\n return json_encode($this->getJSONObject());\n }",
"protected function getValueAsArray()\n {\n if(strpos($this->value, '|') > 1){\n $values = array_filter(explode(\"|\", $this->value));\n } else {\n $values = [$this->value];\n }\n return $values;\n }",
"public function serialize()\r\n\t{\r\n\t\treturn $this->getJSONString();\r\n\t}",
"public function getJSON()\r\n\t{\r\n\t\treturn $this->getJSONString();\r\n\t}",
"public function jsonSerialize()\n {\n return $this->get();\n }",
"final public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function json_encode() {\n try{\n return json_encode((array)array_values(self::get_items()));\n }catch(Exception $e){\n throw $e;\n }\n }",
"#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize() : array\n {\n return $this->entries;\n }",
"public function get_json()\n {\n return $this->_json;\n }",
"public function json()\n\t{\n\t\t$data = [\n\t\t\t'totalResults' => '3',\n\t\t\t'values' => [\n\t\t\t\t['name' => 'John', 'age' => 30],\n\t\t\t\t['name' => 'Mary', 'age' => 24],\n\t\t\t\t['name' => 'Petter', 'age' => 18],\n\t\t\t],\n\t\t];\n\n\t\treturn $data;\n\t}",
"public function jsonSerialize()\n {\n $this->present();\n\n return $this->data;\n }",
"public function getJSON()\n {\n return json_encode($this->getVars());\n }",
"public function jsonSerialize()\n {\n $json = array();\n foreach ($this as $key => $value) {\n if ($value===null) {\n continue;\n }\n $json[$key] = $value;\n }\n return $json;\n }",
"public function getJSON(){\n\t\treturn $this->json;\n\t}",
"public function getValue()\r\n\t{\r\n\t\treturn $this->getValues(true);\r\n\t}",
"function format_value( $value, $post_id, $field )\n\t\t{\n\n\t\t\tif(is_array($value)) {\n\t\t\t\t$array = array();\n\n\t\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t\t$array[$k] = json_decode( $v, true );\n\t\t\t\t}\n\n\t\t\t\treturn $array;\n\t\t\t}\n\n\t\t}",
"public function jsonSerialize()\n {\n return [\n \"str\"=>$this->getStr(),\n 'total' => $this->getTotal()\n ];\n }",
"public function getArrayResp()\n {\n return json_decode(Yii::$app->request->post(), false);\n }",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->tinydb_get_serializable_data();\n }",
"public function toString()\n {\n // if array is set return json encoded array\n if (!empty($this->array))\n {\n return json_encode($this->array);\n }\n \n // array not set yet\n return false;\n }",
"public function jsonSerialize()\n {\n $json = array();\n foreach($this as $key => $value) {\n $json[$key] = $value;\n }\n return $json; // or json_encode($json)\n }",
"public function json_serialize() {\n\t\t$items = $this->to_array();\n\n\t\tforeach ( $items as $key => $value ) {\n\t\t\tif ( $value instanceof Jsonable ) {\n\t\t\t\t$items[$key] = $value->json_serialize();\n\t\t\t}\n\t\t}\n\n\t\treturn $items;\n\t}",
"public function jsonSerialize()\n {\n if (method_exists($this, 'toArray')) {\n return $this->toArray();\n }\n\n return [];\n }",
"public function toJson(): string\n {\n return json_encode($this->toArray(), JSON_THROW_ON_ERROR | JSON_FORCE_OBJECT | JSON_INVALID_UTF8_IGNORE);\n }",
"public function jsonSerialize()\n {\n return [\n 'productId' => $this->productId,\n 'cycles' => $this->cycles,\n 'cycleType' => $this->cycleType,\n 'quantity' => $this->quantity\n ];\n }"
] | [
"0.7743304",
"0.76842266",
"0.7643654",
"0.76153016",
"0.7302808",
"0.72030026",
"0.7165669",
"0.7065285",
"0.7065285",
"0.7038927",
"0.69276077",
"0.6926736",
"0.69221723",
"0.6909973",
"0.689058",
"0.6867859",
"0.684111",
"0.6819488",
"0.6817244",
"0.68010044",
"0.6799306",
"0.6769906",
"0.6769519",
"0.67646253",
"0.6760971",
"0.6760971",
"0.6729061",
"0.6708751",
"0.6705879",
"0.6687597",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.66850173",
"0.6670378",
"0.6669809",
"0.665202",
"0.6649593",
"0.6624122",
"0.66049844",
"0.6601632",
"0.6601632",
"0.6599394",
"0.65806043",
"0.6578662",
"0.6565733",
"0.6565733",
"0.6554714",
"0.6552789",
"0.6532067",
"0.65036976",
"0.64946187",
"0.6493701",
"0.6489744",
"0.64881635",
"0.64878476",
"0.6466323",
"0.6464501",
"0.6454214",
"0.64498955",
"0.64122593",
"0.64104563",
"0.6408119",
"0.63968074",
"0.6393041",
"0.63884526",
"0.6379299",
"0.63675517",
"0.63664174",
"0.6359961",
"0.6352973",
"0.6352973",
"0.6352973",
"0.6352973",
"0.6352973",
"0.6339893",
"0.63360983",
"0.63343894",
"0.6322539",
"0.63182354",
"0.63128126",
"0.6311335"
] | 0.70048726 | 10 |
Sets the JSON value, as it would appear in a jCard or jCal object. The value must always be an array. | public function setJsonValue(array $value)
{
if (1 === count($value)) {
$this->setValue(reset($value));
} else {
$this->setValue($value);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function set( $jsonArray ){\n $this->json = $jsonArray;\n }",
"public function setValues(?Json $value): void {\n $this->getBackingStore()->set('values', $value);\n }",
"protected function value_set( $value ){\n\t\tif( is_array( $value ) ){\n\t\t\t$this->value = $value;\n\t\t}elseif( is_serialized( $value ) ){\n\t\t\t$this->value = unserialize( $value );\n\t\t}elseif( 0 === strpos( $value, '{' ) && is_object( $_value = json_decode( $value ) ) ){\n\t\t\t$this->value = (array) $_value;\n\t\t}else{\n\t\t\t$this->value = $value;\n\t\t}\n\t}",
"function set($value) {\n\t\tif (!is_array($value))\n\t\t\t$value = array($value);\n\t\treturn (empty($this->_data)) ? $this->_data = $value : $this->_data = array_merge($this->_data,$value);\n\t}",
"public function setValue($value){\n if(is_array($value)){\n $this->_data = $value;\n }else{\n throw new SmartestException(\"SmartestArray::setValue() expects an array; \".gettype($value).\" given.\");\n }\n }",
"public function setValue($value)\n {\n if ($this->isArrayField()) {\n $this->value = json_encode($value);\n } else {\n if (is_array($value)) $value = current($value);\n $this->value = $value;\n }\n return $this;\n }",
"public function setValue($value)\n {\n if (is_array($value)) {\n $value = json_encode($value);\n }\n $this->value = $value;\n\n return $this;\n }",
"protected function setDataAttribute($value)\n\t{\n\t\t$this->attributes['data'] = is_array($value) ? json_encode($value):$value;\n\t}",
"public function setDataAttribute($value)\n {\n $this->attributes['data'] = json_encode($value);\n }",
"protected function set($value) \n {\n return is_array($value) ? new ArrayOk($value) : $value;\n }",
"public function setJSON($data) {\n\t\t$this->json = $data;\n\t}",
"public function setJsonData($array) {\n $this->jsonData = $array;\n return $this;\n }",
"public function testSetValueOnUnNestedArray()\n {\n $model = $this->objFromFixture(MyAwesomeJSONModel::class, 'json-as-array');\n $expression = '$.[0]';\n $field = $model->dbObject('MyJSON');\n\n // Primary assertion (JSON as return type is the default)\n $this->assertEquals('[\"buick\"]', $field->query($expression));\n\n // Secondary assertion\n $field->setValue('ford', null, $expression);\n $model->setField('MyJSON', $field->getValue());\n $model->write();\n $this->assertEquals('[\"ford\"]', $field->query($expression));\n \n // With chaining\n $field\n ->setValue('chrysler', null, $expression)\n ->setReturnType('array');\n \n $model->setField('MyJSON', $field->getValue());\n $model->write();\n $this->assertEquals(['chrysler'], $field->query($expression));\n }",
"public function testSet($expected, $array, $path, $value)\n {\n $json = new JsonArray($array);\n\n $this->assertEquals($json, $json->set($path, $value));\n $this->assertEquals($expected, $json->getData());\n }",
"public function setValues(?array $value): void {\n $this->getBackingStore()->set('values', $value);\n }",
"public function setValues(?array $value): void {\n $this->getBackingStore()->set('values', $value);\n }",
"public function testSetValueOnNestedArray()\n {\n $model = $this->objFromFixture(MyAwesomeJSONModel::class, 'json-as-object');\n $expression = '$.cars.american.[0]';\n $field = $model->dbObject('MyJSON');\n\n // Primary assertion (JSON as return type is the default)\n $this->assertEquals('[\"buick\"]', $field->query($expression));\n \n // How about now?\n $field->setValue('ford', null, $expression);\n $model->setField('MyJSON', $field->getValue());\n $model->write();\n $this->assertEquals('[\"ford\"]', $field->query($expression));\n\n // Secondary assertion\n $field\n ->setValue('chrysler', null, $expression)\n ->setReturnType('array');\n\n // With chaining\n $model->setField('MyJSON', $field->getValue());\n $model->write();\n $this->assertEquals(['chrysler'], $field->query($expression));\n }",
"public function setFromArray(array $data);",
"protected function setJSON($json){\n\t\t$this->json = $json;\n\t}",
"function setScriptData($value){\n $this->_options['scriptData'][$this->getInputName()]=CJSON::encode($value);\n }",
"public function setFromArray(array &$_data);",
"public function setXmlValue(array $value)\n {\n $this->setJsonValue($value);\n }",
"function set($value) {\n\t\tif (!is_array($value))\n\t\t\t$value = array (\n\t\t\t\t$value => TRUE\n\t\t\t);\n\t\treturn (empty ($this->_session['data'])) ? \n\t\t\t$this->_session['data'] = $value : \n\t\t\t$this->_session['data'] = array_merge($this->_session['data'], $value);\n\t}",
"public function setArray($array){\n $this->array=$array;\n }",
"public function setItems(?array $value): void {\n $this->getBackingStore()->set('items', $value);\n }",
"public function __set( $name, $value )\n\t\t{\n\t\t\tif ( isset ( $this->data[ $name ] ) && is_array( $this->data[ $name ] ) ) {\n\t\t\t\t$this->data[ $name ] = array_merge( $this->data[ $name ], $value );\n\t\t\t} else {\n\t\t\t\t$this->data[ $name ] = $value;\n\t\t\t}\n\t\t}",
"public function setCollection(array $value);",
"public function setJsonParameter($name, $value)\n {\n $this->json_parameters[$name] = $value;\n }",
"public function setValue(array &$array, $value)\n\t{\n\t\tAgaviArrayPathDefinition::setValue($this->parts, $array, $value);\n\t}",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }",
"private function set_json(string $json)\n {\n $correct = (is_string($json) && is_array(json_decode($json, true)) && (json_last_error() == JSON_ERROR_NONE)) ? true : false;\n if($correct === true) {\n $this->_json = $json; \n }\n }",
"public function setImagesAttribute($value)\n {\n $this->attributes['images'] = is_array($value) ? json_encode($value, JSON_UNESCAPED_UNICODE) : '[]';\n }",
"function _wp_array_set(&$input_array, $path, $value = \\null)\n {\n }",
"public function setJsonData(array $data)\n {\n if (!empty($data)) {\n $this->data = json_encode($data);\n $this->headers = array_merge(\n $this->headers,\n [\n 'Content-Type' => 'application/json',\n 'Content-Length' => strlen($this->data)\n ]\n );\n\n curl_setopt($this->handler, CURLOPT_POSTFIELDS, $this->data);\n }\n }",
"public function setValue($value) {\n\t\t$originalValue = $value;\n\t\tif (is_array($value));\n\t\telseif (is_string($value)||is_numeric($value)) {\n\t\t\t$value = array($value);\n\t\t}\n\t\telse {\n\t\t\t$value = null;\n\t\t}\n\n\t\t$arrayValue = $value;\n\t\t$value = array_intersect($value, $this->validValues);\n\t\tif (array_diff($arrayValue, $value)) {\n\t\t\t$value = null;\n\t\t}\n\t\treturn $value;\n\t}",
"public function set_json( array $json ): Schema {\n\t\tif ( ! empty( $this->json ) ) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t$this->json = $json;\n\t\t$this->init();\n\t\treturn $this;\n\t}",
"public function setData(\n array $value)\n {\n $this->_cache = $value;\n\n $newObjectData = [];\n foreach ($this->_cache as $k => $v) {\n $newObjectData[$k] = is_object($v) && $v instanceof LazyJsonMapper\n ? $v->asArray() // Throws.\n : $v; // Is already a valid value.\n }\n\n $this->assignObjectData($newObjectData); // Throws.\n\n return $this;\n }",
"public function setData() \n {\n $serverNames = [];\n foreach($this->_jsonRequestedArr as $k=>$obj) {\n $serverNames[] = $obj->s_system;\n }\n $this->_jsonResponseArr[\"server_list\"] = $serverNames;\n }",
"public function setArray(array $list);",
"public function setData($key, $value = null)\n {\n\n if (is_string($key))\n $this->data = json_decode($key);\n else\n $this->data = $key;\n\n }",
"function set($field_or_array,$value=undefined){\n\t\tif($value===undefined){\n\t\t\tif(is_array($field_or_array)){\n\t\t\t\tforeach($field_or_array as $key=>$val){\n\t\t\t\t\t$this->set($key,$val);\n\t\t\t\t}\n\t\t\t\treturn $this;\n\t\t\t}else{\n\t\t\t\t$value=$field_or_array;\n\t\t\t\t$field_or_array=$this->last_field;\n\t\t\t}\n\t\t}\n\n\t\t// Do not set unexistant fields\n\t\tif(!isset($this->fields[$field_or_array])){echo \"warning: no such field $field_or_array\";}\n\t\t$this->data[$field_or_array]=$value;\n\n\t\treturn $this;\n\t}",
"protected function setData(array $data)\n\t{\n\t\t$this->json_data = $data;\n\t}",
"public function set($key, $value)\n\t{\n\t\tif (is_array($value))\n\t\t{\n\t\t\t$this->_object[$key] = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_object[$key] = $value;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public function sanitize_value(){\n if(is_string($this->value)){\n $json_value = json_decode($this->value, true);\n if(json_last_error() == JSON_ERROR_NONE)\n $this->value = $json_value;\n }\n }",
"public function sanitize_value(){\n if(is_string($this->value)){\n $json_value = json_decode($this->value, true);\n if(json_last_error() == JSON_ERROR_NONE)\n $this->value = $json_value;\n }\n }",
"public function setFotoAttribute($value)\n {\n $this->attributes['foto'] = json_encode($value);\n }",
"public function setExtrasAttribute($value)\n {\n $value = json_decode($value);\n\n // Image\n if (isset($value->image)) {\n\n $result = $this->saveImage($this, $value->image, 'pages/', 'arraiolos', 1280, 90);\n\n $value->image = $result;\n\n unset($this->attributes['image']);\n }\n\n $this->attributes['extras'] = json_encode($value);\n }",
"public function setOptionsAttribute($value)\n {\n $this->attributes['options'] = json_encode($value);\n }",
"public function setData($value) : Job\n {\n $this->validateJson($value);\n\n if ($this->data['data'] !== $value) {\n $this->data['data'] = $value;\n $this->setModified('data');\n }\n\n return $this;\n }",
"public function setValueByArray($a_value) {\n\t\tforeach ((array) $this->select_inputs as $postvar => $values)\n\t\t\t$this->select_inputs[$postvar][\"selected\"] = $a_value[$postvar];\n\t}",
"private function setFromArray($data, $jsondecode = false) {\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\tif ($jsondecode && in_array($key, static::$_json_fields)) {\n\t\t\t\t\t$value = json_decode($value, true);\n\t\t\t\t}\n\t\t\t\t$this->setData($key, $value);\n\t\t\t}\n\t\t}",
"public function set( $key, $value = null )\n\t{\n\t\tif ( is_array( $key ) )\n\t\t\tforeach ( $key as $innerKey => $innerValue )\n\t\t\t\tArr::set( $this->items, $innerKey, $innerValue );\n\t\telse\n\t\t\tArr::set( $this->items, $key, $value );\n\t}",
"public function _format_value($value)\n\t\t{\n\n\t\t\t$data = array();\n\n\t\t\tif ( is_array( $value ) && count( $value ) > 0 ) {\n\t\t\t\tforeach ( $value as $k => $v ) {\n\t\t\t\t\t$data[] = json_decode( $v, true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $data;\n\n\t\t}",
"public function setFiltersAttribute($value) {\n $this->attributes['filters'] = json_encode($value);\n }",
"public function setMaximum(?Json $value): void {\n $this->getBackingStore()->set('maximum', $value);\n }",
"public function setValue($value)\n\t{\n\t\tif(is_array($value))\n\t\t{\n\t\t\t$this->setStart(new ilDateTime($value['start'], IL_CAL_UNIX));\n\t\t\t$this->setEnd(new ilDateTime($value['end'], IL_CAL_UNIX));\n\t\t}\n\t}",
"public function setIssuesAttribute($value)\n {\n $this->attributes['issues'] = json_encode($value, JSON_UNESCAPED_UNICODE);\n }",
"private function setMultiArray($responseContent)\n {\n $jsonResponseContent = json_decode($responseContent, true);\n $error = json_last_error();\n if ($error) {\n print_r($responseContent);\n throw new InvalidArgumentException('Invalid json provided');\n }\n $this->responseBody = new MultiArray($jsonResponseContent);\n }",
"function setValue(&$value) {\n if (!is_array($value) || count($value) != 4) {\n trigger_error(\"Array of four PdfNumericType values only accepted\\n\" . var_export($value, true), E_USER_ERROR);\n }\n $this->_value = & $value;\n }",
"public function setGenresAttribute($value)\n {\n $this->attributes['genres'] = json_encode($value);\n }",
"function add_json($json, $array)\n{\n\t// convert to array\n\t$json = json_decode($json, TRUE);\n\t// add to array\n\t$json = add_array($json, $array);\n\t// convert to json string\t\n\treturn json_encode($json);\n}",
"public function setValue(array $arr){\r\n $this->_valores = $arr;\r\n }",
"public function setPreviewImgAttribute($value)\n {\n $this->attributes['preview_img'] = (is_string($value) && is_array(json_decode($value, true)))\n ? $value\n : json_encode($value); \n }",
"public function SetArray(string $key, array $value) : void\r\n\t{\r\n\t\t$this->Set($key, $value);\r\n\t}",
"protected function encodeData(array $value) {\n\t\treturn wireEncodeJSON($value); \n\t}",
"public function setIsArray($flag = true)\n {\n $this->_isArray = (bool) $flag;\n }",
"public function setResponseCustomData($value)\n {\n $this->_responseCustomData = $value;\n }",
"function setValue($value) {\n $values = (array) $value;\n foreach ($values as $onevalue) {\n if (($this->tags || $this->ajax) &&\n (!$this->optionExists($onevalue)) &&\n ($onevalue !== '_qf__force_multiselect_submission')) {\n $this->addOption($onevalue, $onevalue);\n }\n }\n return parent::setValue($value);\n }",
"function setArray($array) {\n\t\tif ($array['idSemesters'])\n\t\t\t$this->idSemesters = $array['idSemesters'];\n\t\tif ($array['date'])\n\t\t\t$this->date = $array['date'];\n\t\tif ($array['timeStart'])\n\t\t\t$this->timeStart = $array['timeStart'];\n\t\tif ($array['timeEnd'])\n\t\t\t$this->timeEnd = $array['timeEnd'];\n\n\t\t$this->_modified = true;\n\t}",
"public function offsetSet($key, $value): void\n {\n if (is_array($this->_data)) {\n $value = $this->in($value, $key, 'array');\n $this->_data[$key] = $value;\n } elseif ($this->_data instanceof \\ArrayAccess) {\n $value = $this->in($value, $key, 'array');\n $this->_data[$key] = $value;\n } else {\n throw new \\Exception('Cannot use object of type ' . get_class($this->_data) . ' as array');\n }\n }",
"public function setDataContent($content)\n {\n if (is_array($content)) {\n $this->headers->set('Content-Type', 'application/json');\n $content = json_encode($content);\n }\n\n $this->setContent($content);\n }",
"public function setJson($json)\n {\n $this->data = $json;\n\n return $this->update();\n }",
"public function setArray($data)\n {\n return $this->importArray($data);\n }",
"public function setValue($value)\n {\n $value = arr::get($value, 'value', NULL);\n\n if ($value !== NULL)\n {\n //pokud prisla prazdna hodnota, tak do modelu ukladam NULL\n if (empty($value))\n {\n $value = NULL;\n }\n\n parent::setValue($value);\n }\n }",
"public function setArray(array $array)\n {\n $this->array = $array;\n }"
] | [
"0.729661",
"0.7109855",
"0.7032107",
"0.70055914",
"0.67830986",
"0.6608558",
"0.6507313",
"0.64080405",
"0.6338523",
"0.6332766",
"0.63161224",
"0.61894107",
"0.61474985",
"0.61061877",
"0.60441905",
"0.60441905",
"0.60261565",
"0.6008471",
"0.59848577",
"0.59161085",
"0.59074825",
"0.58986896",
"0.58816344",
"0.58791846",
"0.5833744",
"0.58142376",
"0.58035773",
"0.57914287",
"0.5783086",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.57805943",
"0.574012",
"0.5709472",
"0.57034874",
"0.5683762",
"0.5663704",
"0.56455076",
"0.56279343",
"0.5618836",
"0.56142867",
"0.5598772",
"0.5582548",
"0.5580029",
"0.5573757",
"0.5569403",
"0.5569403",
"0.5569384",
"0.55634284",
"0.5552318",
"0.55297405",
"0.5505292",
"0.5504415",
"0.5496338",
"0.54685104",
"0.5466541",
"0.5463833",
"0.5454017",
"0.5445864",
"0.5442535",
"0.54373825",
"0.54250276",
"0.5419867",
"0.5410149",
"0.54010224",
"0.53988975",
"0.53982884",
"0.53883046",
"0.53863806",
"0.5382308",
"0.5372438",
"0.53646165",
"0.53538626",
"0.5347045",
"0.5337808",
"0.53227603",
"0.5320407"
] | 0.78336257 | 0 |
This method returns an array, with the representation as it should be encoded in JSON. This is used to create jCard or jCal documents. | public function jsonSerialize()
{
$parameters = [];
foreach ($this->parameters as $parameter) {
if ('VALUE' === $parameter->name) {
continue;
}
$parameters[strtolower($parameter->name)] = $parameter->jsonSerialize();
}
// In jCard, we need to encode the property-group as a separate 'group'
// parameter.
if ($this->group) {
$parameters['group'] = $this->group;
}
return array_merge(
[
strtolower($this->name),
(object) $parameters,
strtolower($this->getValueType()),
],
$this->getJsonValue()
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toJsonArray()\n {\n return array(\n 'id' => $this->getId(),\n 'date_created' => $this->getDateCreated()->getTimestamp(),\n 'content' => $this->getContent(),\n );\n }",
"function jsonSerialize() {\n return $this->asArray();\n }",
"public function jsonSerialize()\n {\n return [\n 'cards' => $this->cards,\n 'size' => $this->size,\n 'isClickable' => $this->isClickable\n ];\n }",
"public function asJson()\n {\n return array();\n }",
"function jsonSerialize()\r\n {\r\n return $this->to_array();\r\n }",
"function jsonSerialize()\n {\n return $this->to_array();\n }",
"public function jsonSerialize() :Array\n {\n return [\n 'questionId' => $this->questionId(),\n 'user' => $this->user,\n 'title' => $this->title,\n 'body' =>$this->body,\n 'tag' => $this->tags,\n 'datePublished'=>$this->datePublished\n ];\n }",
"public function jsonSerialize() : array {\n\t\t\t\treturn [\n\t\t\t\t\t'id' => $this->getId(),\n\t\t\t\t\t'cep' => $this->getCep(),\n\t\t\t\t\t'bairro' => $this->getBairro(),\n\t\t\t\t\t'cidade' => $this->getCidade(),\n\t\t\t\t\t'rua' => $this->getRua(),\n\t\t\t\t\t'estado' => $this->getEstado(),\n\t\t\t\t];\n\t\t\t}",
"public function toArray()\n {\n return [\n 'type' => 'object',\n 'properties' => [\n 'email' => ['type' => 'string'],\n 'key' => ['type' => 'string'],\n 'name' => ['type' => 'string'],\n 'picture' => ['type' => 'string'],\n 'phone' => ['type' => 'string'],\n 'balance' => ['type' => 'integer', 'format' => 'int32'],\n 'codes' => ['type' => 'array', 'items' => ['type' => 'string']],\n 'order_comment_tracking_code' => ['type' => 'string'],\n 'title' => ['type' => 'string'],\n ],\n 'required' => ['email', 'key', 'name', 'phone', 'balance', 'codes', 'order_comment_tracking_code', 'title'],\n ];\n }",
"public function toJson(): array\n {\n return [\n 'title' => $this->getTitle(),\n 'description' => $this->getDescription(),\n 'price' => $this->formatPrice(),\n 'discount' => $this->formatDiscount(),\n ];\n }",
"public function jsonSerialize()\n {\n return [\n 'id' => $this->id,\n 'title' => $this->title,\n 'content' => $this->content,\n 'image' => $this->image,\n 'legend' => $this->legend,\n 'creationDate' => $this->creationDate\n ];\n }",
"public function toArray()\n\t{\n\t\treturn [\n\t\t\t'languages' => $this->getLanguages(),\n\t\t\t'views' => $this->getViews(),\n\t\t\t'currencies' => $this->getCurrencies(),\n\t\t\t'payment' => $this->getPayment(),\n\t\t\t'document' => $this->getDocument(),\n\t\t\t'callback' => $this->getCallback(),\n\t\t\t'captcha' => $this->getCaptcha(),\n\t\t\t'templates' => [],\n\t\t\t'personalization' => $this->getPersonalization(),\n\t\t\t'deps' => $this->getDeps(),\n\t\t\t'sign' => $this->getSign(),\n\t\t\t'restriction' => $this->getRestriction(),\n\t\t\t'product' => [\n\t\t\t\t'isCloud' => Crm\\Integration\\Bitrix24\\Product::isCloud(),\n\t\t\t\t'isRegionRussian' => Crm\\Integration\\Bitrix24\\Product::isRegionRussian(),\n\t\t\t]\n\t\t];\n\t}",
"public function jsonSerialize():array\n {\n $rv = [\n 'name' => $this->name,\n 'price' => $this->price,\n 'sidelength' => $this->sidelength,\n 'area' => $this->getArea(),\n 'specials' => $this->specials\n\n ];\n return $rv;\n }",
"public function jsonSerialize()\n {\n $arrayJson = array();\n foreach ($this as $key =>$value){\n if($key != 'document')\n $arrayJson[$key] = $value;\n }\n return $arrayJson;\n }",
"public function jsonSerialize()\n {\n return [\n 'fields' => $this->fields,\n 'entries' => $this->entries\n ];\n }",
"public function jsonSerialize(): array;",
"public function jsonSerialize(): array\n {\n Response::jsonField('name', $this->getName());\n Response::jsonField('in', $this->getIn());\n Response::jsonField('description', $this->getDescription());\n Response::jsonField('required', $this->isRequired());\n Response::jsonField('type', $this->getType());\n Response::jsonField('format', $this->getFormat());\n Response::jsonField('allowEmptyValue', $this->isAllowEmptyValue());\n Response::jsonField('collectionFormat', $this->getCollectionFormat());\n Response::jsonField('items', $this->getItems());\n Response::jsonField('schema', $this->getSchema());\n\n return Response::jsonSerialize($this);\n }",
"public function getArray() {\r\n \r\n $data = [\r\n \"id\" => $this->id,\r\n \"name\" => $this->name,\r\n \"description\" => $this->desc,\r\n \"url_file\" => $this->url_file,\r\n \"filename\" => $this->filename,\r\n \"filepath\" => $this->filepath,\r\n \"filesize\" => $this->filesize,\r\n \"mime\" => $this->mime,\r\n \"active\" => $this->active,\r\n \"approved\" => $this->approved,\r\n \"meta\" => $this->extra_data,\r\n \"date\" => $this->Date,\r\n \"author\" => $this->Author->getArray(),\r\n \"url\" => $this->url->getURLs(),\r\n \"thumbnail\" => $this->getThumbnail(),\r\n \"icon\" => $this->getIcon(),\r\n ];\r\n \r\n return $data;\r\n \r\n }",
"public function jsonSerialize()\r\n {\r\n return $this->toArray();\r\n }",
"public function jsonSerialize()\n {\n if (method_exists($this, 'toArray')) {\n return $this->toArray();\n }\n\n return [];\n }",
"function asJSON(){\n\t\t\treturn json_encode($this->asArray());\n\t\t}",
"public function jsonSerialize() : array\n {\n return $this->entries;\n }",
"public function jsonSerialize() : array\n {\n return $this->all();\n }",
"public function jsonSerialize() {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'number' => $this->number,\n 'title' => $this->title,\n 'nextcall' => $this->nextcall,\n 'action' => $this->action,\n 'call_id' => $this->call_id,\n 'activity' => $this->activity,\n 'edited' => $this->edited,\n 'created' => $this->created\n ];\n }",
"public function jsonSerialize() {\n\t\treturn $this->toArray();\n\t}",
"public function toArray(): array\n {\n return [\n 'id' => intval($this->id),\n 'title' => strval($this->title),\n 'body' => strval($this->body),\n 'owner' => new UserResource($this->whenLoaded('owner')),\n 'children' => CommentResource::collection($this->whenLoaded('children')),\n 'created_at' => strval($this->created_at),\n 'updated_at' => strval($this->updated_at),\n ];\n }",
"public function jsonSerialize()\n {\n $array = [\n 'dynamicallyCreateResources' => $this->dynamicallyCreateResources,\n 'accessControl' => $this->accessControl,\n 'propertyTitle' => $this->propertyTitle\n ];\n\n // build pricing groups\n $pricingGroupsArray = [];\n $pricingGroups = $this->pricingGroups;\n usort($pricingGroups, function(PricingGroup $pricingGroupA, PricingGroup $pricingGroupB) {\n return $pricingGroupA->isDefault() ? -1 : 1;\n });\n /** @var \\iMoneza\\Data\\PricingGroup $pricingGroup */\n foreach ($pricingGroups as $pricingGroup) {\n $pricingGroupsArray[] = ['pricingGroupID'=>$pricingGroup->getPricingGroupID(), 'name' => $pricingGroup->getName()];\n }\n\n $array['pricingGroups'] = $pricingGroupsArray;\n\n return $array;\n }",
"function jsonSerialize()\n {\n return $this->toArray();\n }",
"function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize() {\r\r\n $array = [\r\r\n 'idLunch' => $this->getIdLunch(),\r\r\n 'oneEnterprise' => $this->getOneEnterprise()->getIdEnterprise(), \r\r\n 'onePurchasingFair' => $this->getOnePurchasingFair()->getIdPurchasingFair(), \r\r\n 'lunchesPlanned' => $this->getLunchesPlanned(), \r\r\n 'lunchesCanceled' => $this->getLunchesCanceled(), \r\r\n 'lunchesDetails' => $this->getLunchesDetails(),\r\r\n 'idParticipant' => $this->getIdParticipant()\r\r\n ];\r\r\n return $array;\r\r\n }",
"public function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'title' => $this->title,\n 'description' => $this->description,\n 'blacklist_expiration_time' => $this->blacklist_expiration_time,\n 'validation' => $this->validation,\n 'nextcall' => $this->nextcall,\n 'color' => $this->color\n ];\n }",
"public function toArray(): array\n\t{\n\t\treturn [\n\t\t\t'languages' => $this->getLanguages(),\n\t\t\t'views' => $this->getViews(),\n\t\t\t'catalog' => [\n\t\t\t\t'id' => \\CAllCrmCatalog::EnsureDefaultExists(),\n\t\t\t\t'currencies' => $this->getCurrencies(),\n\t\t\t],\n\t\t\t'payment' => $this->getPayment(),\n\t\t\t'document' => $this->getDocument(),\n\t\t\t'callback' => $this->getCallback(),\n\t\t\t'whatsapp' => $this->getWhatsApp(),\n\t\t\t'captcha' => $this->getCaptcha(),\n\t\t\t'templates' => [],\n\t\t\t'personalization' => $this->getPersonalization(),\n\t\t\t'properties' => $this->getProperties(),\n\t\t\t'deps' => $this->getDeps(),\n\t\t\t'sign' => $this->getSign(),\n\t\t\t'restriction' => $this->getRestriction(),\n\t\t\t'product' => [\n\t\t\t\t'isCloud' => Crm\\Integration\\Bitrix24\\Product::isCloud(),\n\t\t\t\t'isRegionRussian' => Crm\\Integration\\Bitrix24\\Product::isRegionRussian(),\n\t\t\t],\n\t\t\t'contentTypes' => [\n\t\t\t\t['id' => 'image/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_IMAGE')],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'x-bx/doc',\n\t\t\t\t\t'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_DOC_MSGVER_1'),\n\t\t\t\t\t'hint' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_DOC_HINT'),\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'x-bx/arc',\n\t\t\t\t\t'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_ARCHIVE'),\n\t\t\t\t\t'hint' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_ARCHIVE_HINT'),\n\t\t\t\t],\n\t\t\t\t['id' => 'audio/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_AUDIO')],\n\t\t\t\t['id' => 'video/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_VIDEO')],\n\t\t\t],\n\t\t\t'defaultMaxFileFieldSizeMbValue' => Main\\Config\\Option::get('crm', '~webform_default_max_file_field_size_mb', 1000),\n\t\t\t'dailyFileLimitSizeMbValue' => WebForm\\Limitations\\DailyFileUploadLimit::instance()->getLimit(),\n\t\t\t'integration' => $this->getIntegration(),\n\t\t\t'scenarios' => Main\\DI\\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getScenarioList(),\n\t\t\t'scenarioCategories' => Main\\DI\\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getScenarioCategoryList(),\n\t\t\t'sidebarButtons' => Main\\DI\\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getSidebarMenuItems(),\n\t\t];\n\t}",
"public function jsonSerialize(): array\n {\n return array_merge(parent::jsonSerialize(), [\n 'cropable' => $this->cropable,\n 'ratio' => $this->ratio,\n 'size' => $this->size,\n ]);\n }",
"public function jsonSerialize()\n {\n return array(\n \"id\" => $this->id,\n \"manufacturer\" => $this->manufacturer,\n \"model\" => $this->model,\n \"plateNumber\" => $this->plateNumber,\n );\n }",
"public function jsonSerialize()\n {\n return array_merge(parent::jsonSerialize(),[]);\n }",
"public function toArray()\n {\n $payload = [];\n\n if (!isset($this->title)) {\n throw CouldNotCreateCard::titleNotProvided();\n }\n $payload['title'] = $this->title;\n\n if (isset($this->item_url)) {\n $payload['item_url'] = $this->item_url;\n }\n\n if (isset($this->image_url)) {\n $payload['image_url'] = $this->image_url;\n }\n\n if (isset($this->subtitle)) {\n $payload['subtitle'] = $this->subtitle;\n }\n\n if (count($this->buttons) > 0) {\n $payload['buttons'] = $this->buttons;\n }\n\n return $payload;\n }",
"public function toArray()\n\t{\n\t\t$item = $this;\n\t\t$json_entry = array();\n\t\t$json_entry[\"id\"] = $item->id;\n\t\t$json_entry[\"title\"] = $item->product->title;\n\t\t$json_entry[\"image_file\"] = $item->product->getImage();\n\t\t$json_entry[\"price\"] = $item->getPrice();\n\t\t$json_entry[\"quantity\"] = $item->quantity;\n\n\t\treturn $json_entry;\n\t}",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize(): array\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return [\n 'productId' => $this->productId,\n 'cycles' => $this->cycles,\n 'cycleType' => $this->cycleType,\n 'quantity' => $this->quantity\n ];\n }",
"public function toArray()\n {\n return array(\n 'object' => StripeCard::STRIPE_OBJECT,\n 'exp_month' => $this->getExpMonth(),\n 'exp_year' => $this->getExpYear(),\n 'number' => $this->getNumber(),\n 'address_city' => $this->getCity(),\n 'address_country' => $this->getCountry(),\n 'address_line1' => $this->getAddressLine1(),\n 'address_line2' => $this->getAddressLine2(),\n 'address_state' => $this->getState(),\n 'address_zip' => $this->getZip(),\n 'cvc' => $this->getCvc(),\n 'name' => $this->getCardholder()\n );\n }",
"public function toArray() {\n return json_decode(json_encode($this), true);\n }",
"public function jsonSerialize(): array\n {\n return [\n 'tags' => $this->tags,\n 'duration' => $this->duration,\n 'mimeType' => $this->mimeType,\n ];\n }",
"public function jsonSerialize()\n {\n $json = array();\n $json['doc'] = $this->doc;\n\n return $json;\n }",
"public function jsonSerialize()\n {\n return [\n 'id' => $this->getId(),\n 'done' => $this->getDone(),\n 'title' => $this->getTitle(),\n 'author' => $this->getAuthor()->getId(),\n ];\n }",
"public function jsonSerialize()\r\n {\r\n return array_merge(parent::jsonSerialize(), []);\r\n }",
"public function toArray()\n {\n $id = $this->getId();\n $name = $this->getName();\n $sex = $this->getSex();\n $id_number = $this->getIdNumber();\n $token = $this->getToken();\n $address = $this->getAddress();\n\n return array(\n 'id' => $id,\n 'name' => $name,\n 'sex' => $sex,\n 'id_number' => $id_number,\n 'token' => $token,\n 'address' => $address\n );\n }",
"public function jsonSerialize() {\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'name' => $this->getName(),\n\t\t\t'url' => $this->getUrl(),\n\t\t\t'description' => $this->getDescription(),\n\t\t];\n\t}",
"public function toArray()\n {\n return [\n 'title' => $this->title,\n 'body' => $this->body,\n 'sound' => $this->sound,\n 'badge' => $this->badge,\n 'ttl' => $this->ttl,\n 'channelId' => $this->channelId,\n 'data' => empty($this->jsonData) ? '{}' : json_encode($this->jsonData),\n ];\n }",
"public function jsonSerialize()\n {\n return [\n 'id'=> $this->getId(),\n 'title'=> $this->getTitle(),\n 'image'=> $this->getImage(),\n 'content'=> $this->getContent(),\n 'date_added'=> $this->getDateAdded(),\n 'id_user'=> $this->getIdUser(),\n 'user'=> $this->user->getName(),\n ];\n }",
"public function jsonSerialize()\n {\n return array('title' => $this->title,\n 'size' => $this->size,\n 'unit_price' => $this->unitPrice,\n 'description' => $this->description);\n }",
"public function toArray()\n {\n return json_decode(json_encode($this), true);\n }",
"public function toArray()\n {\n return json_decode(json_encode($this), true);\n }",
"public function jsonSerialize()\n {\n return\n [\n 'cd_competencia_tecnica'=>$this->cd_competencia_tecnica,\n 'ds_competencia_tecnica'=>$this->ds_competencia_tecnica,\n 'nr_nivel'=>$this->nr_nivel\n ];\n }",
"final public function jsonSerialize()\n {\n return $this->toArray();\n }",
"public function jsonSerialize()\n {\n return [\n 'emp_no' => $this->emp_no,\n 'birth_date' => $this->getCustomData('birth_date'),\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n 'complet_name' => $this->first_name . ' ' . $this->last_name,\n 'gender' => $this->getGender(),\n 'hire_date' => $this->getCustomData('hire_date'),\n 'salary' => ($this->salary->salary) ?? 0,\n 'titles' => ($this->title->title) ?? '',\n 'departments' => (new DepartmentRepo())->getNames($this->departments)\n ];\n }",
"function jsonSerialize()\n\t{\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'metadata' => $this->getMetadata()\n\t\t];\n\t}",
"public function jsonSerialize()\n {\n $json = array();\n $json['liable'] = $this->liable;\n $json['charge_processing_fee'] = $this->chargeProcessingFee;\n\n return $json;\n }",
"function jsonSerialize()\n {\n return [\n 'start' => $this->start->format('d/m/Y h:i:s'),\n 'end' => $this->end->format('d/m/Y h:i:s'),\n 'description' => $this->description,\n 'questions' => $this->questions,\n ];\n }",
"public function jsonSerialize(): array\n {\n return $this->all();\n }",
"public function toArray(): array\n {\n return [\n 'amount' => $this->getAmount(),\n 'code' => $this->getCode(),\n 'description' => $this->getDescription(),\n 'notes' => $this->getNotes(),\n 'label' => $this->getLabel(),\n 'bankCountry' => $this->getBankCountry(),\n ];\n }",
"public function toArray()\n {\n return [\n 'id' => $this->getId(),\n 'amount' => [\n 'total' => $this->getTotal(),\n 'currency' => $this->getCurrency(),\n ],\n 'create_time' => $this->getCreateTime(),\n 'custom' => $this->getCustom(),\n 'state' => $this->getState(),\n 'invoice_number' => $this->getInvoiceNumber(),\n 'billing_agreement_id' => $this->getBillingAgreementId(),\n ];\n }",
"public function toArray()\n {\n return $this->getContent();\n }",
"public function formatToArray(){\n return [\n 'nombre' => $this->name,\n 'ciudad' => $this->cityId,\n 'email' => $this->email,\n 'telefono' => $this->tel,\n 'tipo_documento' => $this->typeDoc,\n 'documento' => $this->doc,\n 'direccion' => $this->addr,\n 'direccion_referencia' => $this->addRef,\n 'coordenadas' => $this->addrCoo,\n 'ruc' => $this->ruc,\n 'razon_social' => $this->socialReason,\n ];\n }",
"public function toArray(){\n $result = [];\n $result['id'] = $this->getId();\n $result['description'] = $this->getDescripcion();\n return $result;\n }",
"function jsonSerialize()\n {\n return array(\n 'pid' => $this->pid,\n 'board' => $this->board,\n 'size' => $this->size,\n 'strategy' => $this->strategy\n );\n }",
"public function jsonSerialize()\n {\n $json = array();\n $json['currency'] = $this->currency;\n $json['name'] = $this->name;\n $json['notes'] = $this->notes;\n $json['price'] = $this->price;\n\n return $json;\n }",
"function jsonSerialize()\n {\n return [\n 'name' => $this->name,\n 'author' => $this->authorModel->fullName,\n 'cover_path' => $this->getCoverWebPath(),\n 'cover_image_name' => $this->preview_path,\n 'release_date' => date('M d, Y', $this->release_date),\n 'created_at' => Yii::$app->getFormatter()->asDatetime($this->created_at),\n 'updated_at' => Yii::$app->getFormatter()->asDatetime($this->updated_at),\n ];\n }",
"public function toArray()\n {\n $data = array(\n 'id' => $this->getId(),\n 'status' => $this->getStatus(),\n 'title' => $this->field ? ($this->field->getAlertDescription() ? $this->field->getAlertDescription() : $this->field->getAlertTitle()) : '',\n 'alert_description' => $this->field ? ($this->field->getAlertDescription() ? $this->field->getAlertDescription() : $this->field->getAlertTitle()) : '',\n 'field' => $this->field ? $this->field->toArray() : null,\n 'vehicle' => $this->getVehicle()->toInfoArray(),\n 'user' => $this->check_list ? $this->check_list->getUser()->toInfoArray() : array(),\n 'description' => $this->getDescription(),\n 'images' => $this->getImages(),\n 'thumbnail' => $this->getThumbnail(),\n 'comments' => $this->getComments(),\n 'creation_date' => $this->getCreationDate()->getTimestamp(),\n 'update_date' => $this->getUpdateDate()->getTimestamp(),\n 'history' => $this->getHistory(),\n 'refreshed_times' => $this->getRefreshedTimes()\n );\n return $data;\n }",
"public function toJson(){\n\t\t$array = $this->toArray();\n\t\treturn json_encode($array);\n\t}",
"public function jsonize()\n {\n return json_encode($this->toArray());\n }",
"public function toArray(): array\n\t{\n\t\treturn\n\t\t\t[\n\t\t\t\t\"id\" => $this->getId(),\n\t\t\t\t\"name\" => $this->name,\n\t\t\t\t\"completable\" => $this->completable,\n\t\t\t\t\"classes\" => $this->classes\n\t\t\t];\n\t}",
"public function jsonSerialize(): array\n {\n return [\n 'sys' => $this->sys,\n 'name' => $this->name,\n ];\n }",
"public function toArray()\n {\n return [\n 'timestamp' => $this->timestamp,\n 'type' => $this->type,\n 'content' => $this->content\n ];\n }",
"public function toArray(): array\n {\n return [\n 'header' => (array)$this->header(),\n 'content' => (string)$this->getFormValue('content')\n ];\n }"
] | [
"0.756",
"0.7436546",
"0.7418268",
"0.7415948",
"0.731795",
"0.7289095",
"0.7270646",
"0.7246787",
"0.7177691",
"0.71660787",
"0.7128287",
"0.7112438",
"0.71094584",
"0.7091476",
"0.7078943",
"0.7061801",
"0.7060112",
"0.70597476",
"0.70370114",
"0.7029604",
"0.7027257",
"0.70257914",
"0.7011182",
"0.7010372",
"0.7007974",
"0.7005545",
"0.70053256",
"0.7003835",
"0.6991666",
"0.6991666",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.6973998",
"0.69692165",
"0.6965961",
"0.6957474",
"0.69491214",
"0.69291824",
"0.6927318",
"0.69225824",
"0.6921269",
"0.69210476",
"0.69210476",
"0.69210476",
"0.69210476",
"0.69210476",
"0.69085765",
"0.69000435",
"0.6899183",
"0.68889683",
"0.68880004",
"0.68787825",
"0.6871992",
"0.68700457",
"0.68688816",
"0.68661106",
"0.6865807",
"0.68637013",
"0.686097",
"0.686097",
"0.68576574",
"0.68475395",
"0.6840568",
"0.68343157",
"0.68310875",
"0.68233305",
"0.6820847",
"0.6819195",
"0.6815533",
"0.6813213",
"0.6813204",
"0.6809494",
"0.68084204",
"0.6807301",
"0.6805622",
"0.6802296",
"0.6800118",
"0.6793729",
"0.67935205",
"0.6790549",
"0.6787831",
"0.6786815"
] | 0.0 | -1 |
Hydrate data from a XML subtree, as it would appear in a xCard or xCal object. | public function setXmlValue(array $value)
{
$this->setJsonValue($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function buildData(DOMDocument $xml);",
"function parse_xml($xml)\n\t{\n\t\t// PHP's XML array structures stink so make our own\n\t\tif ($this->parse_into_struct($xml) === FALSE)\n\t\t{\n\t\t\terror_log('Unable to parse XML data');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$elements = array();\n\t\t\t$child = array();\n\t\t\tforeach ($this->tagdata as $item)\n\t\t\t{\n\t\t\t\t$current = count($elements);\n\n\t\t\t\tif ($item['type'] == 'open' OR $item['type'] == 'complete')\n\t\t\t\t{\n\t\t\t\t\t$elements[$current] = new XML_Cache;\n\t\t\t\t\t$elements[$current]->tag\t\t= $item['tag'];\n\t\t\t\t\t$elements[$current]->attributes\t= (array_key_exists('attributes', $item)) ? $item['attributes'] : '';\n\t\t\t\t\t$elements[$current]->value\t\t= (array_key_exists('value', $item)) ? $item['value'] : '';\n\n\t\t\t\t\t/** -------------------------------------\n\t\t\t\t\t/** Create a new child layer for 'open'\n\t\t\t\t\t/** -------------------------------------*/\n\t\t\t\t\tif ($item['type'] == \"open\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$elements[$current]->children = array();\n\t\t\t\t\t\t$child[count($child)] = &$elements;\n\t\t\t\t\t\t$elements = &$elements[$current]->children;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/** -------------------------------------\n\t\t\t\t/** Put child layer into root object\n\t\t\t\t/** -------------------------------------*/\n\n\t\t\t\telseif ($item['type'] == 'close')\n\t\t\t\t{\n\t\t\t\t\t$elements = &$child[count($child) - 1];\n\t\t\t\t\tunset($child[count($child) - 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $elements[0];\n\t}",
"abstract public function hydrate($data);",
"public function fromXml(\\SimpleXMLElement $xml)\n {\n foreach ($xml as $attr => $node) {\n $method = 'set' . ucfirst($attr);\n\n if (method_exists($this, $method)) {\n call_user_func(array($this, $method), (string) $xml->{$attr});\n }\n }\n }",
"protected function fromXml(DOMElement $node)\n {\n $this->name = $node->getAttribute('name');\n $this->isAbstract = Helper::getBoolAttribute($node, 'isAbstract');\n $this->isMixin = Helper::getBoolAttribute($node, 'isMixin');\n $this->isQueryable = Helper::getBoolAttribute($node, 'isQueryable');\n $this->hasOrderableChildNodes = Helper::getBoolAttribute($node, 'hasOrderableChildNodes');\n\n $this->primaryItemName = $node->getAttribute('primaryItemName');\n if (empty($this->primaryItemName)) {\n $this->primaryItemName = null;\n }\n\n $this->declaredSuperTypeNames = array();\n $xp = new DOMXPath($node->ownerDocument);\n $supertypes = $xp->query('supertypes/supertype', $node);\n foreach ($supertypes as $supertype) {\n $this->declaredSuperTypeNames[] = $supertype->nodeValue;\n }\n\n $this->declaredPropertyDefinitions = new ArrayObject();\n $properties = $xp->query('propertyDefinition', $node);\n foreach ($properties as $property) {\n $this->declaredPropertyDefinitions[] = $this->factory->get(\n 'NodeType\\PropertyDefinition',\n array($property, $this->nodeTypeManager)\n );\n }\n\n $this->declaredNodeDefinitions = new ArrayObject();\n $declaredNodeDefinitions = $xp->query('childNodeDefinition', $node);\n foreach ($declaredNodeDefinitions as $nodeDefinition) {\n $this->declaredNodeDefinitions[] = $this->factory->get(\n 'NodeType\\NodeDefinition',\n array($nodeDefinition, $this->nodeTypeManager)\n );\n }\n }",
"function xml_to_array($xml)\n {\n $xml = simplexml_load_string($xml, \"SimpleXMLElement\", LIBXML_NOCDATA);\n $root = $xml->getName();\n $data[\"$root\"] = json_decode(json_encode($xml), TRUE);\n\n return $data;\n }",
"public function hydrate($data)\n\t{\n\t\tif (is_array($data))\n\t\t{\n\t\t\t//get our id back\n\t\t\t$this->id = $data['id'];\n\n\t\t\t//obviously we want to load our data.\n\t\t\t$this->data = $data['data'];\n\t\t}\n\t}",
"protected function loadTreeData() {}",
"public function initializeTreeData() {}",
"public function initializeTreeData() {}",
"protected function processData()\n {\n if (empty($this->data)) {\n throw new \\Netcreators\\NcgovPdc\\Xml\\Search\\SamenwerkendeCatalogi40\\ResponseParser\\Exception('Error: No XML data supplied.');\n }\n\n libxml_clear_errors();\n $this->xmlRoot = simplexml_load_string($this->data, '\\SimpleXmlElement', LIBXML_NOERROR);\n $lastError = libxml_get_last_error();\n if ($this->xmlRoot === false || $lastError !== false) {\n throw new \\Netcreators\\NcgovPdc\\Xml\\Search\\SamenwerkendeCatalogi40\\ResponseParser\\Exception('Xml parsing failed with message: ' . $lastError->code . ': ' . $lastError->message);\n }\n\n $this->xmlRoot->registerXPathNamespace('sru', 'http://www.loc.gov/zing/srw/'); // __ns\n $this->xmlRoot->registerXPathNameSpace('xsi', 'http://www.w3.org/2001/XMLSchema-instance');\n $this->xmlRoot->registerXPathNamespace('overheidsru', 'http://standaarden.overheid.nl/sru');\n $this->xmlRoot->registerXPathNamespace('dcterms', 'http://purl.org/dc/terms/');\n $this->xmlRoot->registerXPathNamespace('overheid', 'http://standaarden.overheid.nl/owms/terms/');\n $this->xmlRoot->registerXPathNamespace('overheidproduct', 'http://standaarden.overheid.nl/product/terms/');\n }",
"public function fromXML($xml)\n\t{\n\t\t$xml = new SimpleXMLElement($xml);\n\n\t\t$this->ContactID = Xero::xpath($xml, '/Contact/ContactID ');\n\t\t$this->ContactStatus = Xero::xpath($xml, '/Contact/ContactStatus ');\n\t\t$this->Name = Xero::xpath($xml, '/Contact/Name ');\n\t\t$this->FirstName = Xero::xpath($xml, '/Contact/FirstName ');\n\t\t$this->LastName = Xero::xpath($xml, '/Contact/LastName ');\n\t\t$this->EmailAddress = Xero::xpath($xml, '/Contact/EmailAddress ');\n\t\t$this->SkypeUserName = Xero::xpath($xml, '/Contact/SkypeUserName ');\n\t\t$this->BankAccountDetails = Xero::xpath($xml, '/Contact/BankAccountDetails ');\n\t\t$this->TaxNumber = Xero::xpath($xml, '/Contact/TaxNumber ');\n\t\t$this->AccountsReceivableTaxType = Xero::xpath($xml, '/Contact/AccountsReceivableTaxType ');\n\t\t$this->AccountsPayableTaxType = Xero::xpath($xml, '/Contact/AccountsPayableTaxType ');\n\t\t$this->UpdatedDateUTC = Xero::xpath($xml, '/Contact/UpdatedDateUTC ');\n\t\t$this->IsSupplier = Xero::xpath($xml, '/Contact/IsSupplier ');\n\t\t$this->IsCustomer = Xero::xpath($xml, '/Contact/IsCustomer ');\n\t\t$this->DefaultCurrency = Xero::xpath($xml, '/Contact/DefaultCurrency ');\n\t}",
"public static function fromXML($xml){\n //self::$strxml = file_get_contents($xml);\n // echo self::$xmldoc != null;\n\n $bool = self::$xmldata = self::$xmldoc->loadXML($xml);\n $newXML = self::$xmldoc->saveXML();\n // echo $newXML;\n }",
"public static function toXml($data, $rootNodeName = 'data', &$xml=null) {\n // turn off compatibility mode as simple xml throws a wobbly if you don't.\n if ( ini_get('zend.ze1_compatibility_mode') == 1 ) ini_set ( 'zend.ze1_compatibility_mode', 0 );\n if ( is_null( $xml ) ) {\n $xml = simplexml_load_string(stripslashes(\"<?xml version='1.0' encoding='utf-8'?><root xmlns:example='http://example.namespace.com' version='1.0'></root>\"));\n }\n // loop through the data passed in.\n foreach( $data as $key => $value ) {\n // no numeric keys in our xml please!\n $numeric = false;\n if ( is_numeric( $key ) ) {\n $numeric = 1;\n $key = $rootNodeName;\n }\n\n // delete any char not allowed in XML element names\n $key = preg_replace('/[^a-z0-9\\-\\_\\.\\:]/i', '', $key);\n\n //check to see if there should be an attribute added (expecting to see _id_)\n $attrs = false;\n\n //if there are attributes in the array (denoted by attr_**) then add as XML attributes\n if ( is_array( $value ) ) {\n foreach($value as $i => $v ) {\n $attr_start = false;\n $attr_start = stripos($i, 'attr_');\n if ($attr_start === 0) {\n $attrs[substr($i, 5)] = $v; unset($value[$i]);\n }\n }\n }\n\n\n // if there is another array found recursively call this function\n if ( is_array( $value ) ) {\n\n if ( Vsb::is_assoc( $value ) || $numeric ) {\n\n // older SimpleXMLElement Libraries do not have the addChild Method\n if (method_exists('SimpleXMLElement','addChild'))\n {\n $node = $xml->addChild( $key, null, 'http://www.lcc.arts.ac.uk/' );\n if ($attrs) {\n foreach($attrs as $key => $attribute) {\n $node->addAttribute($key, $attribute);\n }\n }\n }\n\n }else{\n $node =$xml;\n }\n\n // recrusive call.\n if ( $numeric ) $key = 'anon';\n Vsb::toXml( $value, $key, $node );\n } else {\n\n // older SimplXMLElement Libraries do not have the addChild Method\n if (method_exists('SimpleXMLElement','addChild'))\n {\n $childnode = $xml->addChild( $key, $value, 'http://www.lcc.arts.ac.uk/' );\n if ($attrs) {\n foreach($attrs as $key => $attribute) {\n $childnode->addAttribute($key, $attribute);\n }\n }\n }\n }\n }\n\n // pass back as unformatted XML\n //return $xml->asXML('data.xml');\n\n // if you want the XML to be formatted, use the below instead to return the XML\n $doc = new DOMDocument('1.0');\n $doc->preserveWhiteSpace = false;\n @$doc->loadXML( Vsb::fixCDATA($xml->asXML()) );\n $doc->formatOutput = true;\n //return $doc->saveXML();\n return $doc->save('data.xml');\n }",
"function xmlToObj() {\r\n\t\tglobal $expenses;\r\n\t\tglobal $persons;\r\n\t\tglobal $xml;\r\n\t\tglobal $closed;\r\n\r\n\t\tif ($xml['mshare']['state'] != null) {\r\n\t\t\tif ($xml['mshare']['state'] == \"CLOSED\") $closed = 1;\r\n\t\t}\r\n\r\n\t\tfor ($i = 0; $i < count($xml['mshare']['persons']); $i++) {\r\n\t\t\t$person = new Person(\r\n\t\t\t\t$xml['mshare']['persons'][$i]['ID'],\r\n\t\t\t\t$xml['mshare']['persons'][$i]['name']);\r\n\r\n\t\t\tarray_push($persons, $person);\r\n\t\t}\r\n\t\tsortArray($persons);\r\n\r\n\t\tfor ($i = 0; $i < count($xml['mshare']['expenses']); $i++) {\r\n\t\t\tif ($xml['mshare']['expenses'][$i][state] != \"DELETED\") {\r\n\t\t\t\t$expense = new Expense(\r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['ID'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['spenderID'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['accountableIDs'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['expenseDate'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['amount'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['description'],\r\n\t\t\t\t\t0);\r\n\t\t\t} else {\r\n\t\t\t\t$expense = new Expense(\r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['ID'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['spenderID'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['accountableIDs'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['expenseDate'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['amount'], \r\n\t\t\t\t\t$xml['mshare']['expenses'][$i]['description'],\r\n\t\t\t\t\t1);\r\n\t\t\t}\r\n\r\n\t\t\tarray_push($expenses, $expense);\r\n\t\t}\r\n\t\tsortArray($persons);\r\n\t}",
"public function processXml($xml) {\r\n $ds = new \\Gateway\\DataSource\\Customers();\r\n \r\n Utils::log(\"Processing customers XML input...\");\r\n \r\n foreach ($xml->customers as $xmlCustomer) {\r\n // customer entity\r\n $customer = new Customer();\r\n\r\n $customer->id = (int) $xmlCustomer['customers_id'];\r\n $customer->firstname = (string) $xmlCustomer['customers_firstname'];\r\n $customer->surname = (string) $xmlCustomer['customers_lastname'];\r\n $customer->email = (string) $xmlCustomer['customers_email_address'];\r\n $customer->password = (string) $xmlCustomer['customers_email_address'];\r\n $customer->gender = $this->createGender((string) $xmlCustomer['customers_gender']);\r\n\r\n $customer->addSpecialProperty('store_id', 0);\r\n $customer->addSpecialProperty('website_id', 0);\r\n $customer->addSpecialProperty('group_id', 0);\r\n \r\n\t\t\t//bonus points\r\n\t\t\t$customer->bonus_value = (int) $xmlCustomer['customers_bonus_value'];\r\n\t\t\t$customer->bonus_date = (string) $xmlCustomer['customers_bonus_date']; \r\n \r\n //customers members card\r\n if (!empty($xmlCustomer['customers_card']))\r\n $customer->cardID = (string) $xmlCustomer['customers_card']; \r\n \r\n // address according to the last XML description - email from Fritz 18.06.2013 v11\r\n \r\n if (!empty($xmlCustomer['customers_street_address']) \r\n && !empty($xmlCustomer['customers_postcode'])\r\n && !empty($xmlCustomer['customers_city'])\r\n && !empty($xmlCustomer['customers_country'])\r\n )\r\n { \r\n $address = new Address();\r\n\r\n $address->firstname = (string) $xmlCustomer['customers_firstname'];\r\n $address->surname = (string) $xmlCustomer['customers_lastname'];\r\n $address->street = (string) $xmlCustomer['customers_street_address']; \r\n $address->postCode = (string) $xmlCustomer['customers_postcode'];\r\n $address->city = (string) $xmlCustomer['customers_city'];\r\n $address->phoneNo = (string) $xmlCustomer['customers_telephone']; \r\n $address->country = (string) $xmlCustomer['customers_country']; // FIXME have conversion map/mapping table for this?\r\n \r\n // missing in XML\r\n $address->phoneNo = (string) '123456'; \r\n $address->setIsBilling(true);\r\n $address->setIsShipping(false);\r\n \r\n $customer->addAddress($address); \r\n }\r\n \r\n /* NOT USED ANYMORE - see above \r\n \r\n // address entities\r\n $xmlCustomerAddressesPattern = '//address_book[@customers_id=' . $customer->id . ']';\r\n $xmlCustomerAdresses = $xml->xpath($xmlCustomerAddressesPattern); \t\t\t\r\n\t\t\t\r\n if (count($xmlCustomerAdresses)) {\r\n foreach ($xmlCustomerAdresses as $xmlCustomerAddress) {\r\n $address = new Address();\r\n \r\n $address->firstname = (string) $xmlCustomerAddress['entry_firstname'];\r\n $address->surname = (string) $xmlCustomerAddress['entry_lastname'];\r\n $address->gender = $this->createGender((string) $xmlCustomerAddress['entry_gender']);\r\n $address->postCode = (string) $xmlCustomerAddress['entry_postcode'];\r\n $address->city = (string) $xmlCustomerAddress['entry_city'];\r\n $address->street = (string) $xmlCustomerAddress['entry_street_address'];\r\n \r\n // missing in XML\r\n $address->phoneNo = (string) '123456';\r\n $address->country = (string) 'CZ'; // FIXME have conversion map/mapping table for this?\r\n\r\n $address->setIsBilling(false);\r\n $address->setIsShipping(false);\r\n \r\n $customer->addAddress($address);\r\n }\r\n } else {\r\n Utils::log(sprintf(\"Customer '%s' has no address.\", $customer->fullName));\r\n }\r\n */\r\n \r\n //dump($xmlCustomer);\r\n //dump($customer);\r\n \r\n //exit;\r\n \r\n $ds->add($customer); \r\n }\r\n \r\n Utils::log(\"%s customer has been parsed.\", $ds->count());\r\n \r\n return $ds;\r\n }",
"public function hydrate(array $data);",
"public function process_root_element($data) {\n }",
"function xml_import ($xml) {\r\n $xml = html_entity_decode($xml);\r\n\t\tif (!stristr($xml,'<?xml')) {\r\n\t\t\t\t$xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>'.$xml;\r\n\t\t}\r\n $data = XML_unserialize($xml);\r\n\t\tif ($data === NULL) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t return $data;\r\n\t\t}\r\n\t}",
"public function init_from_xml($xml, $from = Bean::SOURCE_STRING)\n {\n if($from == Bean::SOURCE_URL || $from == Bean::SOURCE_FILE)\n {\n $xdom = @simplexml_load_file($xml);\n }\n if($from == Bean::SOURCE_STRING)\n {\n $xdom = @simplexml_load_string($xml);\n }\n\n foreach($xdom as $key => $val)\n {\n $this->set($key,$val); \n } \n }",
"public function hydrate($data)\n\t{\n\t\tforeach ($data as $attribut => $value)\n\t\t{\n\t\t\t$methode = 'set'.ucfirst($attribut);\n\t\t\tif (is_callable([$this, $methode]))\n\t\t\t{\n\t\t\t\t$this->$methode($value);\n\t\t\t}\n\t\t}\n\t}",
"function xml_unserialize(&$xml) {\r\n\t$xml_parser = new XML();\r\n\t$data = $xml_parser->parse($xml);\r\n\t$xml_parser->destruct();\r\n\t$arr = xml_format_array($data);\r\n\treturn $arr['root'];\r\n}",
"protected static function extractObjectFeed($xmldata)\n {\n $doc = new DOMDocument();\n if($xmldata) $doc->loadXML($xmldata); //TXO\n return self :: extractObjectFeedFromNode($doc);\n }",
"protected function __construct($xml) {\n if ( isset($xml->object) ) {\n foreach ( $xml->object as $window ) {\n $this->_traverseWindow($window);\n }\n }\n }",
"protected function processData(SimpleXMLElement $xml)\n {\n // Do nothing.\n }",
"function wpai_xml_row($xml_node)\n{\n // Modify simpleXML object as needed\n return $xml_node;\n}",
"static function loadXMLData($xml, $typename='LOCATION', $locationobj=NULL, $author=NULL) {\n if ( $locationobj == NULL ) $locationobj = new Location();\n $locationobj = POIBaseType::loadXMLData($xml, $typename, $locationobj);\n $locationobj->changed = true;\n\n // get all points\n foreach ( $xml->point as $pointxml ) {\n $g = Geom::loadXMLData($pointxml->Point, null, null, $author);\n if ( !empty($g) ) $locationobj->addPointGeom( $g );\n }\n\n // get all lines\n foreach ( $xml->line as $linexml ) {\n $g = Geom::loadXMLData($linexml->LineString, null, null, $author);\n if ( !empty($g) ) $locationobj->addLineGeom( $g );\n }\n\n // get all polygons\n foreach ( $xml->polygon as $polygonxml ) {\n $g = Geom::loadXMLData($polygonxml->SimplePolygon, null, null, $author);\n if ( !empty($g) ) $locationobj->addPolygonGeom( $g );\n }\n\n // get all the addresses\n foreach ( $xml->address as $addressxml ) {\n $a = POIBaseType::loadXMLData($addressxml, 'ADDRESS', null, $author);\n $locationobj->setAddress($a);\n }\n\n // get all the relationships\n foreach ( $xml->relationship as $relxml ) {\n $r = Relationship::loadXMLData($relxml, null, null, $author);\n $locationobj->addRelationship($r);\n }\n\n return $locationobj;\n }",
"public function setData($xml) {}",
"function xml2assoc($xml) { \n\t\t$tree = null; \n\t\twhile($xml->read()) {\n\t\t\tswitch ($xml->nodeType) { \n\t\t\t\tcase XMLReader::END_ELEMENT: return $tree; \n\t\t\t\tcase XMLReader::ELEMENT: \n\t\t\t\t\t$node = array('tag' => $xml->name, 'value' => $xml->isEmptyElement ? '' : xml2assoc($xml)); \n\t\t\t\t\tif($xml->hasAttributes) {\n\t\t\t\t\t\twhile($xml->moveToNextAttribute()) {\n\t\t\t\t\t\t\t$node['attributes'][$xml->name] = $xml->value; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$tree[] = $node; \n\t\t\t\tbreak; \n\t\t\t\tcase XMLReader::TEXT: \n\t\t\t\tcase XMLReader::CDATA: \n\t\t\t\t\t$tree .= $xml->value; \n\t\t\t} \n\t\t}\n\t\treturn $tree; \n\t}",
"protected function parseXml($xml)\n {\n if (! $xml) {\n return false;\n }\n if (isset($xml->ShipmentEventList)) {\n foreach ($xml->ShipmentEventList->children() as $x) {\n $this->list['Shipment'][] = $this->parseShipmentEvent($x);\n }\n }\n if (isset($xml->RefundEventList)) {\n foreach ($xml->RefundEventList->children() as $x) {\n $this->list['Refund'][] = $this->parseShipmentEvent($x);\n }\n }\n if (isset($xml->GuaranteeClaimEventList)) {\n foreach ($xml->GuaranteeClaimEventList->children() as $x) {\n $this->list['GuaranteeClaim'][] = $this->parseShipmentEvent($x);\n }\n }\n if (isset($xml->ChargebackEventList)) {\n foreach ($xml->ChargebackEventList->children() as $x) {\n $this->list['Chargeback'][] = $this->parseShipmentEvent($x);\n }\n }\n if (isset($xml->PayWithAmazonEventList)) {\n foreach ($xml->PayWithAmazonEventList->children() as $x) {\n $temp = [];\n $temp['SellerOrderId'] = (string) $x->SellerOrderId;\n $temp['TransactionPostedDate'] = (string) $x->TransactionPostedDate;\n $temp['BusinessObjectType'] = (string) $x->BusinessObjectType;\n $temp['SalesChannel'] = (string) $x->SalesChannel;\n $temp['Charge'] = $this->parseCharge($x->Charge);\n if (isset($x->FeeList)) {\n foreach ($x->FeeList->children() as $z) {\n $temp['FeeList'][] = $this->parseFee($z);\n }\n }\n $temp['PaymentAmountType'] = (string) $x->PaymentAmountType;\n $temp['AmountDescription'] = (string) $x->AmountDescription;\n $temp['FulfillmentChannel'] = (string) $x->FulfillmentChannel;\n $temp['StoreName'] = (string) $x->StoreName;\n $this->list['PayWithAmazon'][] = $temp;\n }\n }\n if (isset($xml->ServiceProviderCreditEventList)) {\n foreach ($xml->ServiceProviderCreditEventList->children() as $x) {\n $temp = [];\n $temp['ProviderTransactionType'] = (string) $x->ProviderTransactionType;\n $temp['SellerOrderId'] = (string) $x->SellerOrderId;\n $temp['MarketplaceId'] = (string) $x->MarketplaceId;\n $temp['MarketplaceCountryCode'] = (string) $x->MarketplaceCountryCode;\n $temp['SellerId'] = (string) $x->SellerId;\n $temp['SellerStoreName'] = (string) $x->SellerStoreName;\n $temp['ProviderId'] = (string) $x->ProviderId;\n $temp['ProviderStoreName'] = (string) $x->ProviderStoreName;\n $this->list['ServiceProviderCredit'][] = $temp;\n }\n }\n if (isset($xml->RetrochargeEventList)) {\n foreach ($xml->RetrochargeEventList->children() as $x) {\n $temp = [];\n $temp['RetrochargeEventType'] = (string) $x->RetrochargeEventType;\n $temp['AmazonOrderId'] = (string) $x->AmazonOrderId;\n $temp['PostedDate'] = (string) $x->PostedDate;\n $temp['BaseTax']['Amount'] = (string) $x->BaseTax->CurrencyAmount;\n $temp['BaseTax']['CurrencyCode'] = (string) $x->BaseTax->CurrencyCode;\n $temp['ShippingTax']['Amount'] = (string) $x->ShippingTax->CurrencyAmount;\n $temp['ShippingTax']['CurrencyCode'] = (string) $x->ShippingTax->CurrencyCode;\n $temp['MarketplaceName'] = (string) $x->MarketplaceName;\n $this->list['Retrocharge'][] = $temp;\n }\n }\n if (isset($xml->RentalTransactionEventList)) {\n foreach ($xml->RentalTransactionEventList->children() as $x) {\n $temp = [];\n $temp['AmazonOrderId'] = (string) $x->AmazonOrderId;\n $temp['RentalEventType'] = (string) $x->RentalEventType;\n $temp['ExtensionLength'] = (string) $x->ExtensionLength;\n $temp['PostedDate'] = (string) $x->PostedDate;\n if (isset($x->RentalChargeList)) {\n foreach ($x->RentalChargeList->children() as $z) {\n $temp['RentalChargeList'][] = $this->parseCharge($z);\n }\n }\n if (isset($x->RentalFeeList)) {\n foreach ($x->RentalFeeList->children() as $z) {\n $temp['RentalFeeList'][] = $this->parseFee($z);\n }\n }\n $temp['MarketplaceName'] = (string) $x->MarketplaceName;\n if (isset($x->RentalInitialValue)) {\n $temp['RentalInitialValue']['Amount'] = (string) $x->RentalInitialValue->CurrencyAmount;\n $temp['RentalInitialValue']['CurrencyCode'] = (string) $x->RentalInitialValue->CurrencyCode;\n }\n if (isset($x->RentalReimbursement)) {\n $temp['RentalReimbursement']['Amount'] = (string) $x->RentalReimbursement->CurrencyAmount;\n $temp['RentalReimbursement']['CurrencyCode'] = (string) $x->RentalReimbursement->CurrencyCode;\n }\n $this->list['RentalTransaction'][] = $temp;\n }\n }\n if (isset($xml->PerformanceBondRefundEventList)) {\n foreach ($xml->PerformanceBondRefundEventList->children() as $x) {\n $temp = [];\n $temp['MarketplaceCountryCode'] = (string) $x->MarketplaceCountryCode;\n $temp['Amount'] = (string) $x->Amount->CurrencyAmount;\n $temp['CurrencyCode'] = (string) $x->Amount->CurrencyCode;\n if (isset($x->ProductGroupList)) {\n foreach ($x->ProductGroupList->children() as $z) {\n $temp['ProductGroupList'][] = (string) $z;\n }\n }\n $this->list['PerformanceBondRefund'][] = $temp;\n }\n }\n if (isset($xml->ServiceFeeEventList)) {\n foreach ($xml->ServiceFeeEventList->children() as $x) {\n $temp = [];\n $temp['AmazonOrderId'] = (string) $x->AmazonOrderId;\n $temp['FeeReason'] = (string) $x->FeeReason;\n if (isset($x->FeeList)) {\n foreach ($x->FeeList->children() as $z) {\n $temp['FeeList'][] = $this->parseFee($z);\n }\n }\n $temp['SellerSKU'] = (string) $x->SellerSKU;\n $temp['FnSKU'] = (string) $x->FnSKU;\n $temp['FeeDescription'] = (string) $x->FeeDescription;\n $temp['ASIN'] = (string) $x->ASIN;\n $this->list['ServiceFee'][] = $temp;\n }\n }\n if (isset($xml->DebtRecoveryEventList)) {\n foreach ($xml->DebtRecoveryEventList->children() as $x) {\n $temp = [];\n $temp['DebtRecoveryType'] = (string) $x->DebtRecoveryType;\n $temp['RecoveryAmount']['Amount'] = (string) $x->RecoveryAmount->CurrencyAmount;\n $temp['RecoveryAmount']['CurrencyCode'] = (string) $x->RecoveryAmount->CurrencyCode;\n $temp['OverPaymentCredit']['Amount'] = (string) $x->OverPaymentCredit->CurrencyAmount;\n $temp['OverPaymentCredit']['CurrencyCode'] = (string) $x->OverPaymentCredit->CurrencyCode;\n if (isset($x->DebtRecoveryItemList)) {\n foreach ($x->DebtRecoveryItemList->children() as $z) {\n $ztemp = [];\n $ztemp['RecoveryAmount']['Amount'] = (string) $z->RecoveryAmount->CurrencyAmount;\n $ztemp['RecoveryAmount']['CurrencyCode'] = (string) $z->RecoveryAmount->CurrencyCode;\n $ztemp['OriginalAmount']['Amount'] = (string) $z->OriginalAmount->CurrencyAmount;\n $ztemp['OriginalAmount']['CurrencyCode'] = (string) $z->OriginalAmount->CurrencyCode;\n $ztemp['GroupBeginDate'] = (string) $z->GroupBeginDate;\n $ztemp['GroupEndDate'] = (string) $z->GroupEndDate;\n $temp['DebtRecoveryItemList'][] = $ztemp;\n }\n }\n if (isset($x->ChargeInstrumentList)) {\n foreach ($x->ChargeInstrumentList->children() as $z) {\n $ztemp = [];\n $ztemp['Description'] = (string) $z->Description;\n $ztemp['Tail'] = (string) $z->Tail;\n $ztemp['Amount'] = (string) $z->Amount->CurrencyAmount;\n $ztemp['CurrencyCode'] = (string) $z->Amount->CurrencyCode;\n $temp['ChargeInstrumentList'][] = $ztemp;\n }\n }\n $this->list['DebtRecovery'][] = $temp;\n }\n }\n if (isset($xml->LoanServicingEventList)) {\n foreach ($xml->LoanServicingEventList->children() as $x) {\n $temp = [];\n $temp['Amount'] = (string) $x->LoanAmount->CurrencyAmount;\n $temp['CurrencyCode'] = (string) $x->LoanAmount->CurrencyCode;\n $temp['SourceBusinessEventType'] = (string) $x->SourceBusinessEventType;\n $this->list['LoanServicing'][] = $temp;\n }\n }\n if (isset($xml->AdjustmentEventList)) {\n foreach ($xml->AdjustmentEventList->children() as $x) {\n $temp = [];\n $temp['AdjustmentType'] = (string) $x->AdjustmentType;\n $temp['Amount'] = (string) $x->AdjustmentAmount->CurrencyAmount;\n $temp['CurrencyCode'] = (string) $x->AdjustmentAmount->CurrencyCode;\n if (isset($x->AdjustmentItemList)) {\n foreach ($x->AdjustmentItemList->children() as $z) {\n $ztemp = [];\n $ztemp['Quantity'] = (string) $z->Quantity;\n $ztemp['PerUnitAmount']['Amount'] = (string) $z->PerUnitAmount->CurrencyAmount;\n $ztemp['PerUnitAmount']['CurrencyCode'] = (string) $z->PerUnitAmount->CurrencyCode;\n $ztemp['TotalAmount']['Amount'] = (string) $z->TotalAmount->CurrencyAmount;\n $ztemp['TotalAmount']['CurrencyCode'] = (string) $z->TotalAmount->CurrencyCode;\n $ztemp['SellerSKU'] = (string) $z->SellerSKU;\n $ztemp['FnSKU'] = (string) $z->FnSKU;\n $ztemp['ProductDescription'] = (string) $z->ProductDescription;\n $ztemp['ASIN'] = (string) $z->ASIN;\n $temp['AdjustmentItemList'][] = $ztemp;\n }\n }\n $this->list['Adjustment'][] = $temp;\n }\n }\n if (isset($xml->SAFETReimbursementEventList)) {\n foreach ($xml->SAFETReimbursementEventList->children() as $x) {\n $temp = [];\n $temp['PostedDate'] = (string) $x->PostedDate;\n $temp['SAFETClaimId'] = (string) $x->SAFETClaimId;\n $temp['Amount'] = (string) $x->ReimbursedAmount->CurrencyAmount;\n $temp['CurrencyCode'] = (string) $x->ReimbursedAmount->CurrencyCode;\n $temp['SAFETReimbursementItemList'] = [];\n if (isset($x->SAFETReimbursementItemList)) {\n foreach ($x->SAFETReimbursementItemList->children() as $y) {\n if (! isset($y->ItemChargeList)) {\n continue;\n }\n $ztemp = [];\n foreach ($y->ItemChargeList->children() as $z) {\n $ztemp['ItemChargeList'][] = $this->parseCharge($z);\n }\n $temp['SAFETReimbursementItemList'][] = $ztemp;\n }\n }\n $this->list['SAFET'][] = $temp;\n }\n }\n }",
"protected function load()\n\t{\n\n $data = simplexml_load_string(file_get_contents($this->_origin));\n\n\n\n $data = json_decode(json_encode((array)$data), TRUE);\n\n //$this\n\n $this->_data = [];\n\n\n $firstKey = array_keys($data)[0];\n\n //print_r($data[$firstKey]);\n //echo \"<br><br>\";\n\n foreach($data[$firstKey] AS $element) {\n\n\n //var_dump(self::arrayToObject($element));\n\n $this->_fields = array_keys($element);\n\n\n $this->_data[@$element['id']] = self::arrayToObject($element);\n\n }\n\n\t\t$this->reindex();\n\t}",
"private function xml_to_array($xml) {\n\t\t$doc = new \\DOMDocument();\n\t\t$doc->loadXML($xml);\n\t\t$root = $doc->documentElement;\n\t\t$output = $this->domnode_to_array($root);\n\t\t$output['@root'] = $root->tagName;\n\t\treturn $output;\n\t}",
"private function parseProducts($xml){\n $catalogue = $xml->shop->offers;\n $productData = array();\n foreach ($catalogue as $offers) {\n foreach ($offers as $product) {\n foreach ($product->attributes() as $key => $value) {\n if ($key == 'id') $productData['id_prom'] = $value;\n }\n $productData['model'] = $product->vendorCode;\n $productData['id_group_prom'] = $product->categoryId;\n $this->addProduct($productData);\n }\n }\n }",
"public function populateFromXML ($venueXML) {\n\n $this->venue_id = $venueXML->id;\n $this->name = $venueXML->name;\n $this->description = $venueXML->description;\n $this->address = new Address();\n $this->address->populateFromXML ($venueXML->address);\n $this->phone = $venueXML->phone;\n $this->website = $venueXML->website;\n $this->email = !empty($venueXML->email) ? $venueXML->email : NULL;\n $this->accessibility_info = !empty($venueXML->accessibilityinfo) ? $venueXML->accessibilityinfo : NULL;\n\n $i = 0;\n $this->image_url = NULL;\n \n if (isset ($venueXML->images)) {\n foreach ($venueXML->images as $imageXML) {\n if ($i == 0 && isset($imageXML->image) && strlen($imageXML->image) > 0)\n $this->image_url = $imageXML->image;\n $this->images[$i++] = $imageXML->image; // []\n }\n }\n }",
"public function handle(SimpleXMLElement $root);",
"function simpleXMLToArray(SimpleXMLElement $xml,$attributesKey=null,$childrenKey=null,$valueKey=null){\n\n\t\tif($childrenKey && !is_string($childrenKey)){$childrenKey = '@children';}\n\t\tif($attributesKey && !is_string($attributesKey)){$attributesKey = '@attributes';}\n\t\tif($valueKey && !is_string($valueKey)){$valueKey = '@values';}\n\n\t\t$return = array();\n\t\t$name = $xml->getName();\n\t\t$_value = trim((string)$xml);\n\t\tif(!strlen($_value)){$_value = null;};\n\n\t\tif($_value!==null){\n\t\t\tif($valueKey){$return[$valueKey] = $_value;}\n\t\t\telse{$return = $_value;}\n\t\t}\n\n\t\t$children = array();\n\t\t$first = true;\n\t\tforeach($xml->children() as $elementName => $child){\n\t\t\t$value = simpleXMLToArray($child,$attributesKey, $childrenKey,$valueKey);\n\t\t\tif(isset($children[$elementName])){\n\t\t\t\tif(is_array($children[$elementName])){\n\t\t\t\t\tif($first){\n\t\t\t\t\t\t$temp = $children[$elementName];\n\t\t\t\t\t\tunset($children[$elementName]);\n\t\t\t\t\t\t$children[$elementName][] = $temp;\n\t\t\t\t\t\t$first=false;\n\t\t\t\t\t}\n\t\t\t\t\t$children[$elementName][] = $value;\n\t\t\t\t}else{\n\t\t\t\t\t$children[$elementName] = array($children[$elementName],$value);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$children[$elementName] = $value;\n\t\t\t}\n\t\t}\n\t\tif($children){\n\t\t\tif($childrenKey){$return[$childrenKey] = $children;}\n\t\t\telse{$return = array_merge($return,$children);}\n\t\t}\n\n\t\t$attributes = array();\n\t\tforeach($xml->attributes() as $name=>$value){\n\t\t\t$attributes[$name] = trim($value);\n\t\t}\n\t\tif($attributes){\n\t\t\tif($attributesKey){$return[$attributesKey] = $attributes;}\n\t\t\telse{$return = array_merge($return, $attributes);}\n\t\t}\n\n\t\treturn $return;\n\t}",
"protected function parseXML($xml, $recursive = false, $cust = false) {\n\t\tif (!$recursive) {\n\t\t\t$array = simplexml_load_string($xml);\n\t\t} else {\n\t\t\t$array = $xml;\n\t\t}\n\t\n\t\t$newArray = array();\n\t\t$array = (array) $array;\n\n\t\tforeach ($array as $key=>$value) {\n\t\t\t$value = (array) $value;\n\t\t\tif (isset($value[0])) {\n\t\t\t\tif (count($value) > 1) {\n\t\t\t\t\t$newArray[$key] = (array) $value;\n\t\t\t\t} else {\n\t\t\t\t\t$newArray[$key] = trim($value[0]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$newArray[$key] = $this->parseXML($value, true);\n\t\t\t}\n\t\t}\n\t return $newArray;\n\t}",
"public static function createFromXML(\\SimpleXMLElement $xml)\n {\n $event = new Event();\n\n // loop attributes\n foreach ($xml->attributes() as $attributeName => $value) {\n $method = 'set' . ucfirst($attributeName);\n\n switch ($attributeName) {\n case 'availablefrom':\n $method = 'setAvailableFrom';\n $value = new \\DateTime($value);\n break;\n case 'availableto':\n $method = 'setAvailableTo';\n $value = new \\DateTime($value);\n break;\n case 'creationdate':\n $method = 'setCreationDate';\n $value = new \\DateTime($value);\n break;\n case 'lastupdated':\n $method = 'setLastUpdated';\n $value = new \\DateTime($value);\n break;\n case 'pctcomplete':\n $method = 'setPercentageComplete';\n $value = (int) $value;\n break;\n case 'isparent':\n $method = 'setIsParent';\n $value = ((string) $value == 'true');\n break;\n case 'published':\n case 'private':\n $value = ((string) $value == 'true');\n break;\n default:\n $value = (string) $value;\n }\n\n if (!method_exists($event, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown attribute: ' . $attributeName);\n }\n } else {\n call_user_func(array($event, $method), $value);\n }\n }\n\n // loop elements\n foreach ($xml as $element) {\n $value = null;\n $elementName = $element->getName();\n $method = 'set' . ucfirst($element->getName());\n\n switch ($elementName) {\n case 'calendar':\n $value = Calendar::createFromXML($element);\n break;\n case 'categories':\n if (isset($element->category)) {\n foreach ($element->category as $category) {\n $event->addCategory(\n Category::createFromXML($category)\n );\n }\n }\n break;\n case 'contactinfo':\n $value = ContactInfo::createFromXML($element);\n break;\n case 'eventdetails':\n if (isset($element->eventdetail)) {\n foreach ($element->eventdetail as $eventDetail) {\n $event->addEventDetail(\n EventDetail::createFromXML($eventDetail)\n );\n }\n }\n break;\n case 'languages':\n if (isset($element->language)) {\n foreach ($element->language as $language) {\n $event->addLanguage(\n Language::createFromXML($language)\n );\n }\n }\n break;\n case 'location':\n $value = Location::createFromXML($element);\n break;\n case 'organiser':\n $value = Organiser::createFromXML($element);\n break;\n case 'agefrom':\n $value = (int) $value;\n break;\n case 'bookingperiod':\n $value = Period::createFromXML($element);\n break;\n default:\n $value = (string) $value;\n break;\n }\n\n if (!method_exists($event, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown element: ' . $elementName);\n }\n } else {\n if ($value !== null) {\n call_user_func(array($event, $method), $value);\n }\n }\n }\n\n return $event;\n }",
"public function fromXML(SimpleXMLElement $xml, Array $arrayHandlers = null) {\n\t\tforeach ($xml as $key => $value) {\n\t\t\t$attributes = $value->attributes();\n\t\t\t$type = isset($attributes['type']) ? $attributes['type'] : 'string';\n\n\t\t\t$key = str_replace('-', '_', $key);\n\n\t\t\tif (isset($attributes['nil']) && $attributes['nil'] == 'true') {\n\t\t\t\t$this->properties[$key] = null;\n\t\t\t} elseif ($type == 'array') {\n\t\t\t\t$this->properties[$key] = array();\n\t\t\t\tif (isset($arrayHandlers[$key])) {\n\t\t\t\t\tforeach ($value as $subxml) {\n\t\t\t\t\t\t$object = new $arrayHandlers[$key]($this);\n\t\t\t\t\t\t$object->fromXML($subxml);\n\t\t\t\t\t\t$this->properties[$key][] = $object;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif ($type == 'integer') {\n\t\t\t\t$this->properties[$key] = intval($value);\n\t\t\t} elseif ($type == 'float') {\n\t\t\t\t$this->properties[$key] = floatval($value);\n\t\t\t} elseif ($type == 'boolean') {\n\t\t\t\t$this->properties[$key] = $value == 'true';\n\t\t\t} elseif ($type == 'datetime' || $type == 'date') {\n\t\t\t\t$this->properties[$key] = new DateTime(strval($value));\n\t\t\t} else {\n\t\t\t\t$this->properties[$key] = strval($value);\n\t\t\t}\n\t\t}\n\t}",
"private function parseXml(\\DOMNode $node)\n {\n $data = $this->parseXmlAttributes($node);\n\n $value = $this->parseXmlValue($node);\n\n if (!count($data)) {\n return $value;\n }\n\n if (!is_array($value)) {\n $data['#'] = $value;\n\n return $data;\n }\n\n if (1 === count($value) && key($value)) {\n $data[key($value)] = current($value);\n\n return $data;\n }\n\n foreach ($value as $key => $val) {\n $data[$key] = $val;\n }\n\n return $data;\n }",
"private function parseXmlToArrayWP($xml)\n {\n $xml = preg_replace(\"/(<\\/?)(\\w+):([^>]*>)/\", \"$1$2$3\", $xml);\n $xml = simplexml_load_string($xml);\n $json = json_encode($xml);\n return json_decode($json, true);\n }",
"public function initFromXML($xml)\n {\n $xml = simplexml_load_string(str_replace('req:', '', $xml));\n\n if ((string)$xml->Response->Status->Condition->ConditionCode != '') {\n $errorMsg = ((string)$xml->Response->Status->Condition->ConditionCode) . ' : '\n . ((string)$xml->Response->Status->Condition->ConditionData);\n throw new \\Exception('Error returned from DHL webservice : ' . $errorMsg);\n }\n\n $parts = explode('\\\\', get_class($this));\n $class_name = array_pop($parts);\n foreach ($xml->children() as $child) {\n $child_name = $child->getName();\n switch ($child_name) {\n case 'Response':\n $this->MessageTime = (string)$child->ServiceHeader->MessageTime;\n $this->MessageReference = (string)$child->ServiceHeader->MessageReference;\n $this->SiteID = (string)$child->ServiceHeader->SiteID;\n $this->Password = '#';\n break;\n\n default:\n if (is_object($this->$child_name)) {\n $this->$child_name->initFromXml($child->asXML());\n } elseif (\n isset($this->params[$child_name]['multivalues'])\n && $this->params[$child_name]['multivalues']\n ) {\n foreach ($child->children() as $sub_child) {\n $sub_child_name = $sub_child->getName();\n if ($sub_child->count() > 1) {\n $sub_child_name .= 's';\n }\n\n $child_class_name = implode('\\\\', $parts) . '\\\\' . $this->params[$sub_child_name]['type'];\n $child_class_name = str_replace('Entity', 'Datatype', $child_class_name);\n\n if ('string' === $this->params[$sub_child_name]['type'] && ($sub_child->count() <= 1)) {\n $childObj = trim((string)$sub_child);\n } else {\n $childObj = new $child_class_name();\n $childObj->initFromXml($sub_child->asXML());\n }\n\n $addMethodName = 'add' . ucfirst($sub_child_name);\n $this->$addMethodName($childObj);\n }\n } elseif (isset($this->$child_name)) {\n $this->$child_name = trim((string)$child);\n }\n break;\n }\n }\n }",
"function simpleXMLToObject($str_xml) {\n\n $xml = simplexml_load_string($str_xml, null, LIBXML_NOCDATA);\n\n if ($xml == null)\n return null;\n \n $json = json_encode($xml);\n\n return json_decode($json,FALSE);\n }",
"public function initFromReader($xml)\r\n {\r\n $empty = $xml->isEmptyElement;\r\n\r\n if ($xml->hasAttributes) {\r\n $moreAttributes = $xml->moveToFirstAttribute();\r\n while ($moreAttributes) {\r\n if (!$this->setKnownAttribute($xml)) {\r\n //skip unknown attributes...\r\n }\r\n $moreAttributes = $xml->moveToNextAttribute();\r\n }\r\n }\r\n\r\n if (!$empty) {\r\n $xml->read();\r\n while ($xml->nodeType != \\XMLReader::END_ELEMENT) {\r\n if ($xml->nodeType != \\XMLReader::ELEMENT) {\r\n //no-op: skip any insignificant whitespace, comments, etc.\r\n }\r\n else if (!$this->setKnownChildElement($xml)) {\r\n $n = $xml->localName;\r\n $ns = $xml->namespaceURI;\r\n //skip the unknown element\r\n while ($xml->nodeType != \\XMLReader::END_ELEMENT && $xml->localName != $n && $xml->namespaceURI != $ns) {\r\n $xml->read();\r\n }\r\n }\r\n $xml->read(); //advance the reader.\r\n }\r\n }\r\n }",
"public static function loadXML($xml) {\n\t\t$dom = new DOMDocument();\n\t\t$dom->loadXML($xml);\n\t\t$xrd_elements = $dom->getElementsByTagName('XRD');\n\t\t\n\t\treturn self::from_dom($xrd_elements->item(0));\n\t}",
"function synchronizeXMLData( $xmlData ) \n {\n \n // convert XML data into a simpleXML object\n $multilingualData = simplexml_load_string( $xmlData );\n \n $seriesObject = new XMLObject_Multilingual_Series();\n \n // for each series\n foreach( $multilingualData as $series ) {\n \n // tell series object to synchronize XML Data \n $seriesObject->synchronizeXMLData( $series );\n \n } // next series\n \n }",
"function xml_to_associative_array($xml_object)\n{\n\t$objects_array = array(); // create empty array where structure of objects will be converted\n\n\tforeach($xml_object->attributes() as $attr_key => $value) // set attributes id and values\n\t{\n\t\t$objects_array['@attributes'][$attr_key] = (string)$value;\n\t}\n\n\tforeach($xml_object as $index => $child) // recursively call function on all of the children (xml sub objects)\n\t{\n\t\t$objects_array[$index][] = xml_to_associative_array($child);\n\t}\n\n\tif($xml_object->count() == 0) // if its the last object in tree and there is no other children\n\t\t$objects_array['@value'] = $xml_object->__toString(); //convert value to string and store it under value keyword\n\n\treturn $objects_array;\n}",
"function xmlProvider() {\n\n return [\n [\n 'hello',\n 'hello',\n ],\n [\n '<element>hello</element>',\n '<element xmlns=\"http://sabredav.org/ns\">hello</element>'\n ],\n [\n '<element foo=\"bar\">hello</element>',\n '<element xmlns=\"http://sabredav.org/ns\" foo=\"bar\">hello</element>'\n ],\n [\n '<element x1:foo=\"bar\" xmlns:x1=\"http://example.org/ns\">hello</element>',\n '<element xmlns:x1=\"http://example.org/ns\" xmlns=\"http://sabredav.org/ns\" x1:foo=\"bar\">hello</element>'\n ],\n [\n '<element xmlns=\"http://example.org/ns\">hello</element>',\n '<element xmlns=\"http://example.org/ns\">hello</element>',\n '<x1:element xmlns:x1=\"http://example.org/ns\">hello</x1:element>',\n ],\n [\n '<element xmlns:foo=\"http://example.org/ns\">hello</element>',\n '<element xmlns:foo=\"http://example.org/ns\" xmlns=\"http://sabredav.org/ns\">hello</element>',\n '<element>hello</element>',\n ],\n [\n '<foo:element xmlns:foo=\"http://example.org/ns\">hello</foo:element>',\n '<foo:element xmlns:foo=\"http://example.org/ns\">hello</foo:element>',\n '<x1:element xmlns:x1=\"http://example.org/ns\">hello</x1:element>',\n ],\n [\n '<foo:element xmlns:foo=\"http://example.org/ns\"><child>hello</child></foo:element>',\n '<foo:element xmlns:foo=\"http://example.org/ns\" xmlns=\"http://sabredav.org/ns\"><child>hello</child></foo:element>',\n '<x1:element xmlns:x1=\"http://example.org/ns\"><child>hello</child></x1:element>',\n ],\n [\n '<foo:element xmlns:foo=\"http://example.org/ns\"><child/></foo:element>',\n '<foo:element xmlns:foo=\"http://example.org/ns\" xmlns=\"http://sabredav.org/ns\"><child/></foo:element>',\n '<x1:element xmlns:x1=\"http://example.org/ns\"><child/></x1:element>',\n ],\n [\n '<foo:element xmlns:foo=\"http://example.org/ns\"><child a=\"b\"/></foo:element>',\n '<foo:element xmlns:foo=\"http://example.org/ns\" xmlns=\"http://sabredav.org/ns\"><child a=\"b\"/></foo:element>',\n '<x1:element xmlns:x1=\"http://example.org/ns\"><child a=\"b\"/></x1:element>',\n ],\n ];\n\n }",
"public function xmlToArray($xml, $options = array()) {\r\n\t\t$defaults = array(\r\n\t\t\t'namespaceSeparator' \t=> ':',\t\t//you may want this to be something other than a colon\r\n\t\t\t'attributePrefix' \t\t=> '@', \t//to distinguish between attributes and nodes with the same name\r\n\t\t\t'alwaysArray' \t\t\t=> array(), //array of xml tag names which should always become arrays\r\n\t\t\t'autoArray' \t\t\t=> true, //only create arrays for tags which appear more than once\r\n\t\t\t'textContent' \t\t\t=> '$', //key used for the text content of elements\r\n\t\t\t'autoText' \t\t\t\t=> true, //skip textContent key if node has no attributes or child nodes\r\n\t\t\t'keySearch' \t\t\t=> false, //optional search and replace on tag and attribute names\r\n\t\t\t'keyReplace' \t\t\t=> false //replace values for above search values (as passed to str_replace())\r\n\t\t);\r\n\t\t$options = array_merge($defaults, $options);\r\n\t\t$namespaces = $xml->getDocNamespaces();\r\n\t\t$namespaces[''] = null; //add base (empty) namespace\r\n\t \r\n\t\t//get attributes from all namespaces\r\n\t\t$attributesArray = array();\r\n\t\tforeach ($namespaces as $prefix => $namespace) {\r\n\t\t\tforeach ($xml->attributes($namespace) as $attributeName => $attribute) {\r\n\t\t\t\t//replace characters in attribute name\r\n\t\t\t\tif ($options['keySearch']) $attributeName =\r\n\t\t\t\t\t\tstr_replace($options['keySearch'], $options['keyReplace'], $attributeName);\r\n\t\t\t\t$attributeKey = $options['attributePrefix']\r\n\t\t\t\t\t\t. ($prefix ? $prefix . $options['namespaceSeparator'] : '')\r\n\t\t\t\t\t\t. $attributeName;\r\n\t\t\t\t$attributesArray[$attributeKey] = (string)$attribute;\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\t//get child nodes from all namespaces\r\n\t\t$tagsArray = array();\r\n\t\tforeach ($namespaces as $prefix => $namespace) {\r\n\t\t\tforeach ($xml->children($namespace) as $childXml) {\r\n\t\t\t\t//recurse into child nodes\r\n\t\t\t\t$childArray = $this->xmlToArray($childXml, $options);\r\n\t\t\t\tlist($childTagName, $childProperties) = each($childArray);\r\n\t \r\n\t\t\t\t//replace characters in tag name\r\n\t\t\t\tif ($options['keySearch']) $childTagName =\r\n\t\t\t\t\t\tstr_replace($options['keySearch'], $options['keyReplace'], $childTagName);\r\n\t\t\t\t//add namespace prefix, if any\r\n\t\t\t\tif ($prefix) $childTagName = $prefix . $options['namespaceSeparator'] . $childTagName;\r\n\t \r\n\t\t\t\tif (!isset($tagsArray[$childTagName])) {\r\n\t\t\t\t\t//only entry with this key\r\n\t\t\t\t\t//test if tags of this type should always be arrays, no matter the element count\r\n if(is_array($childArray[$childTagName]) && count($childArray[$childTagName]) == 0) {\r\n $tagsArray[$childTagName] = \"\";\r\n } else {\r\n //print_r($childArray);\r\n $tagsArray[$childTagName] =\r\n in_array($childTagName, $options['alwaysArray']) || !$options['autoArray']\r\n ? array($childProperties) : $childProperties;\r\n }\r\n\t\t\t\t} elseif (\r\n\t\t\t\t\tis_array($tagsArray[$childTagName]) && array_keys($tagsArray[$childTagName])\r\n\t\t\t\t\t=== range(0, count($tagsArray[$childTagName]) - 1)) {\r\n\t\t\t\t\t//key already exists and is integer indexed array\r\n\t\t\t\t\t$tagsArray[$childTagName][] = $childProperties;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//key exists so convert to integer indexed array with previous value in position 0\r\n\t\t\t\t\t$tagsArray[$childTagName] = array($tagsArray[$childTagName], $childProperties);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t //echo \"<pre>\"; print_r($tagsArray); echo \"</pre>\";\r\n\t\t//get text content of node\r\n\t\t$textContentArray = array();\r\n\t\t$plainText = trim((string)$xml);\r\n\t\tif ($plainText !== '') $textContentArray[$options['textContent']] = $plainText;\r\n\t \r\n\t\t//stick it all together\r\n\t\t$propertiesArray = !$options['autoText'] || $attributesArray || $tagsArray || ($plainText === '')\r\n\t\t\t\t? array_merge($attributesArray, $tagsArray, $textContentArray) : $plainText;\r\n\t \r\n\t\t//return node as array\r\n\t\treturn array(\r\n\t\t\t$xml->getName() => $propertiesArray\r\n\t\t);\r\n\t}",
"private function xml2array($xml) \n\t{ \n\t\t$json = json_encode( simplexml_load_string($xml));\n\t\treturn json_decode($json, TRUE);\n\t}",
"private function parse()\n {\n $this->parseChildrenNodes($this->_dom, $this->_rootNode);\n }",
"protected function extractXml($xml){\r\n\t$data = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);\r\n\t\r\n\t$ret = array();\r\n\t$ret['system_type'] = (string)$data->row[0]->attributes()->system_type;\r\n\t$ret['validate'] = (string)$data->row[0]->attributes()->validate;\r\n\t$ret['predefined'] = (string)$data->row[0]->attributes()->predefined;\r\n\t$ret['size'] = (string)$data->row[0]->attributes()->size;\r\n\t$ret['unique'] = (string)$data->row[0]->attributes()->unique;\r\n\t$ret['cleanup'] = (string)$data->row[0]->attributes()->cleanup;\r\n\t$ret['name'] = (string)$data->row[0]->name;\r\n\t$ret['title'] = (string)$data->row[0]->title;\r\n\t$ret['table'] = (string)$data->row[0]->table;\r\n\t$ret['default_value'] = (string)$data->row[0]->default_value;\r\n\t$ret['default_lock_url'] = (string)$data->row[0]->default_lock_url;\r\n\treturn $ret; \r\n}",
"public function hydrate(\\SimpleXMLElement $data, EntityInterface $entity)\n {\n foreach($this->metadata->getProperties() as $property) {\n $extractor = $property->getExtractor();\n\n /* @var $extracted \\SimpleXMLElement */\n $extracted = $extractor($data); // Get SimpleXMLElement from response XML tree.\n\n if ($property->isOneToMany()) {\n $splObjectStorage = $entity->{$property->getGetter()}();\n $splObjectStorage->removeAll($splObjectStorage);\n\n $entityMetadata = $property->getTargetEntity();\n $hydrator = new EntityHydrator($entityMetadata);\n\n $className = $entityMetadata->getName();\n\n if (!$extracted) {\n throw new Exception\\RuntimeException(\"Something gone wrong,\n data could not be parsed \".$data->asXML());\n }\n\n foreach ($extracted as $xmlElement) {\n $entity->{$property->getHandler()}($hydrator->hydrate($xmlElement,\n new $className()));\n }\n continue;\n } else {\n if (empty($extracted)) continue;\n $entity->{$property->getHandler()}((string)$extracted);\n }\n }\n return $entity;\n }",
"private function load( $xml ) {\n\t\t$fils = 0;\n\t\t$array = array();\n\n\t\tforeach( $this->namespaces as $uri => $prefix ) { \n\t\t\tforeach( $xml->children($uri) as $key => $value ) { \n\t\t\t\t$child = $this->load( $value );\n\n\t\t\t\t// To deal with the attributes, \n\t\t\t\t// only works for attributes without a namespace, or in with xml namespace prefixes \n\t\t\t\tif (count( $value->attributes() ) > 0 || count( $value->attributes(\"xml\", TRUE) ) > 0 ) { \n\t\t\t\t\t$child[\"@attributes\"] = $this->getAttributes( $value );\n\t\t\t\t}\n\t\t\t\t// Also add the namespace when there is one\n\t\t\t\tif ( !empty( $uri ) ) { \n\t\t\t\t\t$child[\"@namespace\"] = $uri;\n\t\t\t\t}\n\n\t\t\t\t//Let see if the new child is not in the array\n\t\t\t\tif( !in_array( $key, array_keys($array) ) ) {\n\t\t\t\t\t$array[$key] = NULL;\n\t\t\t\t\t$array[$key][] = $child;\n\t\t\t\t}\n\t\t\t\telse { \n\t\t\t\t\t//Add an element in an existing array\n\t\t\t\t\t$array[$key][] = $child;\n\t\t\t\t}\n\n\t\t\t\t$fils++;\n\t\t\t}\n\t\t}\n\n\t\t# no container, returning value\n\t\tif ( $fils == 0 ) {\n\t\t\treturn array( (string) $xml );\n\t\t}\n\n\t\treturn $array;\n\t}",
"public function hydrate( array $attributes ) {\n\n\t\t// Set all the field from $data\n\t\tforeach ( $attributes as $fieldName => $fieldValue ) {\n\t\t\t$this->set( $fieldName, $fieldValue );\n\t\t}\n\n\t}",
"public function setXML(SimpleXMLElement $xml);",
"private function toArray($xml) {\n if (is_string($xml)) $xml = new SimpleXMLElement($xml);\n $children = $xml->children();\n if ( !$children ) return (string) $xml;\n $arr = array();\n foreach ($children as $key => $node) {\n $node = $this->toArray($node);\n\n // support for 'anon' non-associative arrays\n if ($key == 'anon') {\n \t$key = count($arr);\n }\n\n // if the node is already set, put it into an array\n if (isset($arr[$key])) {\n if (!is_array($arr[$key]) || !isset($arr[$key][0]) || $arr[$key][0] == null) {\n \t$arr[$key] = array($arr[$key]);\n }\n $arr[$key][] = $node;\n } else {\n $arr[$key] = $node;\n }\n }\n\n return $arr;\n }",
"public function hydrate($data){\n foreach ($data as $key => $value){\n $method = 'set'.ucfirst($key);\n \n if (method_exists($this, $method)){\n $this->$method($value);\n }\n }\n }",
"public function simpleXML2Array($xml){\n\n $array = (array)$xml;\n\n if (count($array) == 0) {\n $array = (string)$xml; \n }\n\n if (is_array($array)) {\n //recursive Parser\n foreach ($array as $key => $value){\n if (is_object($value)) {\n if(strpos(get_class($value),\"SimpleXML\")!==false){\n $array[$key] = $this->simpleXML2Array($value);\n }\n } else {\n $array[$key] = $this->simpleXML2Array($value);\n }\n }\n }\n\n return $array;\n \n }",
"function populateFromXML ($showXML, $eventsXML, $organizationsXML, $venuesXML, $eventIn = NULL, $organizationIn = NULL) {\n\n $this->show_id = $showXML->id;\n \n if (isset($eventIn)) {\n $this->event = $eventIn;\n $this->event_id = $eventIn->event_id;\n }\n else {\n $eventXML = findShowEvent ($eventsXML, $showXML->event);\n $this->event = new Event();\n $this->event->populateFromXML ($eventXML, $organizationsXML, $organizationIn);\n $this->event_id = $this->event->event_id;\n }\n\n $this->venue_id = $showXML->venue;\n $venueXML = findVenue($venuesXML, $showXML->venue);\n if (isset($venueXML)) {\n $this->venue = new Venue();\n $this->venue->populateFromXML ($venueXML);\n }\n\n $this->formatDateAndTimeStrings ($showXML->day, $showXML->date, $showXML->time);\n\n }",
"public function fromDataXml(SimpleXMLElement $testCaseInstanceXml)\r\n\t{\r\n\t\tif(isset($testCaseInstanceXml[\"testCaseInstanceName\"]))\r\n\t\t{\r\n\t\t\t$this->testCaseInstanceName = ((string)$testCaseInstanceXml[\"testCaseInstanceName\"]);\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($testCaseInstanceXml->Input as $input)\r\n\t\t{\r\n\t\t\t$testDataObject = KalturaTestDataObject::generatefromXml($input);\r\n\t\t\t$this->input[] = $testDataObject;\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($testCaseInstanceXml->OutputReference as $outputReference)\r\n\t\t{\r\n\t\t\t$testDataObject = KalturaTestDataObject::generatefromXml($outputReference);\r\n\t\t\t$this->outputReference[] = $testDataObject;\r\n\t\t}\r\n\t}",
"function simplexml_merge (SimpleXMLElement &$xml1, SimpleXMLElement $xml2) {\n $dom1 = new DomDocument();\n $dom2 = new DomDocument();\n $dom1->loadXML($xml1->asXML());\n $dom2->loadXML($xml2->asXML());\n // pull all child elements of second XML\n $xpath = new domXPath($dom2);\n $xpathQuery = $xpath->query('/*/*');\n for ($i = 0; $i < $xpathQuery->length; $i++)\n {\n // and pump them into first one\n $dom1->documentElement->appendChild(\n $dom1->importNode($xpathQuery->item($i), true));\n }\n $xml1 = simplexml_import_dom($dom1);\n}",
"public function setFromNode(SimpleXMLElement $xml_node, $config)\n {\n $id_store = $config->getStore()->getStoreId();\n $id_website = Mage::getModel('core/store')->load($id_store)->getWebsiteId();\n $array = Mage::helper('lensync')->xmlToAssoc($xml_node);\n if (empty($array['billing_address']['billing_email']) || $config->isDebugMode() || $config->get('orders/fake_email')) {\n $array['billing_address']['billing_email'] = $array['order_id'] . '-' . $array['marketplace'] . '@lengow.com';\n }\n\n // first get by email\n $this->setWebsiteId($id_website)\n ->loadByEmail($array['billing_address']['billing_email']);\n\n if (!$this->getId()) {\n $this->setImportMode(true);\n $this->setWebsiteId($id_website);\n $this->setConfirmation(null);\n $this->setForceConfirmed(true);\n $this->setPasswordHash($this->hashPassword($this->generatePassword(8)));\n $this->setFromLengow(1);\n }\n\n // Billing address\n $temp_names = array(\n 'firstname' => $array['billing_address']['billing_firstname'],\n 'lastname' => $array['billing_address']['billing_lastname'],\n );\n $billing_names = self::getNames($temp_names, $config->get('orders/split_name'));\n $array['billing_address']['billing_firstname'] = $billing_names['firstname'];\n $array['billing_address']['billing_lastname'] = $billing_names['lastname'];\n $billing_address = $this->convertAddress($array['billing_address']);\n $this->addAddress($billing_address);\n\n // Shipping address\n $temp_names = array(\n 'firstname' => $array['delivery_address']['delivery_firstname'],\n 'lastname' => $array['delivery_address']['delivery_lastname'],\n );\n $billing_names = self::getNames($temp_names, $config->get('orders/split_name'));\n $array['delivery_address']['delivery_firstname'] = $billing_names['firstname'];\n $array['delivery_address']['delivery_lastname'] = $billing_names['lastname'];\n\n if ($array['tracking_informations']['tracking_relay'] != '') {\n $array['delivery_address']['tracking_relay'] = $array['tracking_informations']['tracking_relay'];\n }\n $shipping_address = $this->convertAddress($array['delivery_address'], 'shipping');\n $this->addAddress($shipping_address);\n Mage::helper('core')->copyFieldset('lengow_convert_billing_address', 'to_customer', $array['billing_address'],\n $this);\n\n // set group\n $this->setGroupId($config->get('orders/customer_group'));\n\n $this->save();\n return $this;\n }",
"public function setXML($xml)\r\n\t{\r\n\t\t$this->dom->loadXML($xml);\r\n\t}",
"function parseXml($inXml){\n\t$tidy = tidy_parse_string($inXml, array(\"output-xml\" => true,\"input-xml\" => true));\n\t$tidy->cleanRepair();\n\t\n\t//create simpleXML object from data\n\t$result = new SimpleXMLElement($tidy);\n\treturn $result;\n}",
"public function hydrate($data) {\n foreach ($data as $key => $value) {\n $method = 'set' . ucfirst($key);\n if(!isset($value)){\n $v = null;\n }else{\n $v = $value;\n }\n if (method_exists($this, $method)) {\n $this -> $method($v);\n }\n }\n\t}",
"public function parse() {\n\n // check xml load\n if(!$this->xml)\n return false;\n\n $city = new City();\n foreach($this->xml->attributes() as $key => $value) {\n if(isset(Mapping::mapCity()[$key]))\n $city->{Mapping::mapCity()[$key]} = (string) $value;\n }\n\n $fact = new Detail();\n foreach ($this->xml->fact[0] as $key => $value) {\n if(isset(Mapping::mapDetail()[$key])) {\n $fact->{Mapping::mapDetail()[$key]} = (string) $value;\n }\n\n }\n $city->fact = $fact;\n\n $fact = new Detail();\n foreach ($this->xml->yesterday[0] as $key => $value) {\n if(isset(Mapping::mapDetail()[$key])) {\n $fact->{Mapping::mapDetail()[$key]} = (string) $value;\n }\n\n }\n $city->yesterday = $fact;\n\n $days = array();\n foreach($this->xml->day as $value) {\n $day = new Day();\n foreach ($value as $key => $value1) {\n if(isset(Mapping::mapDay()[$key])) {\n $day->{Mapping::mapDay()[$key]} = (string) $value1;\n }\n //var_dump($value1->attributes()[\"typeid\"]);\n\n\n }\n foreach ($value->day_part as $key2 => $value2) {\n $detail = new Detail();\n foreach ($value2 as $key3 => $value3) {\n if(isset(Mapping::mapDetail()[$key3])) {\n $detail->{Mapping::mapDetail()[$key3]} = (string) $value3;\n }\n if(isset(Mapping::mapDetail()[\"inner\"][$key3])) {\n $detail->{Mapping::mapDetail()[\"inner\"][$key3]} = (string) $value3->avg;\n }\n }\n $day->{$value2->attributes()[\"type\"]} = $detail;\n }\n $days[(string)$value->attributes()[\"date\"]] = $day;\n }\n $city->days = $days;\n\n return $city;\n }",
"function decode_xml($data) {\n return @get_object_vars(simplexml_load_string($data));\n }",
"function populate() {\n $this->populateInputElements($this->children);\n }",
"private function parseCategories($xml){\n $catalogue = $xml->shop->categories;\n $categoryData = array();\n foreach ($catalogue as $categories) {\n foreach ($categories as $category) {\n if ($category != null){\n $categoryData['name'] = $category;\n foreach ($category->attributes() as $key => $value) {\n $categoryData['parent_id'] = 0;\n if ($key == 'id') {\n $categoryData['id_prom'] = $value;\n $categoryData['parent_id_prom'] = 0;\n }\n elseif ($key == 'parentId') {\n $categoryData['parent_id_prom'] = (int)$value;\n }\n }\n $this->addCategory($categoryData);\n }\n }\n }\n }",
"public function hydrate($object, array $data);",
"public function getDataToImportData () {\n\n $orders = $this->getImportedOrderData([\n 'products',\n 'userAddress',\n 'orderType',\n 'payment'\n ]);\n $data = $this->prepareXmlArray($orders);\n $result = ArrayToXml::convert($data);\n\n return $result;\n }",
"public static function fromXml( $input, $callback = NULL, $_recurse = FALSE )\n\t{\n\t\t// Get input, loading an xml string with simplexml if its the top level of recursion\n\t\t$data = ( ( !$_recurse ) && is_string( $input ) ) ? simplexml_load_string( $input ) : $input;\n\n\t\t// Convert SimpleXMLElements to array\n\t\tif ( $data instanceof SimpleXMLElement ) {\n\t\t\t$data = (array)$data;\n\t\t}\n\n\t\t// Recurse into arrays\n\t\tif ( is_array( $data ) ) foreach ( $data as &$item ) {\n\t\t\t$item = Arr::fromXml( $item, $callback, TRUE );\n\t\t}\n\n\t\t// Run callback and return\n\t\treturn ( !is_array( $data ) && is_callable( $callback ) ) ? call_user_func( $callback, $data ) : $data;\n\t}",
"public function hydrate($data) {\r\n $this->orm->hydrate($data)->force_all_dirty();\r\n }",
"public function __construct(SimpleXMLElement $xml)\n\t {\n\t\tparent::__construct($xml);\n\n\t\t$this->_db = SQL::get(\"MySQL\");\n\t\t$this->_slicer = new AddressSlicer($this->city . \", \" . $this->address);\n\t\t$this->_gis = new GisInfo($this->city, $this->city . \", \" . $this->address);\n\n\t\t$this->defineDistrict();\n\t\t$this->createXML();\n\t }",
"public function fillFromXml($arg){\n if(is_array($arg)){\n $arg = (Object) $arg;\n }\n \n foreach(static::$_fields as $field){\n if(isset($arg->$field)){\n $value = $arg->$field;\n $this->$field = $value;\n }\n }\n return $this;\n }",
"public function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->nom = $dataSet['nom'];\r\n $this->archi = $dataSet['archi'];\r\n $this->version = $dataSet['version'];\r\n $this->ihm = $dataSet['ihm'];\r\n $this->visible = $dataSet['visible'];\r\n }",
"static public function fromXML($XML, $action_or_object = null)\n\t{\t\t\n\t\tif (!$action_or_object)\n\t\t{\n\t\t\t$action_or_object = $XML->name();\n\t\t}\n\t\t\n\t\t$type = QuickBooks_Utilities::actionToObject($action_or_object);\n\t\t$class = 'QuickBooks_Object_' . ucfirst(strtolower($type));\n\t\t\n\t\tif (class_exists($class))\n\t\t{\n\t\t\t$Object = QuickBooks_Object::_fromXMLHelper($class, $XML);\n\t\t\t\n\t\t\t$children = array();\n\t\t\tswitch ($Object->object())\n\t\t\t{\n\t\t\t\tcase QUICKBOOKS_OBJECT_PURCHASEORDER:\n\t\t\t\t\t\n\t\t\t\t\t$children = array(\n\t\t\t\t\t\t'PurchaseOrderLineRet' => array( 'QuickBooks_Object_PurchaseOrder_PurchaseOrderLine', 'addPurchaseOrderLine' ), \n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUICKBOOKS_OBJECT_INVOICE:\n\t\t\t\t\t\n\t\t\t\t\t$children = array( \n\t\t\t\t\t\t'InvoiceLineRet' => array( 'QuickBooks_Object_Invoice_InvoiceLine', 'addInvoiceLine' ), \n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUICKBOOKS_OBJECT_ESTIMATE:\n\t\t\t\t\t\n\t\t\t\t\t$children = array( \n\t\t\t\t\t\t'EstimateLineRet' => array( 'QuickBooks_Object_Estimate_EstimateLine', 'addEstimateLine' ), \n\t\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUICKBOOKS_OBJECT_SALESRECEIPT:\n\t\t\t\t\t\n\t\t\t\t\t$children = array( \n\t\t\t\t\t\t'SalesReceiptLineRet' => array( 'QuickBooks_Object_SalesReceipt_SalesReceiptLine', 'addSalesReceiptLine' ), \n\t\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUICKBOOKS_OBJECT_JOURNALENTRY:\n\t\t\t\t\t\n\t\t\t\t\t$children = array(\n\t\t\t\t\t\t'JournalCreditLine' => array( 'QuickBooks_Object_JournalEntry_JournalCreditLine', 'addCreditLine' ), \n\t\t\t\t\t\t'JournalDebitLine' => array( 'QuickBooks_Object_JournalEntry_JournalDebitLine', 'addDebitLine' ), \n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($children as $node => $tmp)\n\t\t\t{\n\t\t\t\t$childclass = $tmp[0];\n\t\t\t\t$childmethod = $tmp[1];\n\t\t\t\t\n\t\t\t\tif (class_exists($childclass))\n\t\t\t\t{\n\t\t\t\t\tforeach ($XML->children() as $ChildXML)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($ChildXML->name() == $node)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ChildObject = QuickBooks_Object::_fromXMLHelper($childclass, $ChildXML);\n\t\t\t\t\t\t\t$Object->$childmethod($ChildObject);\t\t\t\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\t\n\t\t\treturn $Object;\n\t\t}\n\t\t\n\t\treturn false;\t\t\n\t}",
"public function hydrate(array $data){ \n \tforeach ($data as $key => $value){\n \t\t$method = 'set'.ucfirst($key); \n \tif (method_exists($this, $method)){\n \t$this->$method($value);\n }\n }\n\t}",
"function setXmlArray(){\n \n $xmlData = simplexml_load_file($this->urlXml);\n $this->xmlArray = (array)$xmlData;\n \n }",
"public function loadData($xml)\n {\n if (($xml = new \\SimpleXMLElement($xml, LIBXML_COMPACT | LIBXML_PARSEHUGE)) === false) {\n throw new \\Exception('Invalid XML File.');\n }\n $this->dataToConvert = $xml->xpath('page');\n\n if ($this->dataToConvert == '') {\n throw new \\Exception('XML Data is empty');\n }\n }",
"abstract public function getDataprotXML();",
"public function initDom($xml)\n {\n // Initialize DOM with specified $xml.\n $this->dom = new SimpleXMLElement($xml);\n $this->_addCredentials();\n }",
"private static function renderAsXML($data=array(), $rootNodeName = 'data', $xml=null, $nodeName='unknownNode') {\n\n\t\t// turn off compatibility mode as simple xml throws a wobbly if you don't.\n\t\tif (ini_get('zend.ze1_compatibility_mode') == 1) {\n\t\t\tini_set ('zend.ze1_compatibility_mode', 0);\n\t\t}\n\n\t\tif ($xml == null) {\n\t\t\t$xml = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$rootNodeName />\");\n\t\t}\n\n\t\t// loop through the data passed in.\n\t\tforeach($data as $key => $value) {\n\t\t// no numeric keys in our xml please!\n\t\t\tif (is_numeric($key)) {\n\t\t\t// make string key...\n\t\t\t\t$key = $nodeName. (string) $key;\n\t\t\t}\n\n\t\t\t// replace anything not alpha numeric\n\t\t\t$key = preg_replace('/[^a-z]/i', '', $key);\n\n\t\t\t// if there is another array found recrusively call this function\n\t\t\tif (is_array($value)) {\n\t\t\t\t$node = $xml->addChild($key);\n\t\t\t\t// recrusive call.\n\t\t\t\tself::renderAsXML($value, $rootNodeName, $node, $nodeName);\n\t\t\t}\n\t\t\telse {\n\t\t\t// add single node.\n\t\t\t\t$value = htmlentities($value);\n\t\t\t\t$xml->addChild($key,$value);\n\t\t\t}\n\n\t\t}\n\t\t// pass back as string. or simple xml object if you want!\n\n\t\t$dom = dom_import_simplexml($xml)->ownerDocument;\n\t\t$dom->formatOutput = true;\n\t\treturn $dom->saveXML();\n\t}",
"function convert_xml_to_assoc($xml) {\n $assoc = array();\n \n foreach((array)$xml as $key => $value) {\n if(is_object($value)) {\n $assoc[$key] = convert_xml_to_assoc($value);\n } else {\n $assoc[$key] = $value;\n }\n }\n \n return $assoc;\n}",
"function xml_to_array()\r\n {\r\n $output=array();\r\n \r\n foreach($this->xpath_map as $key=>$value)\r\n {\r\n $output[$key]=$value['data'];\r\n }\r\n \r\n return $output;\r\n }",
"protected function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->label = $dataSet['label'];\r\n $this->description = $dataSet['description'];\r\n $this->contenu = $dataSet['contenu'];\r\n }",
"protected function populateStructure()\n {\n $this->treeStructure = \\Genesis\\Utils\\Common::createArrayObject(\n $this->getRequestStructure()\n );\n }",
"public function decorateDataNode(\\DOMElement $data_node);",
"protected function fillXml(\\SimpleXMLElement $element, $data)\n {\n foreach ($data as $key => $value) {\n if (is_array($value) || is_object($value)) {\n if (!is_numeric($key)) {\n $child = $element->addChild($key);\n } else {\n $child = $element;\n }\n \n $this->fillXml($child, $value);\n } else {\n $element->addChild($key, $value);\n }\n }\n }",
"public function fromArray(array $data)\n {\n if (empty($data)) {\n throw new DomException('Array is empty', 2);\n } elseif (count($data) > 1) {\n throw new DomException('Root array accepts only a key', 2);\n }\n\n $root = key($data);\n\n if (self::validTag($root) === false) {\n throw new DomException('Invalid root <' . $root . '> tag', 2);\n }\n\n if ($this->documentElement) {\n $this->removeChild($this->documentElement);\n }\n\n $this->enableRestoreInternal(true);\n\n $this->generate($this, $data, 2);\n\n $this->raise($this->exceptionlevel);\n\n $this->enableRestoreInternal(false);\n }",
"public function parseEntries(SimpleXMLElement $tree)\n {\n if (isset($tree->outline)) {\n foreach ($tree->outline as $item) {\n if (isset($item->outline)) {\n $this->parseEntries($item);\n } elseif ((isset($item['text']) || isset($item['title'])) && isset($item['xmlUrl'])) {\n $entry = new StdClass();\n $entry->category = $this->findCategory($tree);\n $entry->title = $this->findTitle($item);\n $entry->feed_url = $this->findFeedUrl($item);\n $entry->site_url = $this->findSiteUrl($item, $entry);\n $entry->type = $this->findType($item);\n $entry->description = $this->findDescription($item, $entry);\n $this->items[] = $entry;\n }\n }\n }\n }",
"public function hydrate(array $data)\n {\n foreach ($data as $key => $value) {\n $method = 'set'.ucfirst($key);\n\n if (method_exists($this, $method)) {\n $this->$method($value);\n }\n }\n }",
"function toArray( $xml )\r\n {\r\n\t\t$this->rownum=0;\r\n $newXML = new SimpleXMLElement( $xml );\r\n return $this->getArrayElements( $newXML );\r\n }",
"private function parseItem( ezcFeedEntryElement $element, DOMElement $xml )\n {\n foreach ( $xml->childNodes as $itemChild )\n {\n if ( $itemChild->nodeType === XML_ELEMENT_NODE )\n {\n $tagName = $itemChild->tagName;\n\n switch ( $tagName )\n {\n case 'id':\n $element->$tagName = $itemChild->textContent;\n break;\n\n case 'title':\n $this->parseTextNode( $element, $itemChild, 'title' );\n break;\n\n case 'rights':\n $this->parseTextNode( $element, $itemChild, 'copyright' );\n break;\n\n case 'summary':\n $this->parseTextNode( $element, $itemChild, 'description' );\n break;\n\n case 'updated':\n case 'published':\n $element->$tagName = $itemChild->textContent;\n break;\n\n case 'author':\n case 'contributor':\n $subElement = $element->add( $tagName );\n foreach ( $itemChild->childNodes as $subChild )\n {\n if ( $subChild->nodeType === XML_ELEMENT_NODE )\n {\n $subTagName = $subChild->tagName;\n if ( in_array( $subTagName, array( 'name', 'email', 'uri' ) ) )\n {\n $subElement->$subTagName = $subChild->textContent;\n }\n }\n }\n break;\n\n case 'content':\n $type = $itemChild->getAttribute( 'type' );\n $src = $itemChild->getAttribute( 'src' );\n $subElement = $element->add( $tagName );\n\n switch ( $type )\n {\n case 'xhtml':\n $nodes = $itemChild->childNodes;\n if ( $nodes instanceof DOMNodeList )\n {\n for ( $i = 0; $i < $nodes->length; $i++ )\n {\n if ( $nodes->item( $i ) instanceof DOMElement )\n {\n break;\n }\n }\n\n $contentNode = $nodes->item( $i );\n $subElement->text = $contentNode->nodeValue;\n }\n $subElement->type = $type;\n break;\n\n case 'html':\n $subElement->text = $itemChild->textContent;\n $subElement->type = $type;\n break;\n\n case 'text':\n $subElement->text = $itemChild->textContent;\n $subElement->type = $type;\n break;\n\n case null:\n $subElement->text = $itemChild->textContent;\n break;\n\n default:\n if ( preg_match( '@[+/]xml$@i', $type ) !== 0 )\n {\n foreach ( $itemChild->childNodes as $node )\n {\n if ( $node->nodeType === XML_ELEMENT_NODE )\n {\n $doc = new DOMDocument( '1.0', 'UTF-8' );\n $copyNode = $doc->importNode( $node, true );\n $doc->appendChild( $copyNode );\n $subElement->text = $doc->saveXML();\n $subElement->type = $type;\n break;\n }\n }\n }\n else if ( substr_compare( $type, 'text/', 0, 5, true ) === 0 )\n {\n $subElement->text = $itemChild->textContent;\n $subElement->type = $type;\n break;\n }\n else // base64\n {\n $subElement->text = base64_decode( $itemChild->textContent );\n $subElement->type = $type;\n }\n break;\n }\n\n if ( !empty( $src ) )\n {\n $subElement->src = $src;\n }\n\n $language = $itemChild->getAttribute( 'xml:lang' );\n if ( !empty( $language ) )\n {\n $subElement->language = $language;\n }\n\n break;\n\n case 'link':\n $subElement = $element->add( $tagName );\n\n $attributes = array( 'href' => 'href', 'rel' => 'rel', 'hreflang' => 'hreflang',\n 'type' => 'type', 'title' => 'title', 'length' => 'length' );\n\n foreach ( $attributes as $name => $alias )\n {\n if ( $itemChild->hasAttribute( $name ) )\n {\n $subElement->$alias = $itemChild->getAttribute( $name );\n }\n }\n break;\n\n case 'category':\n $subElement = $element->add( $tagName );\n\n $attributes = array( 'term' => 'term', 'scheme' => 'scheme', 'label' => 'label' );\n foreach ( $attributes as $name => $alias )\n {\n if ( $itemChild->hasAttribute( $name ) )\n {\n $subElement->$alias = $itemChild->getAttribute( $name );\n }\n }\n break;\n\n case 'source':\n $subElement = $element->add( $tagName );\n $this->parseSource( $subElement, $itemChild );\n break;\n\n default:\n $this->parseModules( $element, $itemChild, $tagName );\n break;\n }\n }\n }\n\n if ( $xml->hasAttribute( 'xml:lang' ) )\n {\n $element->language = $xml->getAttribute( 'xml:lang' );\n }\n }",
"private function parsePerson( $element, DOMElement $xml, $type )\n {\n foreach ( $xml->childNodes as $itemChild )\n {\n if ( $itemChild->nodeType === XML_ELEMENT_NODE )\n {\n $tagName = $itemChild->tagName;\n\n switch ( $tagName )\n {\n case 'name':\n case 'email':\n case 'uri':\n $element->$tagName = $itemChild->textContent;\n break;\n }\n }\n }\n }",
"function parseXml($xmlText) {\n if ($xmlText == '') {\n trace('Warning: Empty xml supplied!');\n }\n $this->navajoDoc = new DOMDocument('1.0', 'iso-8859-1');\n $this->navajoDoc->loadXML($xmlText);\n $nodelist = $this->navajoDoc->getElementsByTagName('tml');\n $this->tmlNode = $nodelist->item(0);\n #\tfor ($i = 0; $i < $nodelist->length; $i++) {\n #\t echo $nodelist->item($i)->nodeValue . \"\\n\";\n #\t}\n\n // TODO Fix this, not efficient\n $this->headerNode = $this->tmlNode->getElementsByTagName('header')->item(0);\n $this->transactionNode = $this->headerNode->getElementsByTagName('transaction')->item(0);\n # $this->dumpElement($this->headerNode);\n\n }",
"public function buildFromXML($eloXML = null){\n\t\tif ($eloXML !== null){\n\t\t\t$dom = str_get_dom($eloXML);\n\t\t\t\n\t\t\t$contentWithDataTag = $this->getElemAtPos($dom, 'content', 0);\n\t\t\t$dataTag = $this->getElemAtPos($contentWithDataTag, 'data', 0); \n\t\t\tif ($dataTag->innertext !== null){\n\t\t\t\t$content = $dataTag->innertext;\n\t\t\t}else{\n\t\t\t\t$content = '';\n\t\t\t}\n\t\t\t\n\t\t\t$this->setContent($content);\n\t\t\t\n\t\t\t$metadataElem = $this->getElemAtPos($dom, 'metadata', 0);\n\t\t\tif ($metadataElem !== null){\n\t\t\t\tforeach($metadataElem->childNodes() as $curMetadataElem){\n\t\t\t\t\t\n\t\t\t\t\tif ($curMetadataElem->tag == 'uri'){\n\t\t\t\t\t\t$curMetadataElem = $curMetadataElem->find('entry');\n\t\t\t\t\t\t$curMetadataElem = $curMetadataElem[0];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$key = 'uri';\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$key = $curMetadataElem->tag;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$value = $curMetadataElem->innertext;\n\t\t\t\t\t$this->_metadata[$key] = $value;\n\n\t\t\t\t\t// extract the id from URI\n\t\t\t\t\tif ($key === 'uri'){\n\t\t\t\t\t\t$this->_id = substr(strrchr($value, '/'), 1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// This code is to dynamically set the values for the\n\t\t\t\t\t// elo's metadatas\n\t\t\t\t\t/*\n\t\t\t\t\t * THIS WAS MESSING UP THE POPULATION OF THE CODE. \n\t\t\t\t\t * SEEMS TO BE DOING THE EXACT SAME THING AS $this->_metadata[$key] = $value; BUT ADDING A _<mt key> VARIABLE THAT\n\t\t\t\t\t * MESSES UP THE XML GENERATION.\n\t\t\t\t\t */\n//\t\t\t\t\t$keyVar = \"_\" . $key;\n//\t\t\t\t\t$this->$keyVar = $value;\n//\t\t\t\t\t$this->addMetadata($key, $value);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$resourceElem = $this->getElemAtPos($dom, 'resource', 0);\n\t\t\tif ($resourceElem !== null){\n\t\t\t\tif ($resourceElem ){\n\t\t\t\t\tforeach($resourceElem->childNodes() as $curResourceElem){\n\t\t\t\t\t\t$key = $curResourceElem->tag;\n\t\t\t\t\t\t$value = $curResourceElem->innertext;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->_resources[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function amazon_xml_parsexml ( $xmlcontent )\n\t\t{\n\t\t\t$String = $xmlcontent;\n\t\t\t$Encoding = $this->amazon_xml_encoding( $String );\n\t\t\t$String = $this->amazon_xml_deleteelements( $String, \"?\" );\n\t\t\t$String = $this->amazon_xml_deleteelements( $String, \"!\" );\n\t\t\t$Data = $this->amazon_xml_readxml( $String, $Data, $Encoding );\n\t\t\treturn($Data);\n\t\t}",
"public static function toXML($data, $rootNodeName = 'ResultSet', &$xml = null) {\n\t\t// turn off compatibility mode as simple xml throws a wobbly if you don't.\n\t\tif(ini_get('zend.ze1_compatibility_mode') == 1) {\n\t\t\tini_set('zend.ze1_compatibility_mode', 0);\n\t\t}\n\n\t\tif(is_null($xml)) {\n\t\t\t$xml = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$rootNodeName/>\");\n\t\t}\n\n\t\t// loop through the data passed in.\n\t\tforeach($data as $key => $value) {\n\t\t\t// no numeric keys in our xml please!\n\t\t\t$numeric = 0;\n\t\t\tif(is_numeric($key)) {\n\t\t\t\t$numeric = 1;\n\t\t\t\t$key = $rootNodeName;\n\t\t\t}\n\n\t\t\t// delete any char not allowed in XML element names\n\t\t\t$key = preg_replace('/[^a-z0-9\\-\\_\\.\\:]/i', '', $key);\n\n\t\t\t// if there is another array found recrusively call this function\n\t\t\tif(is_array($value)) {\n\t\t\t\t$node = SnipplrXML::isAssoc($value) || $numeric ? $xml->addChild($key) : $xml;\n\n\t\t\t\t// recrusive call.\n\t\t\t\tif($numeric) {\n\t\t\t\t\t$key = 'anon';\n\t\t\t\t}\n\t\t\t\tSnipplrXML::toXml($value, $key, $node);\n\t\t\t} else {\n\t\t\t\t// add single node.\n\t\t\t\t$value = htmlentities($value);\n\t\t\t\t$xml->addChild($key, $value);\n\t\t\t}\n\t\t}\n\n\t\t// pass back as XML\n\t\treturn $xml->asXML();\n\t}",
"public static function xml2array($xml)\n {\n $arr = array();\n \n if(is_file($xml))\n {\n $xml = file_get_contents($xml);\n }\n $xml = (string)$xml;\n libxml_use_internal_errors(true);\n $dom = new DOMDocument();\n $dom->loadXML($xml);\n $sheets = $dom->getElementsByTagName(SheetConv::XML_WORKSHEET);\n for($i = 0; $i < $sheets->length; $i++)\n {\n $vals = array();\n $sheet = $sheets->item($i);\n $tables = $sheet->getElementsByTagName(SheetConv::XML_TABLE); \n // the sheet has only one table\n if($tables->length > 0)\n {\n $table = $tables->item(0);\n $rows = $table->getElementsByTagName(SheetConv::XML_ROW);\n // the table should has more than one row, first row was the field\n if($rows->length > 0)\n {\n $fields = array();\n $fieldRow = $rows->item(0);\n $fieldCells = $fieldRow->getElementsByTagName(SheetConv::XML_CELL);\n // field cells index\n for($fci = 0; $fci < $fieldCells->length; $fci++)\n {\n // $row->cell->data->value\n $fields[$fci] = $fieldCells->item($fci)->nodeValue;\n }\n \n // value rows index\n for($vri = 1; $vri < $rows->length; $vri++)\n {\n $val = array();\n $valRow = $rows->item($vri);\n $valCells = $valRow->getElementsByTagName(SheetConv::XML_CELL);\n $current = 0;\n // value cells index\n for($vci = 0; $vci < $valCells->length; $vci++)\n {\n if($valCells->item($vci)->getAttribute('ss:Index'))\n {\n $val[$fields[$vci]] = '';\n $current = $valCells->item($vci)->getAttribute('ss:Index') - 1;\n }\n if(isset($fields[$current]))\n {\n $val[$fields[$current]] = $valCells->item($vci)->nodeValue;\n $current++;\n }\n }\n $vals[] = $val;\n }\n }\n }\n $arr[$i] = $vals; \n }\n return $arr;\n }"
] | [
"0.5695247",
"0.5576091",
"0.55355716",
"0.5468124",
"0.5425573",
"0.533159",
"0.5282869",
"0.5281103",
"0.52694905",
"0.52694905",
"0.52639276",
"0.52410084",
"0.5237841",
"0.5216843",
"0.51920295",
"0.51734436",
"0.5112408",
"0.5105196",
"0.50991386",
"0.5088285",
"0.5078034",
"0.5069438",
"0.5068841",
"0.5062994",
"0.5061777",
"0.5059187",
"0.50581527",
"0.505164",
"0.49899316",
"0.4971672",
"0.49373037",
"0.49239096",
"0.49234706",
"0.4920665",
"0.49119046",
"0.48827803",
"0.48766327",
"0.48629344",
"0.48559478",
"0.4853892",
"0.48415625",
"0.48397583",
"0.4828589",
"0.48197925",
"0.48167244",
"0.48044664",
"0.47872058",
"0.47851092",
"0.47842112",
"0.47755647",
"0.4765132",
"0.47610798",
"0.4759862",
"0.47563314",
"0.47516346",
"0.47440737",
"0.47412103",
"0.47367948",
"0.4733882",
"0.47200835",
"0.47200626",
"0.47179744",
"0.47022155",
"0.4700899",
"0.46996677",
"0.46954376",
"0.4695412",
"0.4672325",
"0.46722034",
"0.46702754",
"0.46654707",
"0.4664799",
"0.46634704",
"0.4661622",
"0.4661084",
"0.4657795",
"0.46508625",
"0.46369228",
"0.46347994",
"0.46338648",
"0.4629234",
"0.46285215",
"0.46195206",
"0.4608245",
"0.4608119",
"0.4589024",
"0.4584828",
"0.45846444",
"0.45802358",
"0.45792598",
"0.45788163",
"0.45775136",
"0.45684996",
"0.45676443",
"0.45673487",
"0.45672473",
"0.45489585",
"0.454435",
"0.4542636",
"0.4541824",
"0.45378128"
] | 0.0 | -1 |
This method serializes the data into XML. This is used to create xCard or xCal documents. | public function xmlSerialize(Xml\Writer $writer)
{
$parameters = [];
foreach ($this->parameters as $parameter) {
if ('VALUE' === $parameter->name) {
continue;
}
$parameters[] = $parameter;
}
$writer->startElement(strtolower($this->name));
if (!empty($parameters)) {
$writer->startElement('parameters');
foreach ($parameters as $parameter) {
$writer->startElement(strtolower($parameter->name));
$writer->write($parameter);
$writer->endElement();
}
$writer->endElement();
}
$this->xmlSerializeValue($writer);
$writer->endElement();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toXML();",
"public function toXML()\n {\n // TODO: Implement toXML() method.\n }",
"function toXML()\n {\n // Not implemented yet.\n }",
"public function GetRawXml()\n\t\t{\n\t\t\t$xml = \"\";\n\n\t\t\tif (isset($this->InternalID))\n\t\t\t\t$xml .= \"<InternalID>$this->InternalID</InternalID>\";\n\n\t\t\tif (isset($this->Login))\n\t\t\t\t$xml .= \"<Login>$this->Login</Login>\";\n\n\t\t\tif (isset($this->Name))\n\t\t\t\t$xml .= \"<Name>$this->Name</Name>\";\n\n\t\t\tif (isset($this->CPF))\n\t\t\t\t$xml .= \"<CPF>$this->CPF</CPF>\";\n\n\t\t\tif (isset($this->RG))\n\t\t\t\t$xml .= \"<RG>$this->RG</RG>\"; \n\n\t\t\tif (isset($this->DateOfBirth))\n\t\t\t\t$xml .= \"<DateOfBirth>$this->DateOfBirth</DateOfBirth>\";\n\n\t\t\tif (isset($this->ClientSince))\n\t\t\t\t$xml .= \"<ClientSince>$this->ClientSince</ClientSince>\"; \n\n\t\t\tif (isset($this->LastUpdate))\n\t\t\t\t$xml .= \"<LastUpdate>$this->LastUpdate</LastUpdate>\";\n\t\t\n\t\t\tif (isset($this->Emails) && count($this->Emails) > 0)\n\t\t\t{\n\t\t\t\t$xml .= \"<Emails>\";\n\n\t\t\t\tforeach($this->Emails as $email)\n\t\t\t\t{\n\t\t\t\t\t$xml .= \"<Email>$email</Email>\";\n\t\t\t\t}\n\n\t\t\t\t$xml .= \"</Emails>\";\n\t\t\t}\n\n\t\t\tif (isset($this->Phones) && count($this->Phones) > 0)\n\t\t\t{\n\t\t\t\t$xml .= \"<Phones>\";\n\n\t\t\t\tforeach($this->Phones as $tel)\n\t\t\t\t{\n\t\t\t\t\t$xml .= \"<Phone type=\\\"$tel->Type\\\">$tel->Number</Phone>\";\n\t\t\t\t}\n\n\t\t\t\t$xml .= \"</Phones>\";\n\t\t\t}\n\n\t\t\tif (isset($this->Addresses) && count($this->Addresses) > 0)\n\t\t\t{\n\t\t\t\t$xml .= \"<Addresses>\";\n\n\t\t\t\tforeach($this->Addresses as $addr)\n\t\t\t\t{\n\t\t\t\t\t$xml .= \"<Address city=\\\"$addr->City\\\" state=\\\"$addr->State\\\" zip=\\\"$addr->ZipCode\\\" update=\\\"$addr->Update\\\"><![CDATA[$addr->Address]]></Address>\";\n\t\t\t\t}\n\n\t\t\t\t$xml .= \"</Addresses>\";\n\t\t\t}\n\n\t\t\tif (isset($this->Orders) && count($this->Orders) > 0)\n\t\t\t{\n\t\t\t\t$xml .= \"<Orders>\";\n\n\t\t\t\tforeach($this->Orders as $o)\n\t\t\t\t{\n\t\t\t\t\t$xml .= \"<Order id=\\\"$o->Id\\\" date=\\\"$o->Date\\\" name=\\\"$o->Name\\\" value=\\\"$o->Value\\\" method=\\\"$o->Method\\\" loginMethod=\\\"$o->LoginMethod\\\" status=\\\"$o->Status\\\" />\";\n\t\t\t\t}\n\n\t\t\t\t$xml .= \"</Orders>\";\n\t\t\t}\n\n\t\t\tif (isset($this->Resources) && count($this->Resources) > 0)\n\t\t\t{\n\t\t\t\t$xml .= \"<Resources>\";\n\n\t\t\t\tforeach($this->Resources as $r)\n\t\t\t\t{\n\t\t\t\t\t$xml .= \"<Resource name=\\\"$r->Name\\\" date=\\\"$r->Date\\\" description=\\\"$r->Description\\\" mimeType=\\\"$r->MimeType\\\"><![CDATA[$r->Data]]></Resource>\";\n\t\t\t\t}\n\n\t\t\t\t$xml .= \"</Resources>\";\n\t\t\t}\n\n\t\t\t$validation = Security::IntegrityHash(IntegrationData::DataPushKey, $xml);\n\n\t\t\t$xml = \"<Data-Push Validation=\\\"$validation\\\"><Push>\" . $xml . \"</Push></Data-Push>\";\n\n\t\t\treturn $xml;\n\t\t}",
"public function to_xml()\n {\n $xml_string = \"\";\n if(count($this->data))\n {\n $xml_string = \"<{$this->bean}>\";\n foreach($this->data as $key => $val)\n {\n $xml_string .= \"<{$key}>{$val}</{$key}>\";\n }\n $xml_string .= \"</{$this->bean}>\"; \n } \n return $xml_string;\n }",
"public function createXML() {}",
"public function asXML();",
"public function toXml($data=array())\r\n {\r\n return ArrayToXml::convert($data);\r\n }",
"public function export($data)\n {\n $data = array($this->root => $data);\n\n echo '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>';\n $this->recurse($data, 0);\n echo PHP_EOL;\n }",
"function render_xml( $data ) {\n\n\t\theader (\"Content-Type:text/xml\"); \n\t\t$xml = new SimpleXMLElement( '<results></results>' );\n\t\t$xml = $this->object_to_xml( $data, $xml );\n\t\techo $this->tidy_xml( $xml );\n\t\t\n\t}",
"private function xml()\n {\n $xml = Array2XML::createXML('rastreio', $this->data);\n return $xml->saveXML();\n }",
"public static function toXml($data, $rootNodeName = 'data', &$xml=null) {\n // turn off compatibility mode as simple xml throws a wobbly if you don't.\n if ( ini_get('zend.ze1_compatibility_mode') == 1 ) ini_set ( 'zend.ze1_compatibility_mode', 0 );\n if ( is_null( $xml ) ) {\n $xml = simplexml_load_string(stripslashes(\"<?xml version='1.0' encoding='utf-8'?><root xmlns:example='http://example.namespace.com' version='1.0'></root>\"));\n }\n // loop through the data passed in.\n foreach( $data as $key => $value ) {\n // no numeric keys in our xml please!\n $numeric = false;\n if ( is_numeric( $key ) ) {\n $numeric = 1;\n $key = $rootNodeName;\n }\n\n // delete any char not allowed in XML element names\n $key = preg_replace('/[^a-z0-9\\-\\_\\.\\:]/i', '', $key);\n\n //check to see if there should be an attribute added (expecting to see _id_)\n $attrs = false;\n\n //if there are attributes in the array (denoted by attr_**) then add as XML attributes\n if ( is_array( $value ) ) {\n foreach($value as $i => $v ) {\n $attr_start = false;\n $attr_start = stripos($i, 'attr_');\n if ($attr_start === 0) {\n $attrs[substr($i, 5)] = $v; unset($value[$i]);\n }\n }\n }\n\n\n // if there is another array found recursively call this function\n if ( is_array( $value ) ) {\n\n if ( Vsb::is_assoc( $value ) || $numeric ) {\n\n // older SimpleXMLElement Libraries do not have the addChild Method\n if (method_exists('SimpleXMLElement','addChild'))\n {\n $node = $xml->addChild( $key, null, 'http://www.lcc.arts.ac.uk/' );\n if ($attrs) {\n foreach($attrs as $key => $attribute) {\n $node->addAttribute($key, $attribute);\n }\n }\n }\n\n }else{\n $node =$xml;\n }\n\n // recrusive call.\n if ( $numeric ) $key = 'anon';\n Vsb::toXml( $value, $key, $node );\n } else {\n\n // older SimplXMLElement Libraries do not have the addChild Method\n if (method_exists('SimpleXMLElement','addChild'))\n {\n $childnode = $xml->addChild( $key, $value, 'http://www.lcc.arts.ac.uk/' );\n if ($attrs) {\n foreach($attrs as $key => $attribute) {\n $childnode->addAttribute($key, $attribute);\n }\n }\n }\n }\n }\n\n // pass back as unformatted XML\n //return $xml->asXML('data.xml');\n\n // if you want the XML to be formatted, use the below instead to return the XML\n $doc = new DOMDocument('1.0');\n $doc->preserveWhiteSpace = false;\n @$doc->loadXML( Vsb::fixCDATA($xml->asXML()) );\n $doc->formatOutput = true;\n //return $doc->saveXML();\n return $doc->save('data.xml');\n }",
"protected function renderAsXML() {}",
"function xml_export ($data) {\r\n\t\t$xml = XML_serialize($data);\r\n\t\tif ($xml === NULL) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t return $xml;\r\n\t\t}\r\n\t}",
"public function encodeXml($responseData) {\n\t\t$xml = new SimpleXMLElement('<?xml version=\"1.0\"?><diseases></diseases>');\n\t\t$this->array_to_xml( $responseData,$xml);\n\t\treturn $xml->asXML();\n\t}",
"public function encodeXml($responseData) {\n\t\t\t$xml = new SimpleXMLElement('<?xml version=\"1.0\"?><mobile></mobile>');\n\t\t\tforeach($responseData as $key=>$value) {\n\t\t\t\t$xml->addChild($key, $value);\n\t\t\t}\n\t\t\treturn $xml->asXML();\n\t\t}",
"public function toXml() : string\n {\n $root = Inflector::camelCase($this->_name ?? 'record');\n\n return Xml::fromArray([$root => $this->toArray()]);\n }",
"private function xml() {\n if( $this->format === 'text/hal+xml' ) {\n header('Content-Type: text/hal+xml; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\XmlWriter(true);\n \n return $writer->execute($hal_response);\n } else {\n header('Content-Type: text/xml; charset=utf-8', TRUE, $this->status);\n $xml_data = new \\SimpleXMLElement('<?xml version=\"1.0\"?><data></data>');\n static::array_to_xml($this->content,$xml_data);\n \n return $xml_data->asXML();\n }\n \n }",
"public function encodeXml($responseData) {\n\t\t$xml = new SimpleXMLElement('<?xml version=\"1.0\"?><mobile></mobile>');\n\t\tforeach($responseData as $key=>$value) {\n\t\t\t$xml->addChild($key, $value);\n\t\t}\n\t\treturn $xml->asXML();\n\t}",
"public function encodeXml($responseData) {\n $xml = new SimpleXMLElement('<?xml version=\"1.0\"?><mobile></mobile>');\n foreach($responseData as $key=>$value) {\n $xml->addChild($key, $value);\n }\n return $xml->asXML();\n }",
"public function toXml(): string\n {\n $root = Inflector::camelCase($this->name() ?? 'record');\n\n return Xml::fromArray([$root => $this->toArray()]);\n }",
"public function xml()\n {\n // if dirty data exists\n $this->swallow();\n // if redirecting\n if ($this->redirect) {\n /*header(\"Location: {$this->redirect}\");\n // more headers\n foreach ( $this->headers as $header ) {\n header($header);\n }*/\n $this->redirect($this->redirect, array(), false);\n } else {\n // header xml data\n header('Content-Type: text/xml');\n //过滤$CFG\n if (!empty($this->vars['CFG'])) {\n unset($this->vars['CFG']);\n }\n // more headers\n foreach ($this->headers as $header) {\n header($header);\n }\n // set varibales data\n $results = Utility::array2XML($this->vars);\n // send\n echo $results;\n }\n }",
"public function toXML()\n {\n $xmlString = \"<?xml version=\\\"1.0\\\"?><conversion></conversion>\";\n $xml = new \\SimpleXMLElement($xmlString);\n\n if (isset($this->timestamp)) {\n $xml->addChild(\"timestamp\", $this->timestamp);\n }\n if (isset($this->timestamp_sql)) {\n $xml->addChild(\"timestamp_sql\", $this->timestampSql);\n }\n if (isset($this->contact_id)) {\n $xml->addChild(\"contact_id\", $this->contactId);\n }\n if (isset($this->contact_email)) {\n $xml->addChild(\"contact_email\", $this->contactEmail);\n }\n if (isset($this->contact_external_id)) {\n $xml->addChild(\"contact_external_id\", $this->contactExternalId);\n }\n if (isset($this->value)) {\n $xml->addChild(\"value\", $this->value);\n }\n if (isset($this->mailing_sent_date)) {\n $xml->addChild(\"mailing_sent_date\", $this->mailingSentTimestamp);\n }\n if (isset($this->mailing_sent_date_sql)) {\n $xml->addChild(\"mailing_sent_date_sql\", $this->mailingSentTimestampSql);\n }\n if (isset($this->mailing_id)) {\n $xml->addChild(\"mailing_id\", $this->mailingId);\n }\n if (isset($this->mailing_name)) {\n $xml->addChild(\"mailing_name\", $this->mailingName);\n }\n if (isset($this->site_id)) {\n $xml->addChild(\"site_id\", $this->siteId);\n }\n if (isset($this->site_name)) {\n $xml->addChild(\"site_name\", $this->siteName);\n }\n if (isset($this->goal_id)) {\n $xml->addChild(\"goal_id\", $this->goalId);\n }\n if (isset($this->goal_name)) {\n $xml->addChild(\"goal_name\", $this->goalName);\n }\n if (isset($this->link_id)) {\n $xml->addChild(\"link_id\", $this->linkId);\n }\n if (isset($this->link_url)) {\n $xml->addChild(\"link_url\", $this->linkUrl);\n }\n\n return $xml;\n }",
"public function __toString() {\n return $this->getDocument()->saveXml();\n }",
"public function toXML() {\n\t\t$xml = '<' . $this->type . '>' . PHP_EOL;\n\t\t$xml .= ' <ids>' . PHP_EOL;\n\t\tforeach ($this->ids as $id) {\n\t\t\t$xml .= ' <id>' . $id . '</id>' . PHP_EOL;\n\t\t}\n\t\t$xml .= ' </ids>' . PHP_EOL;\n\t\t$xml .= '</' . $this->type . '>' . PHP_EOL;\n\t\treturn $xml;\n\t}",
"function toXml() {\n $domtree = new DOMDocument('1.0', 'UTF-8');\n $this->addSelfToDocument($domtree, $domtree);\n return $domtree->saveXML();\n }",
"public function toString()\n\t\t{\t\t\tif (count($this->serialized) > 0 && array_key_exists(0, $this->serialized)) {\n\n\t\t\t\t// Get class of first item\n\t\t\t\t$itemName = key($this->serialized[0]);\n\t\t\t\t$root = \\ChickenWire\\Util\\Str::pluralize($itemName);\n\n\t\t\t} else {\n\t\t\t\t$root = null;\n\t\t\t}\n\t\t\t\n\t\t\t// Create XML writer\n\t\t\t$this->writer = new \\XmlWriter();\n\t\t\t$this->writer->openMemory();\n\t\t\tif (!is_null($root)) $this->writer->startElement($root);\n\t\t\t$this->write($this->serialized);\n\t\t\tif (!is_null($root)) $this->writer->endElement();\n\t\t\t$this->writer->endDocument();\n\t\t\t$xml = $this->writer->outputMemory(true);\n\n\n\n//\t\t\tvar_dump($this->serialized);\n\t\t\treturn $xml;\n\n\n\t\t\t//return json_encode($this->serialized);\n\t\t}",
"public function toXML()\n {\n $namespace = 'tns';\n $writer = new XMLWriter();\n $writer->openMemory();\n $writer->setIndent(true);\n $writer->setIndentString(' ');\n $writer->startElementNs($namespace, 'BrRac', null);\n $writer->writeElementNs($namespace, 'BrOznRac', null, $this->getInvoiceNumber());\n $writer->writeElementNs($namespace, 'OznPosPr', null, $this->getBusinessLocationCode());\n $writer->writeElementNs($namespace, 'OznNapUr', null, $this->getPaymentDeviceCode());\n $writer->endElement();\n\n return $writer->outputMemory();\n }",
"function to_xml(){\n\t\tif ($this->skip) return \"\";\n\t\t\n\t\t$str=\"<item id='\".$this->get_id().\"' >\";\n\t\tfor ($i=0; $i<sizeof($this->config->text); $i++){\n\t\t\t$extra = $this->config->text[$i][\"name\"];\n\t\t\t$str.=\"<\".$extra.\"><![CDATA[\".$this->data[$extra].\"]]></\".$extra.\">\";\n\t\t}\n\t\treturn $str.\"</item>\";\n\t}",
"private function _toXml()\r\n {\r\n $dom = new DOMDocument();\r\n $dom->formatOutput = false;\r\n $dom->loadXML('<basket></basket>');\r\n foreach ($this->_exportFields as $name)\r\n {\r\n $value = NULL;\r\n $getter = \"get\" . ucfirst($name);\r\n if (method_exists($this, $getter))\r\n {\r\n $value = $this->$getter();\r\n }\r\n\r\n if (empty($value))\r\n {\r\n continue;\r\n }\r\n\r\n $node = $this->_createDomNode($dom, $value, $name);\r\n if ($node instanceof DOMNode)\r\n {\r\n $dom->documentElement->appendChild($node);\r\n }\r\n else if ($node instanceof DOMNodeList)\r\n {\r\n for ($i = 0, $n = $node->length; $i < $n; $i++)\r\n {\r\n $child = $node->item(0);\r\n if ($child instanceof DOMNode)\r\n {\r\n $dom->documentElement->appendChild($child);\r\n }\r\n }\r\n }\r\n }\r\n return $dom->saveXML($dom->documentElement);\r\n }",
"public function __toString() {\n return '[XML Object]';\n }",
"public function dp_savemultivalue_xml($data)\n {\n return $this->call('dp_savemultivalue_xml', static::prepareParams($data, [\n 'matching_id' => ['numeric'], // Specify the desired donor_id\n 'field_name' => ['string', 20], // Use the code value associated with the flag. For example, the ‘AL’, flag in this example had a description value of ‘Alumni’.\n 'code' => ['string', 30], // Enter the Code value of the checkbox entry you wish to set\n 'user_id' => $this->appName,\n ]));\n }",
"protected function buildXml()\n\t{\n\t\t$xml = new DOMDocument('1.0', 'utf8');\n\t\t$cra_inquiry = $xml->createElement('LoanRecord');\n\t\t$cra_inquiry->appendChild($this->buildData($xml));\n\t\t\n\t\t$xml->appendChild($cra_inquiry);\n\t\t\n\t\treturn $xml;\n\t}",
"public function __toString()\n {\n return $this->asXML();\n }",
"function saveToXML(){\n\t\t$str='<collections>';\n\t\t$str.='<collection>';\n\t\tforeach($this->items as $item){\n\t\t\t$str.=\"<item>\";\n\t\t\t$str.=\"<show>$item[0]</show>\";\n\t\t\t$str.=\"<description>\".htmlspecialchars($item[1]).\"</description>\";\n\t\t\t$str.=\"<url>\".htmlspecialchars($item[2]).\"</url>\";\n\t\t\t$str.=\"</item>\";\n\t\t}\n\t\t$str.='</collection>';\n\t\t$str.='</collections>';\n\t\t$xml = new SimpleXMLElement($str);\n\t\t$filename=$this->filename.\".xml\";\n\t\theader('Content-Type: text/xml');\n\t\theader('Content-Disposition: attachment; filename=\"'.$filename.'\"');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\tdie($xml->asXML());\n\t\theader(\"location:index.php\");\n\t}",
"public static function toXml($data): string\n {\n if (!is_array($data) || count($data) <= 0) {\n $msg = 'Convert To Xml Error! Invalid Array!';\n throw new InvalidArgumentException($msg);\n }\n\n $xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><jdpay>';\n foreach ($data as $key => $val) {\n $xml .= is_numeric($val) ? '<'.$key.'>'.$val.'</'.$key.'>' :\n '<'.$key.'><![CDATA['.$val.']]></'.$key.'>';\n }\n $xml .= '</jdpay>';\n\n return $xml;\n }",
"abstract protected function serializeData();",
"public function toXml() : string\n {\n return $this->toDomDocument()->saveXML();\n }",
"public function __toString()\n {\n return $this->saveXML();\n }",
"private static function renderAsXML($data=array(), $rootNodeName = 'data', $xml=null, $nodeName='unknownNode') {\n\n\t\t// turn off compatibility mode as simple xml throws a wobbly if you don't.\n\t\tif (ini_get('zend.ze1_compatibility_mode') == 1) {\n\t\t\tini_set ('zend.ze1_compatibility_mode', 0);\n\t\t}\n\n\t\tif ($xml == null) {\n\t\t\t$xml = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$rootNodeName />\");\n\t\t}\n\n\t\t// loop through the data passed in.\n\t\tforeach($data as $key => $value) {\n\t\t// no numeric keys in our xml please!\n\t\t\tif (is_numeric($key)) {\n\t\t\t// make string key...\n\t\t\t\t$key = $nodeName. (string) $key;\n\t\t\t}\n\n\t\t\t// replace anything not alpha numeric\n\t\t\t$key = preg_replace('/[^a-z]/i', '', $key);\n\n\t\t\t// if there is another array found recrusively call this function\n\t\t\tif (is_array($value)) {\n\t\t\t\t$node = $xml->addChild($key);\n\t\t\t\t// recrusive call.\n\t\t\t\tself::renderAsXML($value, $rootNodeName, $node, $nodeName);\n\t\t\t}\n\t\t\telse {\n\t\t\t// add single node.\n\t\t\t\t$value = htmlentities($value);\n\t\t\t\t$xml->addChild($key,$value);\n\t\t\t}\n\n\t\t}\n\t\t// pass back as string. or simple xml object if you want!\n\n\t\t$dom = dom_import_simplexml($xml)->ownerDocument;\n\t\t$dom->formatOutput = true;\n\t\treturn $dom->saveXML();\n\t}",
"public static function exportXML()\n {\n $xml = new \\XMLWriter();\n $xml->openMemory();\n $xml->setIndent(true);\n $xml->setIndentString(\"\t\");\n $xml->startDocument(\"1.0\", \"UTF-8\");\n $xml->startElement(\"productos\");\n $productos = self::findAll();\n foreach ($productos as $producto) {\n $xml->startElement(\"producto\");\n $xml->writeAttribute(\"id\", $producto->getId());\n $xml->writeElement(\"nombre\", $producto->getNombre());\n $xml->writeElement(\"descripcion\", $producto->getDescripcion());\n $urlImagen = $producto->getImagen() ? BASE_URL.\"/productos/{$producto->getId()}?image=1\": \"\";\n $xml->writeElement(\"imagen\", $urlImagen);\n if($categoria = $producto->getCategoria()) {\n $xml->startElement(\"categoria\");\n $xml->writeAttribute(\"id\", $categoria->getId());\n $xml->writeElement(\"nombre\", $categoria->getNombre());\n $xml->writeElement(\"descripcion\", $categoria->getDescripcion());\n $xml->endElement();\n }\n $xml->endElement();\n }\n $xml->endElement();\n return $xml->outputMemory();\n }",
"protected function xml_start(){\n\t\t$attributes = \"\";\n\t\tforeach($this->attributes as $k=>$v)\n\t\t\t$attributes .= \" \".$k.\"='\".$v.\"'\";\n\n\t\tif ($this->dload){\n\t\t\tif ($pos=$this->request->get_start())\n\t\t\t\treturn \"<data pos='\".$pos.\"'\".$attributes.\">\";\n\t\t\telse\n\t\t\t\treturn \"<data total_count='\".$this->sql->get_size($this->request).\"'\".$attributes.\">\";\n\t\t}\n\t\telse\n\t\t\treturn \"<data\".$attributes.\">\";\n\t}",
"function toXML() {\n\t\treturn \"<row>\\n\" .\n\t\t\"<FiscaalGroepID>$this->FiscaalGroepID</FiscaalGroepID>\\n\" .\n\t\t\"<FiscaalGroupType>$this->FiscaalGroupType</FiscaalGroupType>\\n\" .\n\t\t\"<GewijzigdDoor>$this->GewijzigdDoor</GewijzigdDoor>\\n\" .\n\t\t\"<GewijzigdOp>$this->GewijzigdOp</GewijzigdOp>\\n\" .\n\t\t\"</row>\\n\";\n\t}",
"abstract public function getDataprotXML();",
"public function toXML()\n {\n $output = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . PHP_EOL;\n $output .= '<provisioning version=\"1.1\" productID=\"' . $this->getProductID() . '\">' . PHP_EOL;\n\n $output .= '<firmware>' . PHP_EOL;\n\n if ($this->getFirmware()) {\n $output .= '<file version=\"' . $this->getFirmware()->getVersion() . '\" url=\"' . $this->getFirmware()->getUrl() . '\"/>' . PHP_EOL;\n }\n\n $output .= '</firmware>' . PHP_EOL;\n\n if ($this->getDownloadWallpaper()) {\n $output .= '<custom>' . PHP_EOL;\n $output .= '<step type=\"DownloadWallpaper\" url=\"' . $this->getDownloadWallpaper() . '\"/>' . PHP_EOL;\n $output .= '</custom>' . PHP_EOL;\n }\n\n $output .= '<nvm>' . PHP_EOL;\n\n $iterator = new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($this->toArray()));\n foreach ($iterator as $leafValue) {\n $keys = [];\n foreach (range(0, $iterator->getDepth()) as $depth) {\n $keys[] = $iterator->getSubIterator($depth)->key();\n }\n\n // convert booleans to 0 or 1\n if (is_bool($leafValue)) {\n $leafValue = $leafValue ? '1' : '0';\n }\n\n $output .= '<param name=\"' . join('.', $keys) . '\" value=\"' . $leafValue . '\" />' . PHP_EOL;\n }\n $output .= '</nvm>' . PHP_EOL;\n\n $output .= '<custom></custom>' . PHP_EOL;\n $output .= '</provisioning>';\n\n return $output;\n }",
"public function __toString()\n {\n return $this->_sXml ;\n }",
"public function serialize()\n {\n // TODO: Implement serialize() method.\n }",
"public static function xml($data = NULL)\n\t{\n\t\tif ($data !== NULL)\n\t\t{\n\t\t\tRequest::current()->response()->body((string) $data);\n\t\t}\n\n\t\tself::headers('xml');\n\t}",
"public function toXml()\n {\n $sxe = $this->toSimpleXMLElement();\n return (!is_null($sxe)) ? $sxe->asXML() : '';\n }",
"public function serialize($data)\n {\n }",
"public function toSimpleXML()\n {\n $data = $this->getData();\n\n // dc namespace\n $ns = self::$DCNamespace;\n\n $root = new \\SimpleXMLElement(\"<oai_dc:dc \n xmlns:dc='{$ns}' xmlns:oai_dc='http://www.openarchives.org/OAI/2.0/oai_dc/' xmlns='http://www.openarchives.org/OAI/2.0/oai_dc/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd'></oai_dc:dc>\", LIBXML_NOERROR, false, 'http://purl.org/dc/elements/1.1/', true);\n\n $root->addChild(\"dc:title\", htmlspecialchars($data['title']), $ns);\n $root->addChild(\"dc:publisher\", htmlspecialchars($data['publisher']), $ns);\n $root->addChild('dc:source', htmlspecialchars($data['source']), $ns);\n $root->addChild('dc:type', $data['type'], $ns);\n\n foreach ($data['identifiers'] as $identifier) {\n $root->addChild(\"dc:identifier\", htmlspecialchars($identifier), $ns);\n }\n\n foreach ($data['descriptions'] as $description) {\n $root->addChild(\"dc:description\", htmlspecialchars($description), $ns);\n }\n\n foreach ($data['rights'] as $right) {\n $root->addChild(\"dc:rights\", htmlspecialchars($right), $ns);\n }\n\n foreach ($data['coverages'] as $coverage) {\n $root->addChild(\"dc:coverage\", htmlspecialchars($coverage), $ns);\n }\n\n foreach ($data['contributors'] as $contributor) {\n $root->addChild(\"dc:contributor\", htmlspecialchars($contributor), $ns);\n }\n\n foreach ($data['subjects'] as $subject) {\n $root->addChild(\"dc:subject\", htmlspecialchars($subject), $ns);\n }\n\n return $root;\n }",
"public function createXml()\n\t{\n\t\t$this->validate(array('name', 'id'));\n\t\t$xml_string = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><entry xmlns='http://www.w3.org/2005/Atom'></entry>\";\n\t\t$xml = simplexml_load_string($xml_string);\n\t\t$xml->addChild(\"id\", $this->id);\n\t\t$xml->addChild(\"title\");\n\t\t$xml->addChild(\"author\");\n\t\t$xml->addChild(\"updated\", \"2008-04-16\");\n\t\t$contentNode = $xml->addChild(\"content\");\n\t\t$contentNode->addAttribute(\"type\", \"application/vnd.ctct+xml\");\n\t\t$listNode = $contentNode->addChild(\"ContactList\");\n\t\t$listNode->addAttribute(\"xmlns\", \"http://ws.constantcontact.com/ns/1.0/\");\n\t\t$listNode->addChild(\"OptInDefault\", $this->optInDefault);\n\t\t$listNode->addChild(\"Name\", $this->name);\n\t\t$listNode->addChild(\"SortOrder\", $this->sortOrder);\n\t\treturn $xml->asXML();\n\t}",
"public static function toXML($data, $rootNodeName = 'ResultSet', &$xml = null) {\n\t\t// turn off compatibility mode as simple xml throws a wobbly if you don't.\n\t\tif(ini_get('zend.ze1_compatibility_mode') == 1) {\n\t\t\tini_set('zend.ze1_compatibility_mode', 0);\n\t\t}\n\n\t\tif(is_null($xml)) {\n\t\t\t$xml = simplexml_load_string(\"<?xml version='1.0' encoding='utf-8'?><$rootNodeName/>\");\n\t\t}\n\n\t\t// loop through the data passed in.\n\t\tforeach($data as $key => $value) {\n\t\t\t// no numeric keys in our xml please!\n\t\t\t$numeric = 0;\n\t\t\tif(is_numeric($key)) {\n\t\t\t\t$numeric = 1;\n\t\t\t\t$key = $rootNodeName;\n\t\t\t}\n\n\t\t\t// delete any char not allowed in XML element names\n\t\t\t$key = preg_replace('/[^a-z0-9\\-\\_\\.\\:]/i', '', $key);\n\n\t\t\t// if there is another array found recrusively call this function\n\t\t\tif(is_array($value)) {\n\t\t\t\t$node = SnipplrXML::isAssoc($value) || $numeric ? $xml->addChild($key) : $xml;\n\n\t\t\t\t// recrusive call.\n\t\t\t\tif($numeric) {\n\t\t\t\t\t$key = 'anon';\n\t\t\t\t}\n\t\t\t\tSnipplrXML::toXml($value, $key, $node);\n\t\t\t} else {\n\t\t\t\t// add single node.\n\t\t\t\t$value = htmlentities($value);\n\t\t\t\t$xml->addChild($key, $value);\n\t\t\t}\n\t\t}\n\n\t\t// pass back as XML\n\t\treturn $xml->asXML();\n\t}",
"public function getXml()\n\t{\n\t\treturn $this->buildXml();\n\t}",
"protected function _formatXmlData($params) {\n\t\tif (!class_exists('Xml')) {\n\t\t\tApp::import('Core', 'Xml');\n\t\t}\n\t\t$defaults = array('methodName' => '', 'data' => array());\n\t\t$params = array_merge($defaults, $params);\n\t\t\n\t\t$message = new XmlRpcMessage();\n\t\t$message->methodName = $params['methodName'];\n\t\t$message->setData($params['data']);\n\t\t$result = $message->toString();\n\t\n\t\t$this->_data = $result;\t\n\t}",
"public function getXml() {}",
"public function xml($data, string $root = 'root'): PsrResponseInterface;",
"public function getXmlData()\n\t{\n\t\tthrow new \\Exception('Xml export is not supported for system \"' . get_class($this) . '\"');\n\t}",
"public function getAsXml()\n {\n \n // merge addresses into one XML document\n $xml = new MyXMLWriter();\n $xml->openMemory();\n $xml->setIndent(true);\n \n $xml->startElement('COLLECTIONADDRESS');\n $xml->writeRaw($this->collection->getAsXml());\n $xml->endElement();\n \n $xml->writeRaw(parent::getAsXml());\n \n //re-assign object\n $this->xml = $xml;\n \n return parent::getAsXml();\n }",
"public function __toString() {\n\t\treturn $this->xml_definition->asXML();\n\t}",
"function toXML()\n\t{\n\t\tinclude_once(\"./Services/Xml/classes/class.ilXmlWriter.php\");\n\t\t$a_xml_writer = new ilXmlWriter;\n\t\t// set xml header\n\t\t$a_xml_writer->xmlHeader();\n\t\t$attrs = array(\n\t\t\t\"xmlns:xsi\" => \"http://www.w3.org/2001/XMLSchema-instance\",\n\t\t\t\"xsi:noNamespaceSchemaLocation\" => \"http://www.ilias.de/download/xsd/ilias_survey_4_2.xsd\"\n\t\t);\n\t\t$a_xml_writer->xmlStartTag(\"surveyobject\", $attrs);\n\t\t$attrs = array(\n\t\t\t\"id\" => $this->getSurveyId(),\n\t\t\t\"title\" => $this->getTitle()\n\t\t);\n\t\t$a_xml_writer->xmlStartTag(\"survey\", $attrs);\n\t\t\n\t\t$a_xml_writer->xmlElement(\"description\", NULL, $this->getDescription());\n\t\t$a_xml_writer->xmlElement(\"author\", NULL, $this->getAuthor());\n\t\t$a_xml_writer->xmlStartTag(\"objectives\");\n\t\t$attrs = array(\n\t\t\t\"label\" => \"introduction\"\n\t\t);\n\t\t$this->addMaterialTag($a_xml_writer, $this->getIntroduction(), TRUE, TRUE, $attrs);\n\t\t$attrs = array(\n\t\t\t\"label\" => \"outro\"\n\t\t);\n\t\t$this->addMaterialTag($a_xml_writer, $this->getOutro(), TRUE, TRUE, $attrs);\n\t\t$a_xml_writer->xmlEndTag(\"objectives\");\n\n\t\tif ($this->getAnonymize())\n\t\t{\n\t\t\t$attribs = array(\"enabled\" => \"1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attribs = array(\"enabled\" => \"0\");\n\t\t}\n\t\t$a_xml_writer->xmlElement(\"anonymisation\", $attribs);\n\t\t$a_xml_writer->xmlStartTag(\"restrictions\");\n\t\tif ($this->getAnonymize() == 2)\n\t\t{\n\t\t\t$attribs = array(\"type\" => \"free\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attribs = array(\"type\" => \"restricted\");\n\t\t}\n\t\t$a_xml_writer->xmlElement(\"access\", $attribs);\n\t\tif ($this->getStartDate())\n\t\t{\n\t\t\t$attrs = array(\"type\" => \"date\");\t\t\t\n\t\t\tpreg_match(\"/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/\", $this->getStartDate(), $matches);\n\t\t\t$a_xml_writer->xmlElement(\"startingtime\", $attrs, sprintf(\"%04d-%02d-%02dT%02d:%02d:00\", $matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[6]));\n\t\t}\n\t\tif ($this->getEndDate())\n\t\t{\n\t\t\t$attrs = array(\"type\" => \"date\");\n\t\t\tpreg_match(\"/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/\", $this->getEndDate(), $matches);\n\t\t\t$a_xml_writer->xmlElement(\"endingtime\", $attrs, sprintf(\"%04d-%02d-%02dT%02d:%02d:00\", $matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[6]));\n\n\t\t}\n\t\t$a_xml_writer->xmlEndTag(\"restrictions\");\n\t\t\n\t\t// constraints\n\t\t$pages =& $this->getSurveyPages();\n\t\t$hasconstraints = FALSE;\n\t\tforeach ($pages as $question_array)\n\t\t{\n\t\t\tforeach ($question_array as $question)\n\t\t\t{\n\t\t\t\tif (count($question[\"constraints\"]))\n\t\t\t\t{\n\t\t\t\t\t$hasconstraints = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($hasconstraints)\n\t\t{\n\t\t\t$a_xml_writer->xmlStartTag(\"constraints\");\n\t\t\tforeach ($pages as $question_array)\n\t\t\t{\n\t\t\t\tforeach ($question_array as $question)\n\t\t\t\t{\n\t\t\t\t\tif (count($question[\"constraints\"]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// found constraints\n\t\t\t\t\t\tforeach ($question[\"constraints\"] as $constraint)\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$attribs = array(\n\t\t\t\t\t\t\t\t\"sourceref\" => $question[\"question_id\"],\n\t\t\t\t\t\t\t\t\"destref\" => $constraint[\"question\"],\n\t\t\t\t\t\t\t\t\"relation\" => $constraint[\"short\"],\n\t\t\t\t\t\t\t\t\"value\" => $constraint[\"value\"],\n\t\t\t\t\t\t\t\t\"conjunction\" => $constraint[\"conjunction\"]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$a_xml_writer->xmlElement(\"constraint\", $attribs);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$a_xml_writer->xmlEndTag(\"constraints\");\n\t\t}\n\t\t\n\t\t// add the rest of the preferences in qtimetadata tags, because there is no correspondent definition in QTI\n\t\t$a_xml_writer->xmlStartTag(\"metadata\");\n\n\t\t$custom_properties = array();\n\t\t$custom_properties[\"evaluation_access\"] = $this->getEvaluationAccess();\n\t\t$custom_properties[\"status\"] = $this->getStatus();\n\t\t$custom_properties[\"display_question_titles\"] = $this->getShowQuestionTitles();\n\t\t$custom_properties[\"pool_usage\"] = (int)$this->getPoolUsage();\n\t\t\n\t\t$custom_properties[\"own_results_view\"] = (int)$this->hasViewOwnResults();\n\t\t$custom_properties[\"own_results_mail\"] = (int)$this->hasMailOwnResults();\n\t\t\n\t\t$custom_properties[\"mode_360\"] = (int)$this->get360Mode();\n\t\t$custom_properties[\"mode_360_self_eval\"] = (int)$this->get360SelfEvaluation();\n\t\t$custom_properties[\"mode_360_self_rate\"] = (int)$this->get360SelfRaters();\n\t\t$custom_properties[\"mode_360_self_appr\"] = (int)$this->get360SelfAppraisee();\n\t\t$custom_properties[\"mode_360_results\"] = $this->get360Results();\n\t\t$custom_properties[\"mode_360_skill_service\"] = (int)$this->get360SkillService();\n\t\t\n\t\t\n\t\t// :TODO: skills?\n\t\t\t\t\n\t\t// reminder/tutor notification are (currently?) not exportable\n\t\t\n\t\tforeach($custom_properties as $label => $value)\n\t\t{\n\t\t\t$a_xml_writer->xmlStartTag(\"metadatafield\");\n\t\t\t$a_xml_writer->xmlElement(\"fieldlabel\", NULL, $label);\n\t\t\t$a_xml_writer->xmlElement(\"fieldentry\", NULL, $value);\n\t\t\t$a_xml_writer->xmlEndTag(\"metadatafield\");\n\t\t}\n\n\t\t$a_xml_writer->xmlStartTag(\"metadatafield\");\n\t\t$a_xml_writer->xmlElement(\"fieldlabel\", NULL, \"SCORM\");\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md = new ilMD($this->getId(),0, $this->getType());\n\t\t$writer = new ilXmlWriter();\n\t\t$md->toXml($writer);\n\t\t$metadata = $writer->xmlDumpMem();\n\t\t$a_xml_writer->xmlElement(\"fieldentry\", NULL, $metadata);\n\t\t$a_xml_writer->xmlEndTag(\"metadatafield\");\n\t\t\n\t\t$a_xml_writer->xmlEndTag(\"metadata\");\n\t\t$a_xml_writer->xmlEndTag(\"survey\");\n\n\t\t$attribs = array(\"id\" => $this->getId());\n\t\t$a_xml_writer->xmlStartTag(\"surveyquestions\", $attribs);\n\t\t// add questionblock descriptions\n\t\t$obligatory_states =& $this->getObligatoryStates();\n\t\tforeach ($pages as $question_array)\n\t\t{\n\t\t\tif (count($question_array) > 1)\n\t\t\t{\n\t\t\t\t$attribs = array(\"id\" => $question_array[0][\"question_id\"]);\n\t\t\t\t$attribs = array(\"showQuestiontext\" => $question_array[0][\"questionblock_show_questiontext\"],\n\t\t\t\t\t\"showBlocktitle\" => $question_array[0][\"questionblock_show_blocktitle\"]);\n\t\t\t\t$a_xml_writer->xmlStartTag(\"questionblock\", $attribs);\n\t\t\t\tif (strlen($question_array[0][\"questionblock_title\"]))\n\t\t\t\t{\n\t\t\t\t\t$a_xml_writer->xmlElement(\"questionblocktitle\", NULL, $question_array[0][\"questionblock_title\"]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($question_array as $question)\n\t\t\t{\n\t\t\t\tif (strlen($question[\"heading\"]))\n\t\t\t\t{\n\t\t\t\t\t$a_xml_writer->xmlElement(\"textblock\", NULL, $question[\"heading\"]);\n\t\t\t\t}\n\t\t\t\t$questionObject =& $this->_instanciateQuestion($question[\"question_id\"]);\n\t\t\t\tif ($questionObject !== FALSE) $questionObject->insertXML($a_xml_writer, FALSE, $obligatory_states[$question[\"question_id\"]]);\n\t\t\t}\n\t\t\tif (count($question_array) > 1)\n\t\t\t{\n\t\t\t\t$a_xml_writer->xmlEndTag(\"questionblock\");\n\t\t\t}\n\t\t}\n\n\t\t$a_xml_writer->xmlEndTag(\"surveyquestions\");\n\t\t$a_xml_writer->xmlEndTag(\"surveyobject\");\n\t\t$xml = $a_xml_writer->xmlDumpMem(FALSE);\n\t\treturn $xml;\n\t}",
"public function toString() {\n\t\t$this->_createXml();\n\t\treturn $this->_xml->toString(array('cdata' => false, 'header' => true));\n\t}",
"function array_to_xml( $data, &$xml_data ) {\n \n foreach( $data as $key => $value ) {\n if( is_array($value) ) {\n if( is_numeric($key) ){\n $key = 'item'.$key; //dealing with <0/>..<n/> issues\n }\n $subnode = $xml_data->addChild($key);\n array_to_xml($value, $subnode);\n } else if ($value != null) {\n $xml_data->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n }",
"public function __toString(){\r\n return $this->saveXMl();\r\n }",
"public function GetXML() {\n $xml = '<?xml version=\"1.0\" encoding=\"utf-8\"?><getAuthorization>';\n $xml .= \"<Version>$this->version</Version>\";\n $xml .= \"<Processor>$this->processor</Processor>\";\n $xml .= \"<MerchantID>$this->merchantID</MerchantID>\";\n if (!IsNullOrEmptyString($this->terminalID))\n $xml .= \"<TerminalID>$this->terminalID</TerminalID>\";\n $xml .= \"<TransType>$this->transType</TransType>\";\n $xml .= \"<TrAmount>$this->trAmount</TrAmount>\";\n if ($this->transType == '4' || $this->transType == 4)\n $xml .= \"<NewAmount>$this->newAmount</NewAmount>\";\n $xml .= \"<TrCurrency>$this->trCurrency</TrCurrency>\";\n $xml .= \"<DateAndTime>$this->dateAndTime</DateAndTime>\";\n if (!IsNullOrEmptyString($this->PAN))\n $xml .= \"<PAN>$this->PAN</PAN>\";\n if (!IsNullOrEmptyString($this->expDate))\n $xml .= \"<ExpDate>$this->expDate</ExpDate>\";\n if (!IsNullOrEmptyString($this->track1))\n $xml .= \"<Track1>$this->track1</Track1>\";\n if (!IsNullOrEmptyString($this->track2))\n $xml .= \"<Track2>$this->track2</Track2>\";\n $xml .= \"<RRN>$this->RRN</RRN>\";\n if (!IsNullOrEmptyString($this->authCode))\n $xml .= \"<AuthCode>$this->authCode</AuthCode>\";\n if (!IsNullOrEmptyString($this->CVC2))\n $xml .= \"<CVC2>$this->CVC2</CVC2>\";\n if (!IsNullOrEmptyString($this->securityLevelInd))\n $xml .= \"<SecurityLevelInd>$this->securityLevelInd</SecurityLevelInd>\";\n if (!IsNullOrEmptyString($this->UCAF))\n $xml .= \"<UCAF>$this->UCAF</UCAF>\";\n if (!IsNullOrEmptyString($this->CAVV))\n $xml .= \"<CAVV>$this->CAVV</CAVV>\";\n if (!IsNullOrEmptyString($this->XID))\n $xml .= \"<XID>$this->XID</XID>\";\n if (!IsNullOrEmptyString($this->merchantName))\n $xml .= \"<MerchantName>$this->merchantName</MerchantName>\";\n if (!IsNullOrEmptyString($this->merchantCity))\n $xml .= \"<MerchantCity>$this->merchantCity</MerchantCity>\";\n if (!IsNullOrEmptyString($this->merchantCountry))\n $xml .= \"<MerchantCountry>$this->merchantCountry</MerchantCountry>\";\n $xml .= \"</getAuthorization>\";\n return $xml;\n }",
"function XML() {\n\t\t\treturn $this->__xml->asXML();\n\t\t}",
"private function array_to_xml( $data, &$xml_data ) {\n foreach( $data as $key => $value ) {\n if( is_numeric($key) ) {\n $key = 'item'.$key; //dealing with <0/>..<n/> issues\n }\n if( is_array($value) ) {\n $subnode = $xml_data->addChild($key);\n static::array_to_xml($value, $subnode);\n } else {\n $xml_data->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n }",
"public function displayXML()\n\t{\n\t\techo \"<pre>\";\n\t\tprint_r($this->haloXML);\n\t\techo \"</pre>\";\n\t}",
"function _oembed_create_xml($data, $node = \\null)\n {\n }",
"private function array_to_xml( $data, &$xml_data ) {\n foreach( $data as $key => $value ) {\n if( is_array($value) ) {\n if( is_numeric($key) ){\n $key = 'item'.$key; //dealing with <0/>..<n/> issues\n }\n $subnode = $xml_data->addChild($key);\n $this->array_to_xml($value, $subnode);\n\t $subnode = null;\n } else {\n $xml_data->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n\t}",
"public static function toXml( $data, $rootNodeName = 'data', $numericName = 'unknownNode', $xml = null )\n\t{\n\t\t// turn off compatibility mode as simple xml throws a wobbly if you don't.\n\t\tif ( ini_get( 'zend.ze1_compatibility_mode' ) == 1 ) {\n\t\t\tini_set( 'zend.ze1_compatibility_mode', 0 );\n\t\t}\n\n\t\tif ( $xml == null ) {\n\t\t\t$xml = simplexml_load_string( \"<?xml version='1.0' encoding='utf-8'?><$rootNodeName />\" );\n\t\t}\n\n\t\tforeach ( $data as $key => $value ) {\n\t\t\tif ( is_numeric( $key ) ) {\n\t\t\t\t$key = $numericName;\n\t\t\t}\n\n\t\t\t// replace anything not alpha numeric\n\t\t\t$key = preg_replace( '/[^a-z0-9\\-\\_\\.\\:]/i', '', $key );\n\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t$node = $xml->addChild( $key );\n\t\t\t\t// recrusive call.\n\t\t\t\tself::toXml( $value, $rootNodeName, $numericName, $node );\n\t\t\t} else {\n\t\t\t\t$tmp = $xml->addChild( $key );\n\t\t\t\t$tmp[0] = $value;\n\t\t\t}\n\n\t\t}\n\t\t// pass back as string. or simple xml object if you want!\n\t\treturn $xml->asXML();\n\t}",
"function array_to_xml($data, &$xml_data ) { \r\n // essafunçao trasforma meu array em xml\r\n \tforeach ($data as $key => $value) {\r\n \t\tif( is_array($value) ) {\r\n \t\t\tif (is_numeric($key) ) {\r\n \t\t\t\t$key = 'item'.$key;\r\n \t\t\t}\r\n \t\t\t$subnode = $xml_data->addChild($key);\r\n \t\t\tarray_to_xml($value, $subnode);\r\n \t\t} else {\r\n \t\t\tif (is_numeric($key) ) {\r\n \t\t\t\t$key = 'item'.$key;\r\n \t\t\t}\r\n \t\t\t$xml_data->addChild($key, htmlspecialchars($value));\r\n \t\t}\r\n \t}\r\n }",
"public function toXml()\n {\n return $this->response->asXML();\n }",
"public function createXML($xml) {\n\n\t\t\t$xml = parent::createXML($xml);\n\t\t\t$xml->addChild(\"company-id\",$this->getCompanyId());\n\t\t\t$xml->addChild(\"company-name\",$this->getCompanyName());\n\t\t\t$xml->addChild(\"first-name\",$this->getFirstName());\n\t\t\t$xml->addChild(\"last-name\",$this->getLastName());\n\t\t\treturn $xml;\n\t\t}",
"public function __toString(): string {\n return $this->saveXML();\n }",
"private function writeXML($array){\n\t\tif(!class_exists('XML_Serializer')){\n\t\t\t\trequire_once('XML/Serializer.php');\n\t\t}\n\n\t\t\t$options = array(\n\t\t\t\tXML_SERIALIZER_OPTION_INDENT => \"\\t\", // indent with tabs\n\t\t\t\tXML_SERIALIZER_OPTION_RETURN_RESULT => true,\n\t\t\t\tXML_SERIALIZER_OPTION_LINEBREAKS => \"\\n\", // use UNIX line breaks\n\t\t\t\tXML_SERIALIZER_OPTION_ROOT_NAME => 'data',// root tag\n\t\t\t\tXML_SERIALIZER_OPTION_DEFAULT_TAG => 'item' // tag for values \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // with numeric keys\n\t\t );\n\t\t \n\t\t\t$serializer = new XML_Serializer($options);\n \t\treturn \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\".\"\\n\".$serializer->serialize($array);\n\t}",
"public function serializeToXml()\n {\n $xml = new \\SimpleXMLElement('<?xml version=\"1.0\" encoding=\"utf-8\"?><ExtendWormConfiguration></ExtendWormConfiguration>');\n if (isset($this->day)) {\n $xml->addChild('RetentionPeriodInDays', $this->day);\n }\n return $xml->asXML();\n }",
"public function toXML() {\n $xml = new SimpleXMLElement('<'.array_pop(explode('\\\\', get_class($this))).'/>');\n foreach ($this->first()->attributes as $key => $value) {\n if (is_numeric($key)) {\n $key = 'item' . $key; //dealing with <0/>..<n/> issues\n }\n if (is_array($value)) {\n $subnode = $xml->addChild($key);\n $this->array_to_xml($value, $subnode);\n } else {\n $xml->addChild(\"$key\", htmlspecialchars(\"$value\"));\n }\n }\n return $xml->asXML();\n }",
"public function create_xml()\n {\n $email = Session::get('d_email');\n\n $data = Gpi::select('lat','long','adress','created_at')->orderBy('id','DESC')->where('email',$email)->whereDate('created_at','=', date('Y-m-d'))->get();\n // header(\"Content-type: text/xml\");\n // echo \"<markers>\\n\";\n\n // // Iterate through the rows, printing XML nodes for each\n // for($i=0;$i<count($data);$i++){\n // // ADD TO XML DOCUMENT NODE\n // echo '<marker ';\n // echo 'lat=\"' . $data[$i]->lat . '\" ';\n // echo 'lng=\"' . $data[$i]->long . '\" ';\n // echo 'adress=\"' . $data[$i]->adress . '\" ';\n // echo 'datetime=\"' . $data[$i]->created_at . '\" ';\n // echo \"/>\\n\";\n // }\n\n // // End XML file\n // echo '</markers>';\n $xml = new \\XMLWriter();\n $xml->openMemory();\n $xml->startDocument();\n $xml->startElement('markers');\n foreach($data as $user) {\n $xml->startElement('marker');\n $xml->writeAttribute('lat', $user->lat);\n $xml->writeAttribute('lng', $user->long);\n $xml->writeAttribute('adress', $user->adress);\n $xml->writeAttribute('datetime', $user->created_at);\n $xml->endElement();\n }\n $xml->endElement();\n $xml->endDocument();\n\n $content = $xml->outputMemory();\n $xml = null;\n\n return response($content)->header('Content-Type', 'text/xml');\n \n }",
"public function toXML($vars)\r\n\t{\r\n\t\t$xml = Parser::convertToDOMDocument('<xerxes />');\r\n\t\r\n\t\tforeach ( $vars as $id => $object )\r\n\t\t{\r\n\t\t\tParser::addToXML($xml, $id, $object);\r\n\t\t}\r\n\t\r\n\t\treturn $xml;\r\n\t}",
"public function serialize()\n\t{\n\t\t$xmlString = sprintf(\n\t\t\t'<%s %s>%s</%1$s>',\n\t\t\t$this->_getRootNodeName(),\n\t\t\t$this->_serializeRootAttributes(),\n\t\t\t$this->_serializeContents()\n\t\t);\n\t\t$canonicalXml = $this->_helper->getPayloadAsDoc($xmlString)->saveXML();\n\t\t$this->_schemaValidate($canonicalXml);\n\t\treturn $canonicalXml;\n\t}",
"public static function xml($data_xml)\n {\n $dom = new DOMDocument('1.0', 'utf-8');\n \n // Creazione del nodo Patient, cioè il nodo Root della risorsa\n $patient = $dom->createElement('Patient');\n // Valorizzo il namespace della risorsa e del documento XML, in questo caso la specifica FHIR\n $patient->setAttribute('xmlns', 'http://hl7.org/fhir');\n // Corrello l'elemento con il nodo superiore\n $patient = $dom->appendChild($patient);\n \n // Creazione del nodo ID sempre presente nelle risorse FHIR\n $id = $dom->createElement('id');\n // Il valore dell'ID è il valore dell'ID nella relativa tabella del DB\n $id->setAttribute('value', $data_xml[\"narrative\"][\"Id\"]);\n $id = $patient->appendChild($id);\n \n // Creazione della parte narrativa in XHTML e composta da tag HTML visualizzabili se aperto il file XML in un Browser\n $narrative = $dom->createElement('text');\n // Corrello l'elemento con il nodo superiore\n $narrative = $patient->appendChild($narrative);\n \n // Creazione del nodo status che indica lo stato della parte narrativa\n $status = $dom->createElement('status');\n // Il valore del nodo status è sempre generated, la parte narrativa è generato dal sistema\n $status->setAttribute('value', 'generated');\n $status = $narrative->appendChild($status);\n \n // Creazione del div che conterrà la tabella con i valori visualizzabili nella parte narrativa\n $div = $dom->createElement('div');\n // Link al value set della parte narrativa, cioè la codifica XHTML\n $div->setAttribute('xmlns', \"http://www.w3.org/1999/xhtml\");\n $div = $narrative->appendChild($div);\n \n // Creazione della tabella che conterrà i valori\n $table = $dom->createElement('table');\n $table->setAttribute('border', \"2\");\n $table = $div->appendChild($table);\n \n // Creazione del nodo tbody\n $tbody = $dom->createElement('tbody');\n $tbody = $table->appendChild($tbody);\n \n //Narrative\n foreach ($data_xml[\"narrative\"] as $key => $value) {\n // Creazione di una riga\n $tr = $dom->createElement('tr');\n $tr = $tbody->appendChild($tr);\n // Contact\n $td = $dom->createElement('td', $key);\n $td = $tr->appendChild($td);\n $td = $dom->createElement('td', $value);\n $td = $tr->appendChild($td);\n }\n \n //Narrative Patient.Contact\n foreach ($data_xml[\"narrative_patient_contact\"] as $key => $value) {\n // Creazione di una riga\n $tr = $dom->createElement('tr');\n $tr = $tbody->appendChild($tr);\n // Contact\n $td = $dom->createElement('td', $key);\n $td = $tr->appendChild($td);\n $td = $dom->createElement('td', $value);\n $td = $tr->appendChild($td);\n }\n \n // EXTENSIONS IN NARRATIVE\n \n foreach ($data_xml[\"extensions\"] as $key => $value) {\n // Creazione di una riga\n $tr = $dom->createElement('tr');\n $tr = $tbody->appendChild($tr);\n // Language\n $td = $dom->createElement('td', $key);\n $td = $tr->appendChild($td);\n $td = $dom->createElement('td', $value);\n $td = $tr->appendChild($td);\n }\n \n // END EXTENSIONS IN NARRATIVE\n \n \n \n //EXTENSIONS\n //donatore organi\n $extension = $dom->createElement('extension');\n $extension->setAttribute('url', 'http://hl7.org/fhir/StructureDefinition/patient-cadavericDonor');\n $extension = $patient->appendChild($extension);\n \n $valueBoolean = $dom->createElement('valueBoolean');\n $valueBoolean->setAttribute('value', $data_xml[\"extensions\"]['donatoreorgani']);\n $valueBoolean = $extension->appendChild($valueBoolean);\n \n \n //codice fiscale\n $extension1 = $dom->createElement('extension');\n $extension1->setAttribute('url', 'http://resp.local/resources/extensions/patient/codice-fiscale.xml');\n $extension1 = $patient->appendChild($extension1);\n \n $valueString1 = $dom->createElement('valueString');\n $valueString1->setAttribute('value', $data_xml[\"extensions\"]['codicefiscale']);\n $valueString1 = $extension1->appendChild($valueString1);\n \n \n //gruppo sanguigno\n $extension2 = $dom->createElement('extension');\n $extension2->setAttribute('url', 'http://resp.local/resources/extensions/patient/gruppo-sanguigno.xml');\n $extension2 = $patient->appendChild($extension2);\n \n $valueString2 = $dom->createElement('valueString');\n $valueString2->setAttribute('value', $data_xml[\"extensions\"]['grupposanguigno']);\n $valueString2 = $extension2->appendChild($valueString2);\n \n //END EXTENSIONS\n \n // Creazione del nodo identifier identificativo della risorsa Patient attraverso URI della risorsa\n $identifier = $dom->createElement('identifier');\n $identifier = $patient->appendChild($identifier);\n // Creazione del nodo use con valore fisso ad usual\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'official');\n $use = $identifier->appendChild($use);\n // Creazione del nodo system che identifica il namespace degli URI per identificare la risorsa\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'http://resp.local'); // RFC gestione URI\n $system = $identifier->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n \n // Do il valore all' URI della risorsa\n $value->setAttribute('value', $data_xml[\"narrative\"][\"Id\"]);\n $value = $identifier->appendChild($value);\n \n // Creazione del nodo active\n $active = $dom->createElement('active');\n $active->setAttribute('value', $data_xml[\"narrative\"][\"Active\"]);\n $active = $patient->appendChild($active);\n \n // Creazione del nodo per il nominativo del paziente\n $name = $dom->createElement('name');\n $name = $patient->appendChild($name);\n // Creazione del nodo use settato sempre al valore usual\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'usual');\n $use = $name->appendChild($use);\n // Creazione del nodo family\n $family = $dom->createElement('family');\n $family->setAttribute('value', $data_xml[\"patient\"]->paziente_cognome);\n $family = $name->appendChild($family);\n // Creazione del nodo given\n $given = $dom->createElement('given');\n $given->setAttribute('value', $data_xml[\"patient\"]->paziente_nome);\n $given = $name->appendChild($given);\n \n // Creazione del nodo telecom con il contatto telefonico del paziente\n $telecom = $dom->createElement('telecom');\n $telecom = $patient->appendChild($telecom);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'phone');\n $system = $telecom->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n $value->setAttribute('value', $data_xml[\"patient\"]->getPhone());\n $value = $telecom->appendChild($value);\n // Creazione del nodo use che indica la tipologia di numero di telefono\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'mobile');\n $use = $telecom->appendChild($use);\n \n // Creazione del nodo telecom con il contatto mail del paziente\n $telecom = $dom->createElement('telecom');\n $telecom = $patient->appendChild($telecom);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'email');\n $system = $telecom->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n $value->setAttribute('value', $data_xml[\"patient\"]->getMail());\n $value = $telecom->appendChild($value);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'home');\n $use = $telecom->appendChild($use);\n \n // Creazione del nodo gender\n $gender = $dom->createElement('gender');\n $gender->setAttribute('value', $data_xml[\"patient\"]->getGender());\n $gender = $patient->appendChild($gender);\n \n // Creazione del nodo birthdate\n $birthDate = $dom->createElement('birthDate');\n $birthDate->setAttribute('value', $data_xml[\"patient\"]->getBirth());\n $birthDate = $patient->appendChild($birthDate);\n \n // Creazione del nodo deceasedBoolean\n $deceasedBoolean = $dom->createElement('deceasedBoolean');\n $deceasedBoolean->setAttribute('value', $data_xml[\"patient\"]->getDeceased());\n $deceasedBoolean = $patient->appendChild($deceasedBoolean);\n \n // Creazione del nodo address\n $address = $dom->createElement('address');\n $address = $patient->appendChild($address);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'home');\n $use = $address->appendChild($use);\n // Creazione del nodo line\n $line = $dom->createElement('line');\n $line->setAttribute('value', $data_xml[\"patient\"]->getLine());\n $line = $address->appendChild($line);\n // Creazione del nodo city\n $city = $dom->createElement('city');\n $city->setAttribute('value', $data_xml[\"patient\"]->getCity());\n $city = $address->appendChild($city);\n // Creazione del nodo country\n $country = $dom->createElement('state');\n $country->setAttribute('value', $data_xml[\"patient\"]->getCountryName());\n $country = $address->appendChild($country);\n // Creazione del nodo postalCode\n $postalCode = $dom->createElement('postalCode');\n $postalCode->setAttribute('value', $data_xml[\"patient\"]->getPostalCode());\n $postalCode = $address->appendChild($postalCode);\n \n // Creazione del nodo maritalStatus\n $maritalStatus = $dom->createElement('maritalStatus');\n $maritalStatus = $patient->appendChild($maritalStatus);\n // Creazione del nodo coding\n $coding = $dom->createElement('coding');\n $coding = $maritalStatus->appendChild($coding);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', \"http://hl7.org/fhir/v3/MaritalStatus\"); // value set HL7\n $system = $coding->appendChild($system);\n // Creazione del nodo code\n $code = $dom->createElement('code');\n $code->setAttribute('value', $data_xml[\"patient\"]->getMaritalStatusCode());\n $code = $coding->appendChild($code);\n // Creazione del nodo dysplay\n $dysplay = $dom->createElement('display');\n // Do il valore all' attributo del tag\n $dysplay->setAttribute('value', $data_xml[\"patient\"]->getMaritalStatusDisplay());\n $dysplay = $coding->appendChild($dysplay);\n \n // Patient.Contact\n foreach ($data_xml[\"patient_contacts\"] as $pc) {\n // Creazione del nodo contact\n $contact = $dom->createElement('contact');\n $contact = $patient->appendChild($contact);\n // Creazione del nodo relationship\n $relationship = $dom->createElement('relationship');\n $relationship = $contact->appendChild($relationship);\n // Creazione del nodo coding\n $coding = $dom->createElement('coding');\n $coding = $relationship->appendChild($coding);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'http://hl7.org/fhir/v2/0131');\n $system = $coding->appendChild($system);\n // Creazione del nodo code\n $code = $dom->createElement('code');\n $code->setAttribute('value', $pc->getRelationship());\n $code = $coding->appendChild($code);\n // Creazione del nodo name\n $name = $dom->createElement('name');\n $name = $contact->appendChild($name);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'official');\n $use = $name->appendChild($use);\n // Creazione del nodo family\n $family = $dom->createElement('family');\n $family->setAttribute('value', $pc->getSurname());\n $family = $name->appendChild($family);\n // Creazione del nodo given\n $given = $dom->createElement('given');\n $given->setAttribute('value', $pc->getName());\n $given = $name->appendChild($given);\n // Creazione del nodo telecom\n $telecom = $dom->createElement('telecom');\n $telecom = $contact->appendChild($telecom);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'phone');\n $system = $telecom->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n $value->setAttribute('value', $pc->getTelephone());\n $value = $telecom->appendChild($value);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'home');\n $use = $telecom->appendChild($use);\n // Creazione del nodo rank\n $rank = $dom->createElement('rank');\n $rank->setAttribute('value', '1');\n $rank = $telecom->appendChild($rank);\n // Creazione del nodo telecom\n $telecom = $dom->createElement('telecom');\n $telecom = $contact->appendChild($telecom);\n // Creazione del nodo system\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'email');\n $system = $telecom->appendChild($system);\n // Creazione del nodo value\n $value = $dom->createElement('value');\n $value->setAttribute('value', $pc->getMail());\n $value = $telecom->appendChild($value);\n // Creazione del nodo use\n $use = $dom->createElement('use');\n $use->setAttribute('value', 'home');\n $use = $telecom->appendChild($use);\n }\n \n // Creazione del nodo communication\n $communication = $dom->createElement('communication');\n $communication = $patient->appendChild($communication);\n // Creazione del nodo language\n $language = $dom->createElement('language');\n $language = $communication->appendChild($language);\n // Creazione del nodo coding\n $coding = $dom->createElement('coding');\n $coding = $language->appendChild($coding);\n // Creazione del nodo system in cui si indica il value set dell' IETF\n $system = $dom->createElement('system');\n $system->setAttribute('value', 'urn:ietf:bcp:47');\n $system = $coding->appendChild($system);\n // Creazione del nodo code\n $code = $dom->createElement('code');\n $code->setAttribute('value', $data_xml[\"patient\"]->paziente_lingua);\n $code = $coding->appendChild($code);\n \n // Elimino gli spazi bianchi superflui per la viasualizzazione grafica dell'XML\n $dom->preserveWhiteSpace = false;\n // Formatto il documento per l'output\n $dom->formatOutput = true;\n $path = getcwd() . \"\\\\resources\\\\Patient\\\\\";\n // Salvo il documento XML nella cartella rsources dando come nome, l'id del paziente\n $dom->save($path . \"RESP-PATIENT-\" . $data_xml[\"narrative\"][\"Id\"] . \".xml\");\n return $dom->saveXML();\n }",
"public function toXML()\n {\n $xmlString = \"<?xml version=\\\"1.0\\\"?><recipient></recipient>\";\n $xml = new \\SimpleXMLElement($xmlString);\n\n if (isset($this->contact)) {\n $xml->addChild(\"contact\", $this->contact->toXML());\n } \n if (isset($this->mailingId)) {\n $xml->addChild(\"mailing_id\", $this->mailingId);\n }\n if (isset($this->timestamp)) {\n $xml->addChild(\"timestamp\", $this->timestamp);\n }\n if (isset($this->transactionId)) {\n $xml->addChild(\"transaction_id\", $this->transactionId);\n }\n\n return $xml;\n }",
"private function getAdditionalDataXML() {\n $extensionsXML = array();\n foreach ($this->extensions as $ext) {\n $extXML = $ext->__getAdditionalData();\n if (!empty($extXML)) $extensionsXML[] = $extXML;\n }\n $relInvoice =& $this->header['relatedInvoice'];\n $additionalInfo =& $this->header['additionalInformation'];\n\n // Validate additional data fields\n $hasData = !empty($extensionsXML) || !empty($this->attachments) || !empty($relInvoice) || !empty($additionalInfo);\n if (!$hasData) return \"\";\n\n // Generate initial XML block\n $xml = '<AdditionalData>';\n if (!empty($relInvoice)) $xml .= '<RelatedInvoice>' . XmlTools::escape($relInvoice) . '</RelatedInvoice>';\n\n // Add attachments\n if (!empty($this->attachments)) {\n $xml .= '<RelatedDocuments>';\n foreach ($this->attachments as $att) {\n $type = explode('/', $att['file']->getMimeType());\n $type = end($type);\n $xml .= '<Attachment>';\n $xml .= '<AttachmentCompressionAlgorithm>NONE</AttachmentCompressionAlgorithm>';\n $xml .= '<AttachmentFormat>' . XmlTools::escape($type) . '</AttachmentFormat>';\n $xml .= '<AttachmentEncoding>BASE64</AttachmentEncoding>';\n $xml .= '<AttachmentDescription>' . XmlTools::escape($att['description']) . '</AttachmentDescription>';\n $xml .= '<AttachmentData>' . base64_encode($att['file']->getData()) . '</AttachmentData>';\n $xml .= '</Attachment>';\n }\n $xml .= '</RelatedDocuments>';\n }\n\n // Add additional information\n if (!empty($additionalInfo)) {\n $xml .= '<InvoiceAdditionalInformation>' . XmlTools::escape($additionalInfo) . '</InvoiceAdditionalInformation>';\n }\n\n // Add extensions data\n if (!empty($extensionsXML)) $xml .= '<Extensions>' . implode('', $extensionsXML) . '</Extensions>';\n\n $xml .= '</AdditionalData>';\n return $xml;\n }",
"public function exportXml()\n {\n $time = time();\n $filePath = ROOT_DIR . \"/data/beer_$time.xml\";\n\n $xml = new SimpleXMLElement(\"<?xml version=\\\"1.0\\\"?><beers></beers>\");\n array_to_xml($this->items,$xml);\n\n try {\n $xml->asXML($filePath);\n\n App::cliLog(\"Successfully exported to $filePath\");\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }",
"protected function _createXml() {\n\t\t$methodCall = $this->_xml->createElement('methodCall', null);\n\t\t$methodCall->createElement('methodName', $this->methodName);\t\n\t\t$this->_paramsEl = $methodCall->createElement('params', null);\t\n\t\t\n\t\t$this->__parseData($this->_data, $this->_paramsEl, false);\n\t}",
"function array2xml($data, $node_name, $version = '1.0', $encoding = 'utf-8')\n {\n $xml = new DomDocument($version, $encoding);\n $xml->formatOutput = TRUE;\n $xml->appendChild(convent($node_name, $data, $xml));\n return $xml->saveXML();\n }",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize($data);",
"public function __toString(): string {\n return $this->getDocument()->saveXML();\n }",
"function write_xml($json_data,$xml,$opt){\n\n if (is_array($json_data)) { // received data as array handle as array\n write_array($json_data,$xml,$opt); // like this [1,2,3]\n return;\n }\n foreach ($json_data as $key => $value) {// iterate through data\n\n if ($opt->substitute_element) { //substitute element -c\n $key = replace_invalid_keys($key,$opt);\n }\n if (check_element_validity($key,$opt)) {\n err(\"Invalid element\",51);\n }\n $xml->startElement($key); //<key>\n\n if (is_object($value)){\n\n write_xml($value,$xml,$opt);\n }\n else if (is_array($value)) {\n write_array($value,$xml,$opt);\n }\n else{\n write_value($value,$xml,$opt);\n }\n $xml->endElement(); //<key>\n }\n}",
"private function _print_xml()\n\t{\n\t\n\t}",
"public function __toString()\r\n\t{\r\n\t\treturn $this->dom->saveXML();\r\n\t}",
"function toXML() {\r\n\t\tglobal $persons;\r\n\t\tglobal $expenses;\r\n\t\tglobal $action;\r\n\r\n\t\t$xmlString = \"<?xml version='1.0' ?>\\n<mshare version=\\\"\".VERSION.\"\\\"\";\r\n\t\t\r\n\t\tif ($action == \"CLOSE\") $xmlString .= \" state=\\\"CLOSED\\\"\";\r\n\r\n\t\t$xmlString .= \">\\n\";\r\n\r\n\t\tif (count($persons) > 0) {\r\n\t\t\t$xmlString .= \"\\t<persons>\\n\";\r\n\r\n\t\t\tfor ($i = 0; $i < count($persons); $i++) {\r\n\t\t\t\t$xmlString .= \"\\t\\t<person name=\\\"\".$persons[$i]->name.\"\\\" ID=\\\"\".$persons[$i]->ID.\"\\\"/>\\n\";\r\n\t\t\t}\r\n\r\n\t\t\t$xmlString .= \"\\t</persons>\\n\";\r\n\t\t}\r\n\r\n\t\tif (count($expenses) > 0) {\r\n\t\t\t$xmlString .= \"\\t<expenses>\\n\";\r\n\r\n\t\t\tfor ($i = 0; $i < count($expenses); $i++) {\r\n\t\t\t\t$xmlString .= \"\\t\\t<expense ID=\\\"\".$expenses[$i]->ID.\"\\\" \";\r\n\t\t\t\t$xmlString .= \"spenderID=\\\"\".$expenses[$i]->spenderID.\"\\\" \";\r\n\r\n\t\t\t\t$xmlString .= \"accountableIDs=\\\"\";\r\n\t\t\t\tfor ($j = 0; $j < count($expenses[$i]->accountableIDs); $j++) {\r\n\t\t\t\t\t$xmlString .= $expenses[$i]->accountableIDs[$j];\r\n\r\n\t\t\t\t\tif ($j != count($expenses[$i]->accountableIDs)-1) {\r\n\t\t\t\t\t\t$xmlString .= \":\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$xmlString .= \"\\\" \";\r\n\r\n\t\t\t\t$xmlString .= \"expenseDate=\\\"\".$expenses[$i]->expenseDate.\"\\\" \";\r\n\t\t\t\t$xmlString .= \"amount=\\\"\".$expenses[$i]->amount.\"\\\" \";\r\n\t\t\t\t$xmlString .= \"description=\\\"\".$expenses[$i]->description.\"\\\"\"; \r\n\r\n\t\t\t\tif ($expenses[$i]->deleted) {\r\n\t\t\t\t\t$xmlString .= \" state=\\\"DELETED\\\"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$xmlString .= \"/>\\n\";\r\n\t\t\t}\r\n\r\n\t\t\t$xmlString .= \"\\t</expenses>\\n\";\r\n\t\t}\r\n\r\n\t\t$xmlString .= \"</mshare>\\n\";\r\n\r\n\t\treturn $xmlString;\r\n\t}"
] | [
"0.69224465",
"0.68389636",
"0.6811392",
"0.6603152",
"0.6524429",
"0.6431068",
"0.63286585",
"0.63255",
"0.62672925",
"0.6265436",
"0.6241309",
"0.62378",
"0.621041",
"0.6189859",
"0.61737996",
"0.61037415",
"0.6076019",
"0.60379934",
"0.6034699",
"0.5992452",
"0.5984355",
"0.59708923",
"0.59624213",
"0.59607285",
"0.5959024",
"0.5954657",
"0.5941295",
"0.5918068",
"0.5910127",
"0.58942366",
"0.5893154",
"0.5887609",
"0.58771664",
"0.5870771",
"0.5869847",
"0.5868444",
"0.5866747",
"0.58404744",
"0.5835557",
"0.5818246",
"0.5814853",
"0.5789931",
"0.578981",
"0.57581127",
"0.57480687",
"0.57342577",
"0.572889",
"0.5724502",
"0.5718686",
"0.57158166",
"0.5689499",
"0.5672493",
"0.56641924",
"0.56617844",
"0.565049",
"0.5644391",
"0.5643154",
"0.56395084",
"0.56324595",
"0.56283504",
"0.56213933",
"0.56131065",
"0.56128806",
"0.56019455",
"0.5592358",
"0.55881524",
"0.55739176",
"0.5564242",
"0.5548129",
"0.5534033",
"0.55276537",
"0.5522838",
"0.5513539",
"0.55124015",
"0.55089647",
"0.55080664",
"0.55078334",
"0.55040133",
"0.55019706",
"0.549198",
"0.5486772",
"0.54770106",
"0.54746795",
"0.5460925",
"0.5459626",
"0.5456377",
"0.545054",
"0.54413176",
"0.54413176",
"0.54405123",
"0.54405123",
"0.54405123",
"0.54405123",
"0.54405123",
"0.54405123",
"0.54347074",
"0.5432337",
"0.543173",
"0.5430082",
"0.5425427",
"0.5422078"
] | 0.0 | -1 |
This method serializes only the value of a property. This is used to create xCard or xCal documents. | protected function xmlSerializeValue(Xml\Writer $writer)
{
$valueType = strtolower($this->getValueType());
foreach ($this->getJsonValue() as $values) {
foreach ((array) $values as $value) {
$writer->writeElement($valueType, $value);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function serialize(PropertyHolder $data);",
"public function toProp() {\n\t\treturn htmlspecialchars(json_encode($this, true));\n\t}",
"public function serialize($value){\n return parent::serialize($value);\n }",
"protected function getSerializedPropertyValue(string $property, mixed $value): mixed\n {\n if ($property === 'original') {\n return $this->originalToArray();\n }\n\n if ($property === 'attributes') {\n return $this->attributesToArray();\n }\n\n return $value;\n }",
"public function json(): string {\n\t\t$properties = array_filter(get_object_vars($this));\n\n\t\treturn json_encode($properties, JSON_UNESCAPED_SLASHES);\n\t}",
"public function jsonSerialize() {\n return json_encode($this->value);\n }",
"public function propertyToIso(Reflection_Property $property, $value = null)\n\t{\n\t\tif (($property instanceof Reflection_Property_Value) && !isset($value)) {\n\t\t\t$value = $property->value();\n\t\t}\n\t\treturn (is_null($value) && $property->getAnnotation('null')->value)\n\t\t\t? $value\n\t\t\t: $this->toIso($value, $property->getType());\n\t}",
"public function serialize()\n {\n return serialize($this->activeValue);\n }",
"public function jsonSerialize() {\r\n\t\treturn $this->props;\r\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Progrupa\\Azure\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n $serializableProperties = $this->getProperties();\n foreach ($serializableProperties as $property => $val) {\n if (is_a($val, \"\\DateTime\")) {\n $serializableProperties[$property] = $val->format(\\DateTime::RFC3339);\n } else if (is_a($val, \"\\Microsoft\\Graph\\Core\\Enum\")) {\n $serializableProperties[$property] = $val->value();\n } else if (is_a($val, \"\\Entity\")) {\n $serializableProperties[$property] = $val->jsonSerialize();\n } else if (is_a($val, \"\\GuzzleHttp\\Psr7\\Stream\")) {\n $serializableProperties[$property] = (string) $val;\n }\n }\n return $serializableProperties;\n }",
"#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n $serializableProperties = $this->getProperties();\n foreach ($serializableProperties as $property => $val) {\n if (is_a($val, \"\\DateTime\")) {\n $serializableProperties[$property] = $val->format(\\DateTime::RFC3339);\n } else if (is_a($val, \"\\Microsoft\\Graph\\Core\\Enum\")) {\n $serializableProperties[$property] = $val->value();\n } else if (is_a($val, \"\\Entity\")) {\n $serializableProperties[$property] = $val->jsonSerialize();\n } else if (is_a($val, \"\\GuzzleHttp\\Psr7\\Stream\")) {\n $serializableProperties[$property] = (string) $val;\n }\n }\n return $serializableProperties;\n }",
"public function jsonSerialize()\n {\n return $this->getValue();\n }",
"public function serialize()\n {\n $data = array();\n foreach( $this->toSerialize as $var ) { $data[ $var ] = $this->$var; }\n return serialize( $data );\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Spinen\\ConnectWise\\Clients\\Sales\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function serialize()\n\t{\n\t\treturn serialize(array(\n\t\t\t$this->gender,\n\t\t\t($this->sociotype ? $this->sociotype->getId() : 0),\n\t\t\t$this->ageFrom,\n\t\t\t$this->ageTo,\n\t\t\t$this->locationId,\n\t\t\t$this->locationType,\n\t\t\t$this->locationTitle,\n\t\t\t$this->hasPhoto,\n\t\t));\n\t}",
"public function SerializeObject () {\n return serialize ($this);\n }",
"public function __get($property)\r\n {\r\n if (property_exists($this, $property)) {\r\n //UTF-8 is recommended for correct JSON serialization\r\n $value = $this->$property;\r\n if (is_string($value) && mb_detect_encoding($value, \"UTF-8\", TRUE) != \"UTF-8\") {\r\n return utf8_encode($value);\r\n }\r\n else {\r\n return $value;\r\n }\r\n }\r\n }",
"public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}",
"public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}",
"protected function t_default_marshaller_export_property_pass() {\n return '';\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\Infoplus\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }",
"public function __get($property)\n {\n if (property_exists($this, $property)) {\n //UTF-8 is recommended for correct JSON serialization\n $value = $this->$property;\n if (is_string($value) && mb_detect_encoding($value, \"UTF-8\", TRUE) != \"UTF-8\") {\n return utf8_encode($value);\n }\n else {\n return $value;\n }\n }\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Voximplant\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function jsonSerialize(){\n if( ! $this->isPersisted() ){\n $properties = (object) get_object_vars($this);\n unset($properties->id);\n return $properties;\n }\n $properties = (object) get_object_vars($this);\n $properties->startUTC = $properties->startUTC->format('c');\n $properties->endUTC = $properties->endUTC->format('c');\n $properties->repeatEndUTC = !is_null($properties->repeatEndUTC) ? $properties->repeatEndUTC->format('c') : null;\n $properties->weeklyDays = is_null($properties->weeklyDays) ? array() :\n // All this does is cast the exploded values from strings to integers\n array_map(function($day){ return (int)$day; }, explode(',',$properties->weeklyDays));\n return $properties;\n }",
"public function serialize($value)\n {\n // Assuming the internal representation of the value is always correct\n return $value;\n }",
"protected function writePropertyValue($property_name, $value) {\n if ($this->definition->getPropertyDefinition($property_name)) {\n $this->get($property_name)->setValue($value, FALSE);\n }\n else {\n // Just set the plain value, which allows adding a new entry to the map.\n $this->values[$property_name] = $value;\n }\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }",
"private function _property(EntityProperty $property) {\n static $marks = [\n Flags::IS_STATIC => \"ZEND_ACC_STATIC\",\n Flags::IS_PUBLIC => \"ZEND_ACC_PUBLIC\",\n Flags::IS_PROTECTED => \"ZEND_ACC_PROTECTED\",\n Flags::IS_PRIVATE => \"ZEND_ACC_PRIVATE\"\n ];\n $flags = [];\n foreach($marks as $mark => $flag) {\n if($property->flags & $mark) {\n $flags[] = $flag;\n }\n }\n $flags = implode(\" | \", $flags);\n switch($property->type) {\n case Types::INT:\n return \"REGISTER_CLASS_LONG_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n case Types::STRING:\n return \"REGISTER_CLASS_STRING_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \\\"\".addslashes($property->value).\"\\\", {$flags});\";\n case Types::BOOLEAN:\n return \"REGISTER_CLASS_BOOL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", \".intval($property->value).\", {$flags});\";\n case Types::NIL:\n return \"REGISTER_CLASS_NULL_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$flags});\";\n case Types::DOUBLE:\n return \"REGISTER_CLASS_DOUBLE_PROPERTY(ce_{$property->class->cname}, \\\"{$property->name}\\\", {$property->value}, {$flags});\";\n default:\n throw new \\LogicException(\"Unknown type $property\");\n }\n }",
"function testPrimitiveProperty(){\n\n\t\t//see http://services.odata.org/v3/OData/OData.svc/Suppliers(0)/Address/City?$format=application/json;odata=fullmetadata\n\t\t$property = new ODataProperty();\n\t\t$property->name = \"Count\";\n\t\t$property->typeName = 'Edm.Int16';\n\t\t$property->value = 56;\n\n\t\t$content = new ODataPropertyContent();\n\t\t$content->properties = array($property);\n\n\t\t$writer = new JsonLightODataWriter(JsonLightMetadataLevel::FULL, $this->serviceBase);\n\t\t$result = $writer->write($content);\n\t\t$this->assertSame($writer, $result);\n\n\n\t\t//decoding the json string to test\n\t\t$actual = json_decode($writer->getOutput());\n\n\t\t$expected = '{\n\t\t\t\t\t\t\"odata.metadata\":\"http://services.odata.org/OData/OData.svc/$metadata#Edm.Int16\",\n\t\t\t\t\t\t\"value\" : 56\n\t\t\t\t\t }';\n\t\t$expected = json_decode($expected);\n\n\t\t$this->assertEquals(array($expected), array($actual), \"raw JSON is: \" . $writer->getOutput());\n\t}",
"public function toString() {\n\t\treturn serialize($this->_value);\n\t}",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }"
] | [
"0.62891006",
"0.6185028",
"0.6096705",
"0.60947424",
"0.6065271",
"0.6051029",
"0.5901154",
"0.5833393",
"0.58316964",
"0.58129174",
"0.5795927",
"0.5787745",
"0.5787745",
"0.57230127",
"0.57176393",
"0.57149845",
"0.57097036",
"0.5703373",
"0.5689171",
"0.567944",
"0.567944",
"0.56496316",
"0.5647648",
"0.56355256",
"0.5632847",
"0.5632847",
"0.5621673",
"0.5620723",
"0.56175596",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.561447",
"0.5613716",
"0.5606329",
"0.55993164",
"0.55970615",
"0.55970615",
"0.55970615",
"0.55970615",
"0.55970615",
"0.55970615",
"0.55970615",
"0.55970615",
"0.55970615",
"0.55970615",
"0.55970615"
] | 0.0 | -1 |
Called when this object is being cast to a string. If the property only had a single value, you will get just that. In the case the property had multiple values, the contents will be escaped and combined with ,. | public function __toString()
{
return (string) $this->getValue();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __toString()\n {\n return strval($this->value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return strval($this->__value);\n }",
"public function __toString()\n {\n return $this->str_value;\n }",
"final public function __toString()\n {\n return strval($this->value);\n }",
"public function __toString()\n {\n return (string)$this->value;\n }",
"public function __toString()\n {\n if (is_array($this->value)) {\n return (string)json_encode($this->value);\n }\n return (string)$this->value;\n }",
"public function __toString()\n\t{\n\t\treturn (string) $this->value;\n\t}",
"public function __toString(): string\n {\n return (string)$this->value;\n }",
"public function __toString()\n {\n return strval($this->_data);\n }",
"public function toProp() {\n\t\treturn htmlspecialchars(json_encode($this, true));\n\t}",
"public function __toString() {\n\t\t\treturn Core\\Convert::toString($this->value);\n\t\t}",
"public function __toString(): string\n {\n return (string) $this->value;\n }",
"public function string()\n {\n return (string)$this->value;\n }",
"public function __toString(): string\n {\n return (string) $this->getValue();\n }",
"function to_str(){\n //\n //A string version of a literal is basicaly the literal itself as a string \n //hence it should be encosed in double quotes incase it is needed to be \n //converted into json\n return \"'$this->value'\";\n }",
"final public function __toString(): string\n {\n return (string)$this->value;\n }",
"function o_castString($value) {\n\t\t\treturn Obj::singleton()->castString($value);\n\t\t}",
"public function __toString()\n {\n return $this->value;\n }",
"public function __toString()\n {\n return $this->value;\n }",
"public function __toString()\n {\n return $this->value;\n }",
"public function __toString()\n {\n return $this->value;\n }",
"public function __toString()\n {\n return $this->value;\n }",
"public function __toString()\n {\n return $this->value;\n }",
"public function __toString()\n {\n return $this->value;\n }",
"public function __toString(){\n\t\treturn $this->value;\n\t}",
"public function __toString()\n\t\t{\n\t\t\treturn $this->quoteValue ? \"$this->field $this->relation '$this->value'\" : \"$this->field $this->relation $this->value\";\n\t\t}",
"public function __toString() {\n\t\t\treturn $this->value;\n\t\t}",
"public function __toString(){\n return $this->convert();\n }",
"public function __toString()\n {\n return $this->str;\n }",
"public function toString() {\n\t\treturn serialize($this->_value);\n\t}",
"public function __toString()\n {\n return $this->str;\n }",
"public function __toString()\n {\n $type = gettype($this->value);\n\n switch ($type) {\n case 'boolean':\n return $this->boolean($this->value);\n break;\n case 'integer':\n return $this->int($this->value);\n break;\n case 'double':\n return $this->float($this->value);\n break;\n case 'string':\n return $this->string($this->value);\n break;\n case 'array':\n return $this->array($this->value);\n break;\n case 'object':\n return $this->object($this->value);\n break;\n case 'resource':\n return $this->resource($this->value);\n break;\n case 'NULL':\n return 'NULL';\n break;\n default:\n return '(unknown type)';\n break;\n };\n }",
"public function __toString()\n\t{\n\t\treturn $this->value();\n\t}",
"public function __toString() {\r\n return (string) $this->getMappingValue();\r\n }",
"public function __toString()\n {\n return $this->dataString;\n }",
"public function __toString() {\n\t\tif ( null === $this->string ) {\n\t\t\t$this->string = call_user_func( $this->value_callback );\n\t\t\t$this->resolved();\n\t\t}\n\n\t\treturn $this->string;\n\t}",
"public function __toString()\n {\n return (string)$this->slice(',')->toString();\n }",
"public function getToString()\n {\n return $this->toString();\n }",
"public function escape()\n {\n return strval($this);\n }",
"public function getValueAsString();",
"public function toString() : string\n {\n return strval($this->value);\n }",
"protected function _asText()\n {\n return (string) parent::__toString();\n }",
"public function __toString() { return $this->as_string(); }",
"public function __toString() {\n\t\tif ($this->_isRaw) {\n\t\t\treturn '';\n\t\t} else {\n\t\t\treturn json_encode($this);\n\t\t}\n\t}",
"public function __toString() {\n\t\tif($this->wire('hooks')->isHooked('LanguagesPageFieldValue::getStringValue()')) {\n\t\t\treturn $this->__call('getStringValue', array());\n\t\t} else {\n\t\t\treturn $this->___getStringValue();\n\t\t}\t\n\t}",
"#[Pure] public function get_values(): string\n {\n if(gettype($this -> value) === \"string\") {\n return \"'\" . $this->value . \"'\";\n }else{\n $res = \"'\";\n foreach($this -> value as $v){\n $res .= strval($v) . \" \";\n }\n $res .= \"'\";\n }\n return $res;\n }",
"public function __toString()\n {\n $references = [];\n foreach ($this->getValue() as $item) {\n $references[] = $item->getMaskedValue();\n }\n\n return $this->arr($references)->implode(', ')->val();\n }",
"public function toString() : string\n {\n return $this->value;\n }",
"abstract protected function getToStringProperties();",
"public function __toString()\n {\n return 'data:' . htmlspecialchars($this->type) .\n ($this->base64\n ? ';base64,' . base64_encode($this->data)\n : ',' . rawurlencode($this->data));\n }",
"function __toString() {\n return $this->string();\n }",
"public function getToString() {\n\t\tif (!empty($this->to)) return implode(', ', $this->to);\n\t\telse return '';\n\t}",
"public function toString()\n {\n return (string)$this->splice(',')->toString();\n }",
"public function __toString()\n {\n \treturn $this->get();\n }",
"public function toString()\n {\n return $this->cast('string');\n }",
"public function __toString()\n {\n return implode($this->separator, $this->data);\n }",
"public function __toString()\n {\n $this->to = $this->_to;\n if (isset($this->_from)) {\n $this->from = $this->_from;\n }\n\n return $this->unescapeJSON(json_encode($this));\n }",
"public function & toString()\n\t{\n\t\t$x = string((string)$this->data);\n\t\treturn $x;\n\t}",
"function str_values(){\n //\n //map the std objects inthe array to return an array of strings of this \n //format ['cname=value'......]\n $values_str= array_map(function($obj){\n //\n //Trim the spaces\n $tvalue = trim($obj->value);\n //\n //Replace '' with null\n $value = $tvalue=='' ? 'null': \"'$tvalue'\";\n //\n return \"`$obj->name`=$value\";\n \n }, $this->values);\n //\n //retun the imploded version of the array with a , separator\n return implode(\",\",$values_str);\n }",
"public function __toString()\n\t{\n\t\treturn $this->get();\n\t}",
"public function __toString()\n {\n $value = $this->getValue();\n if ($value === null) {\n return '';\n }\n $attribute = $this->getAttribute();\n if ($attribute->getFieldType() == FormChoiceType::class) {\n $options = array_flip($attribute->getFieldTypeChoiceOptions(true));\n if (is_array($value)) {\n //multiple option, multiple values\n foreach ($value as &$option) {\n $option = $options[$option];\n }\n } elseif (isset($options[$value])) {\n //multiple option, single value\n $value = [$options[$value]];\n } else {\n return (string)$value;\n }\n return implode(', ', $value);\n }\n return (string)$value;\n }",
"public function __toString()\n\t{\n\t\treturn \"{$this->data}\";\n\t}",
"public function __toString()\n {\n //todo if an element is array\n return (string)$this->temp;\n }",
"function __toString(){\n\treturn serialize($this->__data);\n\t}",
"function __toString () {\n return $this->text;\n }",
"public function __get($property)\n {\n if (property_exists($this, $property)) {\n return html_entity_decode($this->$property);\n }\n }",
"public function to_string() { return $this->__toString(); }",
"public function toString(): string\n {\n return $this->getValue();\n }",
"public function __toString() {\n return print_r($this->__value, true);\n }"
] | [
"0.6831965",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.68152416",
"0.6793982",
"0.6743648",
"0.6737945",
"0.66404283",
"0.65765333",
"0.65753806",
"0.6555738",
"0.65286595",
"0.6527149",
"0.6519678",
"0.6511649",
"0.6503352",
"0.6429439",
"0.64002806",
"0.6381508",
"0.63397",
"0.63397",
"0.63397",
"0.63397",
"0.63397",
"0.63397",
"0.63397",
"0.63379437",
"0.6322116",
"0.631265",
"0.6283874",
"0.62308794",
"0.622977",
"0.62259054",
"0.6224764",
"0.6210172",
"0.62096334",
"0.6185245",
"0.6181002",
"0.61684436",
"0.6165374",
"0.6105918",
"0.6097882",
"0.6095169",
"0.6092108",
"0.6074118",
"0.6038225",
"0.60285383",
"0.60229737",
"0.60081893",
"0.600521",
"0.6004623",
"0.59925354",
"0.59855926",
"0.59576285",
"0.5941008",
"0.5931372",
"0.5930577",
"0.5927351",
"0.59240884",
"0.5915007",
"0.5914154",
"0.59006643",
"0.5885081",
"0.5871661",
"0.58625174",
"0.5861919",
"0.58434415",
"0.58400005",
"0.58213985",
"0.58137596",
"0.58135873"
] | 0.65930754 | 37 |
Returns a parameter. If the parameter does not exist, null is returned. | public function offsetGet($name)
{
if (is_int($name)) {
return parent::offsetGet($name);
}
$name = strtoupper($name);
if (!isset($this->parameters[$name])) {
return;
}
return $this->parameters[$name];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function get_parameter( $name ) {\n\t\treturn $this->has_parameter( $name ) ? $this->parameters[ $name ] : null;\n\t}",
"public function getParameter($parameter)\n {\n $params = $this->getParameters();\n\n return $params[$parameter] ?? null;\n }",
"public function getParam($param){\n\n if (property_exists($this, '_'.$param)){\n $param = '_'.$param;\n return $this->$param;\n } else\n return null;\n }",
"function get_parameter($name)\r\n {\r\n if (array_key_exists($name, $this->parameters))\r\n return $this->parameters[$name];\r\n }",
"public function getParam($param);",
"function getParam($name) {\n if (isset($this->params[$name])) {\n return $this->params[$name];\n }\n return null;\n }",
"public function getParam($param)\n {\n return isset($this->_params[$param]) ? $this->_params[$param] : null;\n }",
"public function get_parameter($parameter) {\n\t if (isset($this->decodedWebhook['queryResult']['parameters'][$parameter])) {\n\t\t return $this->decodedWebhook['queryResult']['parameters'][$parameter];\n\t }\n\t\treturn false;\n }",
"function getParam($name) {\n\t\treturn isset($this->params[$name]) ? $this->params[$name] : null;\n\t}",
"public function getParameter($name)\n {\n return $this->parameters[$name] ?? null;\n }",
"public function getParameter($name)\n {\n $name = strtolower($name);\n if (isset($this->parameters[$name])) {\n return $this->parameters[$name];\n }\n return null;\n }",
"public function getParam($param = false)\n {\n if ($param && isset($this->params->$param)) {\n $result = $this->params->$param;\n } elseif ($param && !isset($this->params->$param)) {\n $result = null;\n } else {\n $result = $this->params;\n }\n\n return $result;\n }",
"public function getParam($name){\n\t\treturn array_key_exists($name, $this->params) ? $this->params[$name] : NULL;\n\t}",
"public function getParameter($name)\n {\n if (array_key_exists($name, $this->params)) {\n return $this->params[$name];\n }\n\n return null;\n }",
"public function getParameter($name)\n {\n $name = strtolower($name);\n if (isset($this->parameters[$name])) {\n return $this->parameters[$name];\n }\n\n return null;\n }",
"public function getParam($name)\n {\n if (isset($this->params[$name])) {\n return $this->params[$name];\n }\n return null;\n }",
"protected function get(string $parameter, $default = null) {\n\t\treturn $this->parameters[$parameter] ?? $default;\n\t}",
"protected function get_param($param) {\n if ($this->params !== null && isset($this->params[$param])) {\n return $this->params[$param];\n } else {\n $staticname = \"default$param\";\n assert(isset(static::$$staticname));\n return static::$$staticname;\n }\n }",
"public function getParam($name) {\n if (isset($this->parameter[$name])) {\n return $this->parameter[$name];\n }\n }",
"public function getParameter($param)\n {\n return $this->params[$param];\n }",
"public function param(string $param): mixed\n {\n return !empty($this->params[$param]) ? $this->params[$param] : null;\n }",
"public function getParameter(string $name): mixed\n {\n return $this->parameters[$name] ?? null;\n }",
"public function getParam($param)\n {\n if (isset($this->params[$param])) {\n return $this->params[$param];\n }\n }",
"public function getParameter()\n\t{\n\t\treturn $this->parameter;\n\t}",
"public function getParam(string $name)\n {\n return $this->params[$name] ?? null;\n }",
"public function getParam($name)\n {\n return isset($this->params[$name]) ? $this->params[$name] : null;\n }",
"public static function getParam() {\n\n\t}",
"public function param($key = null)\n {\n return isset($this->params[$key]) ? $this->params[$key] : null;\n }",
"public function getParam($param) {\n\t\t\t\tif(isset($this->$param)) {\n\t\t\t\t\t\treturn $this->$param;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t}",
"public function getParam($name);",
"public function getParameter(string $name): ?string\n {\n return $this->parameters[$this->sanitizeParameterName($name)] ?? null;\n }",
"public static function getParam($name) {\n return isset(static::$_params[$name]) ? static::$_params[$name] : null;\n }",
"public function getParam()\n {\n return $this->param;\n }",
"public function getParam()\n {\n return $this->param;\n }",
"public function getParam($param)\n {\n $result = (new Query())\n ->select('value')\n ->from('uuid_param')\n ->where([\n 'uuid' => $this->getUuid(),\n 'param' => $param,\n ])\n ->one();\n return $result ? $result['value'] : null;\n }",
"public function get_param(string $param_name) {\r\n\t\t$record = $this->field(['*'])->table(['message_default_params'])->where(['id'=>1])->one();\r\n\t\treturn $record[$param_name] ?? null;\r\n\t}",
"public function getParam($key) {\n if (isset($this->params[$key])) {\n return $this->params[$key];\n }\n return NULL;\n }",
"public function get( $name )\n\t{\n\t\tif( isset( $this->params[ $name ] ) ) return $this->params[ $name ];\n\t\treturn null;\n\t}",
"public function getParam($param)\n {\n if (!array_key_exists($param, $this->_params)) {\n throw new \\InvalidArgumentException(\"This parameter does not exists.\");\n }\n\n if (array_key_exists($param, $this->_params_values)) {\n return $this->_params_values[$param];\n }\n\n return $this->_params[$param];\n }",
"public function getParam($param, $filters=null);",
"public function getParam($name)\n {\n if(isset($this->_invokeParams[$name])) {\n return $this->_invokeParams[$name];\n }\n\n return null;\n }",
"public function getPathParameter($parameter){\n if(isset($this->parameters[$parameter])) {\n return $this->parameters[$parameter];\n }\n return null;\n }",
"protected function getParameter($name, $default = null)\n {\n if (array_key_exists($name, $this->parameters))\n {\n return $this->parameters[$name];\n }\n\n return $default;\n }",
"public function getParam($name) {\n return $this->params[$name];\n }",
"protected function getParam($param, $default = null) {\n // set or encoding failed. Recover in these cases so we can perform\n // mail migrations, see T9251.\n if (!is_array($this->parameters)) {\n $this->parameters = array();\n }\n\n return idx($this->parameters, $param, $default);\n }",
"public function getNamedParameter($name)\n {\n $name = strtolower($name);\n return isset($this->namedParameters[$name]) ? $this->namedParameters[$name] : null;\n }",
"public function getParameter($key)\n {\n return isset($this->params[$key]) ? $this->params[$key] : null;\n }",
"public function getValue(string $parameterName)\n {\n return $this->parameters[$parameterName] ?? null;\n }",
"public function param($key, $default = null)\n {\n return isset($this->parameters[$key]) ? $this->parameters[$key] : null;\n }",
"public static function getRouteVariable($parameter) {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $parameter);\n\n\t\t$parameter = self::_applyFilter(get_class(), __FUNCTION__, $parameter, array('event' => 'args'));\n\n\t\tif (isset(self::$route_parameters[$parameter])) {\n\t\t\tself::_notify(get_class() . '::' . __FUNCTION__, $parameter, self::$route_parameters[$parameter]);\n\t\t\t$found_parameter = self::_applyFilter(get_class(), __FUNCTION__, self::$route_parameters[$parameter], array('event' => 'return'));\n\n\t\t\treturn $found_parameter;\n\t\t}\n\t}",
"function getParam($inKey = null) {\n\t\treturn $this->_getItem($inKey);\n\t}",
"public function getParameter($key)\n {\n if (!$this->parameters) {\n $this->parameters = array();\n }\n\n return isset($this->parameters[$key]) ? $this->parameters[$key] : null;\n }",
"public function getParameter($name){\n\t\tif(!isset($this->inputParameters[$name])){\n\t\t\tthrow new ValidationException(\"Could not find parameter: {$name}\");\n\t\t}\n\t\treturn $this->inputParameters[$name];\n\t}",
"public function getParam(string $name)\n {\n if (! array_key_exists($name, $this->params)) {\n return MissingDefaultParameter::getInstance();\n }\n\n return $this->params[$name];\n }",
"private function fetchParameter()\r\n\t{\r\n\t\t//@TODO schlundus, move fetch inside the parameterInfo class\r\n\t\t$parameterSource = $this->parameterInfo->source;\r\n\t\t$parameterName = $this->parameterInfo->name;\r\n\t\t\r\n\t\t$src = null;\r\n\t\tswitch($parameterSource)\r\n\t\t{\r\n\t\t\tcase \"POST\":\r\n\t\t\t\t$src = $_POST;\r\n\t\t\t\tbreak;\r\n\t\r\n\t\t\tcase \"GET\":\r\n\t\t\t\t$src = $_GET;\r\n\t\t\t\tbreak;\r\n\t\r\n\t\t\tcase \"REQUEST\":\r\n\t\t\t\t$src = $_REQUEST;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\r\n\t\t$value = null;\r\n\t\t$fetched = false;\r\n\t\tif ($src)\r\n\t\t{\t\r\n\t\t\tif (isset($src[$parameterName]))\r\n\t\t\t{\r\n\t\t\t\t$value = $src[$parameterName];\r\n\t\t\t\t$fetched = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->bFetched = $fetched;\r\n\t\t$this->taintValue = $value;\r\n\t}",
"public function getParam(string $name)\n {\n if (! isset($this->getParameters()[$name])) {\n throw (new \\Exception('Parameter ' . $name . ' was not found in route', - 1));\n }\n\n return $this->getParameters()[$name];\n }",
"public function parameter($name, $default = null)\n {\n return Arr::get($this->parameters(), $name, $default);\n }",
"function getUrlParameter($parameterName) {\n\n\t\t$parameter = null;\n\n\t\tif (isset($_GET[$parameterName]))\n\t\t\t$parameter = $_GET[$parameterName];\n\n\t\treturn $parameter;\n\n\t}",
"public function getParameter($name, $default = null)\n {\n if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters))) {\n return $default;\n }\n\n return $this->parameters[$name];\n }",
"public function get(string $name): Parameter\n {\n foreach ($this as $parameter) {\n if ($parameter->getName() === $name) {\n return $parameter;\n }\n }\n\n throw new FileGenException(sprintf(\n 'Can not find parameter \"%s\"',\n $name\n ));\n }",
"protected function getParam($name, $default = null)\n\t{\n\t\treturn $this->_params->get($name, $default);\n\t}",
"public function param($name, $default = null)\n {\n return isset($this->parameters[$name]) ? $this->parameters[$name] : $default;\n }",
"public function getParam($name, $default = null) {\n\t\t$name = (string)$name;\n\t\tif (isset($this->params[$name]))\n\t\t{\n\t\t\treturn $this->params[$name];\n\t\t}\n\n\t\treturn $default;\n\t}",
"public function getParameter($name, $default = null, $ns = null)\r\n {\r\n return $this->parameterHolder->get($name, $default, $ns);\r\n }",
"public function getParameterForCaller(int $i): ?Parameter;",
"final public function getDataParameter($parameter) {\n if (is_array($this->data) && array_key_exists($parameter, $this->data)) {\n return $this->data[$parameter];\n }\n return null;\n }",
"public static function routeParam($name)\n\t{\n\t\tif($route = Router::getCurrentRoute()) {\n\t\t\treturn $route->getParam($name);\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public function offsetGet($param)\n\t{\n\t\treturn isset($this->params[(string) $param]) ? $this->params[(string) $param] : null;\n\t}",
"public function __get(string $key)\n {\n if (array_key_exists($key, $this->parameters)) {\n return $this->parameters[$key];\n }\n\n return null;\n }",
"public function get($parameterName) {\n return $this->getParameter($parameterName);\n }",
"public function param($name, $default= null) {\n return $this->params[$name] ?? $default;\n }",
"function _getParameter( $name, $default='' ) {\n\t\t$return = \"\";\n\t\t$return = $this->params->get( $name, $default );\n\t\treturn $return;\n\t}",
"public function getParam($name, $default = null)\n {\n if (isset($this->params[$name])) {\n return $this->params[$name];\n }\n $name = str_replace('.', '_', $name);\n return $this->request->get($name, $default);\n }",
"protected function parameter(string $parameter)\n {\n return $this->getContainer()->get(Config::class)->get($parameter);\n }",
"public function getDynamicParameter(string $parameter)\n {\n $this->buildDynamicParameters();\n\n return $this->dynamicParameters->offsetGet($parameter);\n }",
"public function getParameter($name);",
"public function getParameter($name);",
"public function getParameter($name);",
"function getParam($key, $parameter) {\r\n $params =& new mosParameters( $parameter );\r\n $return = $params->get( $key, false );\r\n\tunset( $params );\r\n\treturn $return;\r\n\r\n /*\r\n\tif (!$params) return false;\r\n\t$params = split(\"\\n\",$params);\r\n\tforeach ($params AS $param) {\r\n\t list($keyn,$value) = split('=', $param);\r\n\t if ($keyn == $key) return $value;\r\n }\r\n return false;\r\n\t*/\r\n}",
"public static function getRouteParameter($parameter) {\n\t\treturn self::$route_parameters[self::$route_options['route'][$parameter]];\n\t}",
"public static function getParameter($path = null)\n {\n if ($path) {\n $parts = explode('/', $path);\n $param = self::instance()->parameters;\n foreach ($parts as $part) {\n if (!isset($param[$part])) {\n return null;\n }\n $param = $param[$part];\n }\n return $param;\n } else {\n return self::instance()->parameters;\n }\n }",
"public function getParam($name)\n {\n return Tools::getValue($name);\n }",
"function getParam($path, $variableName, $default=\"\", $remainingData=false) {\r\n\tif (isset($_GET[$variableName])) {\r\n\t\t$val = $_GET[$variableName];\r\n\t} else {\r\n\t\t$val = getParamFromPath($path, $variableName, $default, $remainingData);\r\n\t}\r\n\treturn $val!=\"\" ? $val : $default;\r\n}",
"public function getParam($name, $default = null)\n {\n if (isset($this->params[$name])) {\n return $this->params[$name];\n } else {\n return $default;\n }\n }",
"public function get($param) {\n\t\treturn isset($_GET[$param]) ? $_GET[$param] : null;\n\t}",
"public function getParameter($parameterName)\n {\n if (!isset($this->parameters[$parameterName])) {\n throw NoSuchParameterException::forParameterName($parameterName, $this->name);\n }\n\n return $this->parameters[$parameterName];\n }",
"public function getParameter($name, $default = null)\n {\n return $this->getConfig()->getParameter($name, $default, $this->_parameters);\n }",
"function get_optional_param($param, $default = '')\n{\n global $params;\n\n if (empty($params[$param]))\n return $default;\n\n return $params[$param];\n}",
"public function getParameter();",
"public function getParameter();",
"public function getMatchedParam($param, $default = null)\n {\n if (! $this->matchedParam($param)) {\n return $default;\n }\n return $this->matches[$param];\n }",
"public function getParam(string $name, bool $throw = true) : ?string\n {\n\n foreach ($this->params as $order => $param) {\n if ($param['name'] === $name) {\n return $param['value'];\n }\n }\n\n if ($throw === false) {\n return null;\n }\n\n try {\n throw new ParamOtosetException('routeParameterByName', $this->getParamsNames(), $name);\n } catch (ParamOtosetException $e) {\n throw new MethodFopException('getNonexistingParameterForRoute', $e);\n }\n }",
"public function getParam($key)\n {\n if (isset($this->params[$key])) {\n return $this->params[$key];\n }\n }",
"public function getParameter($name,$defaultValue=null){\n\t\treturn isset($_GET[$name])? $_GET[$name] : $defaultValue;\n\t}",
"function DBParameter($param)\n\t{\n\t\tif (empty($this->settings[$param])) return false;\n\t\t$sql = $this->settings[$param][1];\n\t\treturn $this->_DBParameter($sql);\n\t}",
"public function getParam($name, $default = null)\n {\n return $this->params[$name] ?? $default;\n }",
"protected function getParameter($name)\n {\n return $this->container->getParameter($name);\n }",
"public function &getParam($name) {\n\t\tif (!isset($this->_params[$name]))\n\t\t\treturn null;\n\n\t\treturn $this->_params[$name];\n\t}",
"public function getParam($name) {\n return $this->app->getParam($name);\n }",
"static public function getParam($name, $defaultValue = null)\r\n\t{\r\n\t\tif (isset($_GET[$name])) {\r\n\t\t\treturn $_GET[$name];\r\n\t\t} elseif (isset($_POST[$name])) {\r\n\t\t\treturn $_POST[$name];\r\n\t\t}\r\n\t\t\r\n\t\treturn $defaultValue;\r\n\t}",
"public function getParameterValue($parameterName)\n {\n return $this->getParameter($parameterName)->getDefaultValue();\n }"
] | [
"0.7663121",
"0.76570916",
"0.7503247",
"0.7490742",
"0.7447435",
"0.74230736",
"0.7319341",
"0.73065054",
"0.73043364",
"0.72721153",
"0.71931076",
"0.7192163",
"0.71884626",
"0.7186175",
"0.7174426",
"0.7166127",
"0.71328795",
"0.7132722",
"0.7122968",
"0.7114216",
"0.7096297",
"0.70884526",
"0.7087986",
"0.70425504",
"0.7001049",
"0.699869",
"0.69508094",
"0.6923622",
"0.6917296",
"0.69134194",
"0.69089127",
"0.68918544",
"0.686388",
"0.686388",
"0.68631035",
"0.68589",
"0.6853562",
"0.68278706",
"0.6825743",
"0.68150806",
"0.679678",
"0.67940867",
"0.67842555",
"0.67642045",
"0.6728926",
"0.67214084",
"0.67191607",
"0.6712059",
"0.67079353",
"0.66955525",
"0.66796803",
"0.6673225",
"0.6670617",
"0.66667414",
"0.6666635",
"0.66650313",
"0.6657189",
"0.6656811",
"0.6635595",
"0.661981",
"0.6590115",
"0.65853035",
"0.65594333",
"0.65472966",
"0.6545346",
"0.6528963",
"0.6514898",
"0.6513336",
"0.6504921",
"0.6487774",
"0.64865",
"0.6483069",
"0.6470362",
"0.6462996",
"0.646138",
"0.6455706",
"0.6455706",
"0.6455706",
"0.6440688",
"0.6434504",
"0.6434261",
"0.6424104",
"0.6411427",
"0.6410857",
"0.64057463",
"0.6394024",
"0.63930166",
"0.63616246",
"0.63379765",
"0.63379765",
"0.6323517",
"0.6318406",
"0.6302419",
"0.63007796",
"0.6298584",
"0.62701356",
"0.62664664",
"0.62604135",
"0.62595564",
"0.6251012",
"0.62448585"
] | 0.0 | -1 |
Creates a new parameter. | public function offsetSet($name, $value)
{
if (is_int($name)) {
parent::offsetSet($name, $value);
// @codeCoverageIgnoreStart
// This will never be reached, because an exception is always
// thrown.
return;
// @codeCoverageIgnoreEnd
}
$param = new Parameter($this->root, $name, $value);
$this->parameters[$param->name] = $param;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createParameter()\n {\n $param = new LiquibaseParameter();\n $this->parameters[] = $param;\n\n return $param;\n }",
"static public function createParameter($name, $value) {\n\n return new Parameter($name, $value);\n\n }",
"public function createParameter(Parameter $parameter)\n {\n parent::createEntity($parameter);\n\n return $parameter;\n }",
"public function addParameter(string $name, $value): self;",
"private function createParam()\n\t{\n\t\t$this->param = Array('http' => Array(), 'url' => null);\n\t}",
"public function addParameterByName(string $name, mixed $value): ParametersInterface;",
"public function setParameter($name, $value);",
"function set_parameter($name, $value)\r\n {\r\n //dump(get_class($this) . ' | ' . $name);\r\n $this->parameters[$name] = $value;\r\n }",
"public function addParameter(mixed $value): ParametersInterface;",
"public function __construct(Parameter $parameter)\n {\n $this->parameter = $parameter;\n }",
"function new_parameters() {\r\n\r\n }",
"protected function defineParameter($name, $dataType, $from, $to, $required, $value)\n {\n $this->parameters[$name] = array(\n 'dataType' => $dataType,\n 'from' => $from,\n 'to' => $to,\n 'required' => $required,\n 'value' => $value,\n );\n }",
"public function withDescription(string $description): ParameterInterface;",
"protected function createParameterDriver()\n {\n $determiner = new Determiners\\Parameter(\n $this->app['config']['localize-middleware']['parameter']\n );\n\n $determiner->setFallback($this->app['config']['app']['fallback_locale']);\n\n return $determiner;\n }",
"final public function setParameter($name, $value)\n {\n $this->parameters[$name] = $value;\n return $this;\n }",
"protected static function createParameter($name, $element = 'input', $type = 'text', $value = '') {\n\t\t$param = new \\stdClass();\n\t\t$param->element = $element;\n\t\t$param->prefix = '';\n\t\t$param->postfix = '';\n\t\t$param->label = '';\n\t\t$param->attributes = new \\stdClass();\n\t\tif ($type !== 'submit') {\n\t\t\t$param->label = $name;\n\t\t\t$param->attributes->required = true;\n\t\t}\n\t\t$param->attributes->id = 'shortcalc_'.rand(0,1000000);\n\t\t$param->attributes->name = $name;\n\t\t$param->attributes->type = $type;\n\t\t$param->attributes->value = $value;\n\t\treturn $param;\n\t}",
"public function parameter(string $paramName, $paramValue);",
"public function create($paramType, $name, array $options)\n {\n if ('federation-upstream' != $paramType && 'federation-upstream-set' != $paramType) {\n $this->logger->critical(sprintf('ParameterType: %s is not supported. Only federation-upstream & federation-upstream-set', $paramType));\n return;\n }\n\n $this->client->query(\n ClientInterface::METHOD_PUT,\n sprintf('/api/parameters/%s/%s/%s', $paramType, $this->vhost, $name),\n ['value' => $options]);\n\n $this->logger->info(sprintf('Create parameter type: <info>%s</info> and name: <info>%s</info>', $paramType, $name));\n }",
"public function toPhpReflectionParameter();",
"public function withParameter($name, $value)\n {\n if (empty($this->_model['parameters'])) $this->_model['parameters'] = [];\n $this->_model['parameters'][$name] = $value;\n return $this;\n }",
"public function parameter($previous, $new)\n {\n $this->options['parameters'][$previous] = $new;\n\n return $this;\n }",
"private function createParameter($name, $value)\n {\n $origValue = $value;\n\n $encoded = false;\n // Allow room for parameter name, indices, \"=\" and DQUOTEs\n $maxValueLength = $this->getMaxLineLength() - \\strlen($name.'=*N\"\";') - 1;\n $firstLineOffset = 0;\n\n // If it's not already a valid parameter value...\n if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) {\n // TODO: text, or something else??\n // ... and it's not ascii\n if (!preg_match('/^[\\x00-\\x08\\x0B\\x0C\\x0E-\\x7F]*$/D', $value)) {\n $encoded = true;\n // Allow space for the indices, charset and language\n $maxValueLength = $this->getMaxLineLength() - \\strlen($name.'*N*=\"\";') - 1;\n $firstLineOffset = \\strlen(\n $this->getCharset().\"'\".$this->getLanguage().\"'\"\n );\n }\n }\n\n // Encode if we need to\n if ($encoded || \\strlen($value) > $maxValueLength) {\n if (isset($this->paramEncoder)) {\n $value = $this->paramEncoder->encodeString(\n $origValue, $firstLineOffset, $maxValueLength, $this->getCharset()\n );\n } else {\n // We have to go against RFC 2183/2231 in some areas for interoperability\n $value = $this->getTokenAsEncodedWord($origValue);\n $encoded = false;\n }\n }\n\n $valueLines = isset($this->paramEncoder) ? explode(\"\\r\\n\", $value) : [$value];\n\n // Need to add indices\n if (\\count($valueLines) > 1) {\n $paramLines = [];\n foreach ($valueLines as $i => $line) {\n $paramLines[] = $name.'*'.$i.\n $this->getEndOfParameterValue($line, true, 0 == $i);\n }\n\n return implode(\";\\r\\n \", $paramLines);\n } else {\n return $name.$this->getEndOfParameterValue(\n $valueLines[0], $encoded, true\n );\n }\n }",
"function param(string $name, string $value, string $type = 'ref', string $attributes = ''): string\n {\n return '<param name=\"' . $name\n . '\" type=\"' . $type\n . '\" value=\"' . $value\n . '\" ' . $attributes . _solidus() . '>';\n }",
"public function setParam($name, $value);",
"public function create($name, $value = '');",
"public function setParameter($name, $value) {\n $this->parameters[$name]= $value;\n }",
"public function addParameter(string $name, $value) : Method\n {\n if ($this->parameters->has($name)) {\n throw new InvalidArgumentException(\"The parameter {$name} has been added previously.\");\n }\n\n $this->parameters->add($name, $value);\n\n return $this;\n }",
"public abstract function setParameter($parameter);",
"public function param(string $name, $value): self\n {\n $this->params[$name] = $value;\n\n return $this;\n }",
"public function actionCreate($param, $value)\n {\n $params = $this->getConfig($this->config);\n\n if (!isset($params[$param]) || $this->confirm('Parameter already exists, override?', false)) {\n $params[$param] = $this->filterUserInput($value);\n $this->setConfig($this->config, $params);\n }\n }",
"public function __construct($parameter_name, $parameter_value, $explanation = null, $code = 0, $previous = null){\n\t\tparent::__construct('Explanation:\"'.$explanation.'\", Parameter:\"'.$parameter_name.'\", Value:\"'.$parameter_value.'\"', $code, $previous);\n\n\t\t$this->setParameterName($parameter_name);\n\t\t$this->setParameterValue($parameter_value);\n\t\t$this->setExplanation($explanation);\n\t}",
"public function add($name, $value = null)\n {\n $noName = false;\n if (null === $name) {\n $name = Parameter::guessParameterNameByValue($value);\n $noName = true;\n }\n\n if (isset($this->parameters[strtoupper($name)])) {\n $this->parameters[strtoupper($name)]->addValue($value);\n } else {\n $param = new Parameter($this->root, $name, $value);\n $param->noName = $noName;\n $this->parameters[$param->name] = $param;\n }\n }",
"public static function create($value);",
"public static function create($value);",
"protected function setParameter($name, $value)\n {\n $this->parameters[$name] = $value;\n }",
"public function set_parameter($name, $value)\n {\n $this->_parameters[ $name ] = $value;\n }",
"public function actionCreate()\n {\n $model = new Parameter;\n\n $marks = Marker::allList(false);\n\n if ($model->load(\\Yii::$app->getRequest()->post()) && $model->save()) {\n \\Yii::$app->getSession()->setFlash('success', \\Yii::t('multipage', 'zapis dobavlena'));\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', \\compact('model', 'marks'));\n }",
"public function addParam($param, $value){\n\t\t\tif(is_string($param)){\n\t\t\t\t$this->parameters[$param] = $value;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}",
"public function create( $value, $type = 'standard' );",
"protected function createParam( $name = null, $value, $type = null, $default = null )\n {\n $currentValue = array();\n $currentValue['type'] = $type;\n $currentValue['name'] = $name;\n $currentValue['val'] = $value;\n if( $default!== null ){\n $currentValue['default'] = $default;\n }\n return $currentValue;\n }",
"function createParameterDefinition(ReflectionParameter $param, DOMDocument $doc)\n {\n $xmlParamdef = $doc->createElement('paramdef');\n if ($param->getClass()) {\n /* Parameter is of object type */\n $xmlClassname = $doc->createElement('classname', $param->getClass()->getName());\n $xmlParamdef->appendChild($xmlClassname);\n $xmlParamdef->appendChild($doc->createTextNode(' '));\n }\n $xmlParameter = $doc->createElement('parameter');\n if ($param->isOptional()) {\n //Parameter is optional\n if ($param->isDefaultValueAvailable()) {\n //Parameter has default value\n $xmlOptional =\n $doc->createElement('optional', $param->getName() . ' = ' . $param->getDefaultValue());\n } else {\n $xmlOptional =\n $doc->createElement('optional', $param->getName());\n }\n $xmlParameter->appendChild($xmlOptional);\n } else {\n $xmlParameter->nodeValue = $param->getName();\n }\n $xmlParamdef->appendChild($xmlParameter);\n return $xmlParamdef;\n }",
"public static function parameter(string $key, $value): void\n {\n if (!static::hasNewRelic()) {\n return;\n }\n\n if (!is_scalar($value)) {\n $value = json_encode($value);\n }\n\n newrelic_add_custom_parameter($key, $value);\n }",
"public function asRegularParameter(int $i): Parameter\n {\n $flags = 0;\n if ($this->is_variadic) {\n $flags |= \\ast\\flags\\PARAM_VARIADIC;\n }\n if ($this->is_reference) {\n $flags |= \\ast\\flags\\PARAM_REF;\n }\n $name = $this->name;\n $result = Parameter::create(\n (new Context())->withFile('phpdoc'),\n StringUtil::isNonZeroLengthString($name) ? $name : \"p$i\",\n $this->type,\n $flags\n );\n if ($this->is_optional && !$this->is_variadic) {\n $result->setDefaultValueType(MixedType::instance(false)->asPHPDocUnionType());\n }\n return $result;\n }",
"public function param($param, $value)\n {\n // Add or overload a new parameter\n $this->_parameters[$param] = $value;\n\n return $this;\n }",
"public function create( array $parameters );",
"public function create( array $parameters );",
"public function __construct ($name, $value) {}",
"public function param($param, $value)\n\t{\n\t\t$this->parameters[$param] = $value;\n\n\t\treturn $this;\n\t}",
"public function setParameter ($name, $value)\n {\n\n $this->parameters[$name] = $value;\n\n }",
"public function setParameter($name, $value) {\n $this->parameters[$name] = $value;\n }",
"public function __construct($name, $value) {}",
"public function store()\n\t{\n\t\t$parameter = new Parameter;\n\t\treturn $this->update($parameter);\n\t}",
"protected function addConfigParameterParameterNode()\n {\n \t$builder = new TreeBuilder();\n \t$node = $builder->root('parameter');\n \n \t$node\n\t \t->treatTrueLike(array('form' => array(\n\t \t\t'type' => \"ASF\\WebsiteBundle\\Form\\Type\\ParameterType\",\n\t \t\t'name' => 'website_parameter_type'\n\t \t)))\n\t \t->treatFalseLike(array('form' => array(\n\t \t\t'type' => \"ASF\\WebsiteBundle\\Form\\Type\\ParameterType\",\n\t \t\t'name' => 'website_parameter_type'\n\t \t)))\n\t \t->addDefaultsIfNotSet()\n\t \t->children()\n\t\t \t->arrayNode('form')\n\t\t \t->addDefaultsIfNotSet()\n\t\t \t->children()\n\t\t\t \t->scalarNode('type')\n\t\t\t \t\t->defaultValue('ASF\\WebsiteBundle\\Form\\Type\\ParameterType')\n\t\t\t \t->end()\n\t\t\t \t->scalarNode('name')\n\t\t\t \t\t->defaultValue('website_parameter_type')\n\t\t\t \t->end()\n\t\t\t \t->arrayNode('validation_groups')\n\t\t\t \t\t->prototype('scalar')->end()\n\t\t\t \t\t->defaultValue(array(\"Default\"))\n\t\t\t \t->end()\n\t\t\t \t->end()\n\t\t \t->end()\n\t \t->end()\n \t;\n \n \treturn $node;\n }",
"public function setParam($name, $value)\n {\n $this->params[$name] = $value;\n return $this;\n }",
"function createProperty();",
"abstract public function create (ParameterBag $data);",
"public function addParam($name, $value){\n $obj = $this->root->appendChild(new FianetXMLElement('obj'));\n $obj->appendChild(new FianetXMLElement('name', $name));\n $obj->appendChild(new FianetXMLElement('value', $value));\n return $obj;\n }",
"public function setParameter($name, $value)\n {\n $this->parameters();\n $this->parameters[$name] = $value;\n }",
"public function setParameter($name, $value)\n {\n $this->parameters[$name] = $value;\n }",
"final public function setParameter($name, $value, $type = null): self\n {\n if ($type === null) {\n $type = ParameterTypeInferer::inferType($value);\n }\n\n $this->parameters[$name] = ['value' => $value, 'type' => $type, 'is_list' => false];\n\n // Keep the parameters sorted for the hash\n ksort($this->parameters);\n\n // The filter collection of the EM is now dirty\n $this->em->getFilters()->setFiltersStateDirty();\n\n return $this;\n }",
"public function __construct($parameter = null)\n\t{\t\t\n\t\tif ($parameter !== null) {\n\t\t\t$this->parameter = $parameter;\n\t\t}\n\t\t\n\t\treturn;\n\t}",
"public function addParam($name, $value)\n {\n $this->params[$name] = $value;\n return $this;\n }",
"public function setParam($name, $value) {\n $this->parameter[$name] = $value;\n }",
"function addParameter($name, $value) {\n\t\t$this->link->addParameter($name, $value);\n\t}",
"public function createPostingParam($id)\n {\n // Calculate the incoming field.\n $incomingField = (Input::get(\"paramType\") == \"field\") ? Input::get(\"value\")[Input::get(\"paramType\")] : (Input::get(\"paramType\") == \"system\") ? Input::get(\"value\")[Input::get(\"paramType\")] : \"\";\n\n // Create the campaign posting parameter.\n CampaignPostingParameter::create([\n \"campaign_id\" => $id,\n \"label\" => Input::get(\"label\"),\n \"type\" => Input::get(\"paramType\"),\n \"is_static\" => (Input::get(\"paramType\") == \"static\" || Input::get(\"paramType\") == \"randomComma\" || Input::get(\"paramType\") == \"dropdown\"),\n \"static_value\" => (Input::get(\"paramType\") == \"static\" || Input::get(\"paramType\") == \"randomComma\" || Input::get(\"paramType\") == \"dropdown\") ? Input::get(\"value\")[Input::get(\"paramType\")] : \"\",\n \"incoming_field\" => $incomingField,\n \"outgoing_field\" => Input::get(\"field\")\n ]);\n\n // Return a redirect back.\n return back();\n }",
"public function addParam($name, $value){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}",
"public function create($params);",
"public function setParameter($name, $value)\n {\n $this->getParameters();\n $this->parameters[$name] = $value;\n }",
"protected function set(string $parameter, $value): self {\n\t\t$this->parameters[$parameter] = $value;\n\t\t\n\t\treturn $this;\n\t}",
"public function addParam($name,$value)\n\t\t{\n\t\t\t$this->param[$name] = $value;\n\t\t}",
"public function withParameters(): PersisterInterface;",
"public function create($params)\n {\n }",
"function setParam($name, $value) {\n $this->params[$name] = $value;\n }",
"public function withParameter(string $parameterName, $parameterValue): self\n {\n if (!TypeHandling::isLiteral(gettype($parameterValue)) && (!$parameterValue instanceof CacheAwareInterface)) {\n throw new \\InvalidArgumentException(sprintf('Parameter values must be literal types or implement the CacheAwareInterface, given: \"%s\"', is_object($parameterValue) ? get_class($parameterValue) : gettype($parameterValue)), 1511194273);\n }\n $newParameters = $this->parameters;\n $newParameters[$parameterName] = $parameterValue;\n return new static($newParameters);\n }",
"public function setParam($name, $value) \n {\n\n // lazy init\n if ($this->_params == null) {\n $this->_params = array();\n }\n\n $this->_params[$name] = $value;\n return $this;\n }",
"public function add_parameter( $param_id, $type, $heading = NULL, $note = NULL )\n {\n $util_class_name = lib::get_class_name( 'util' );\n\n // add timezone info to the note if the parameter is a time or datetime\n if( 'time' == $type || 'datetime' == $type )\n {\n // build time time zone help text\n $date_obj = $util_class_name::get_datetime_object();\n $time_note = sprintf( 'Time is in %s\\'s time zone (%s)',\n lib::create( 'business\\session' )->get_site()->name,\n $date_obj->format( 'T' ) );\n $note = is_null( $note ) ? $time_note : $time_note.'<br>'.$note;\n }\n\n $this->parameters[$param_id] = array( 'type' => $type );\n if( !is_null( $heading ) ) $this->parameters[$param_id]['heading'] = $heading;\n if( !is_null( $note ) ) $this->parameters[$param_id]['note'] = $note;\n }",
"public function createNew();",
"abstract protected function setParameter($key, $value);",
"protected function add_parameter($name, $details)\n\t{\n\t\t$this->P->add_parameter($name, $details);\n\t}",
"public function setParam($name, $value){\n\t\t$this->params[(string)$name] = $value;\n\t}",
"public function setType(ParameterType $type): Parameter\n {\n $this->type = $type->getType();\n return $this;\n }",
"public function set($parameter, $value);",
"public function addCustomEventParam(string $name, string $value): ParamsInterface;",
"public function create(Parameter $parameter)\r\n {\r\n return view('attributes.create')->with([\r\n 'parameter' => $parameter\r\n ]);\r\n }",
"public function setParam($param, $value);",
"public function __construct(string $name, $value) {\n\t\t\t$info = Core\\DataType::info($value);\n\t\t\tif (($info->class == 'object') && ($info->type != 'string')) {\n\t\t\t\tthrow new Throwable\\InvalidArgument\\Exception('Invalid argument specified. Expected a primitive or unknown, but got \":type\"', array(':type', $info->type));\n\t\t\t}\n\t\t\t$this->info = $info;\n\t\t\t$this->name = $name;\n\t\t\t$this->value = $value;\n\t\t}",
"public function create($params = array()) {\n\n }",
"public function addParam($name, $value){\r\n $obj = $this->root->appendChild(new KwixoXMLElement('obj'));\r\n $obj->appendChild(new KwixoXMLElement('name', $name));\r\n $obj->appendChild(new KwixoXMLElement('value', $value));\r\n return $obj;\r\n }",
"public function with(Template\\Parameter $parameter)\n {\n $this->parameters[$parameter->getKey()] = $parameter;\n }",
"public function make(string $name, array $parameters = []);",
"public function getOrCreateNewCallLogParameters() {\n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository(SiteParameters::class)->findAll();\n if( count($entities) != 1 ) {\n throw new \\Exception( 'Must have only one parameter object. Found '.count($entities).'object(s)' );\n }\n $siteParameters = $entities[0];\n\n $calllogSiteParameter = $siteParameters->getCalllogSiteParameter();\n\n //create one CalllogSiteParameter\n if( !$calllogSiteParameter ) {\n //echo \"CalllogSiteParameter null <br>\";\n $calllogSiteParameter = new CalllogSiteParameter();\n $siteParameters->setCalllogSiteParameter($calllogSiteParameter);\n $em->flush();\n }\n\n return $calllogSiteParameter;\n }",
"public function addTransactionParam($name, $value)\n {\n newrelic_add_custom_parameter($name, $value);\n }",
"public function setParameter($parameter)\n\t{\n\t\t$this->parameter = $parameter;\n\t\t\n\t\treturn $this;\n\t}",
"public function create($input);",
"public abstract function createInstance($parameters);",
"public function createParameterObject($type, $class)\n {\n $request = new \\Widget\\Request(array(\n 'widget' => $this->widget,\n 'fromGlobal' => false,\n $type => array(\n 'key' => 'value',\n 'key2' => 'value2',\n 'int' => '5',\n 'array' => array(\n 'item' => 'value'\n )\n )\n ));\n\n if ('request' === $class) {\n return $request;\n } else {\n // inject request widget\n $class = '\\Widget\\\\' . ucfirst($class);\n $parameter = new $class(array(\n 'widget' => $this->widget,\n 'request' => $request\n ));\n return $parameter;\n }\n }",
"public function __construct ($value) {}",
"public function __construct ($value) {}",
"public function __construct ($value) {}",
"public function set_parameter( $param_id, $value, $required = false, $data = NULL )\n {\n $util_class_name = lib::get_class_name( 'util' );\n\n // make sure the parameter exists\n if( !array_key_exists( $param_id, $this->parameters ) )\n throw lib::create( 'exception\\argument', 'param_id', $param_id, __METHOD__ );\n\n // process the value so that it displays correctly\n if( 'boolean' == $this->parameters[$param_id]['type'] )\n {\n if( is_null( $value ) ) $value = '';\n else $value = $value ? 'Yes' : 'No';\n }\n else if( 'date' == $this->parameters[$param_id]['type'] )\n {\n if( strlen( $value ) )\n {\n $date_obj = $util_class_name::get_datetime_object( $value );\n $value = $date_obj->format( 'Y-m-d' );\n }\n else $value = '';\n }\n else if( 'time' == $this->parameters[$param_id]['type'] )\n {\n if( strlen( $value ) )\n {\n $date_obj = $util_class_name::get_datetime_object( $value );\n $value = $date_obj->format( 'H:i' );\n }\n else $value = '12:00';\n }\n else if( 'hidden' == $this->parameters[$param_id]['type'] )\n {\n if( is_bool( $value ) ) $value = $value ? 'true' : 'false';\n }\n else if( 'constant' == $this->parameters[$param_id]['type'] &&\n ( ( is_int( $value ) && 0 == $value ) ||\n ( is_string( $value ) && '0' == $value ) ) )\n {\n $value = ' 0';\n }\n else if( 'number' == $this->parameters[$param_id]['type'] )\n {\n $value = floatval( $value );\n }\n\n $this->parameters[$param_id]['value'] = $value;\n if( 'enum' == $this->parameters[$param_id]['type'] )\n {\n $enum = $data;\n if( is_null( $enum ) )\n throw lib::create( 'exception\\runtime',\n 'Trying to set enum parameter without enum values.', __METHOD__ );\n\n // add a null entry (to the front of the array) if the parameter is not required\n if( !$required )\n {\n $enum = array_reverse( $enum, true );\n $enum['NULL'] = '';\n $enum = array_reverse( $enum, true );\n }\n $this->parameters[$param_id]['enum'] = $enum;\n }\n else if( 'date' == $this->parameters[$param_id]['type'] ||\n 'datetime' == $this->parameters[$param_id]['type'] )\n {\n if( is_array( $data ) )\n {\n $date_limits = $data;\n if( array_key_exists( 'min_date', $date_limits ) )\n $this->parameters[$param_id]['min_date'] = $date_limits['min_date'];\n if( array_key_exists( 'max_date', $date_limits ) )\n $this->parameters[$param_id]['max_date'] = $date_limits['max_date'];\n }\n }\n\n $this->parameters[$param_id]['required'] = $required;\n }",
"public function __construct($name,$value){\n\t\t$this->name = $name;\n\t\t$this->value = $value;\n\t}"
] | [
"0.77203196",
"0.7223073",
"0.70504355",
"0.684999",
"0.6799934",
"0.6370717",
"0.62863684",
"0.6192162",
"0.6157101",
"0.61538124",
"0.6153628",
"0.61499363",
"0.6068639",
"0.606399",
"0.6039007",
"0.603646",
"0.59702665",
"0.59573305",
"0.59167486",
"0.5909457",
"0.5898068",
"0.58895385",
"0.5886865",
"0.5880893",
"0.58570224",
"0.58132744",
"0.5803214",
"0.5765412",
"0.57572234",
"0.5721498",
"0.57017237",
"0.5699429",
"0.56804854",
"0.56804854",
"0.56737417",
"0.56688756",
"0.56672525",
"0.5667056",
"0.5657363",
"0.56492496",
"0.5634933",
"0.5633694",
"0.5632934",
"0.5631627",
"0.5614706",
"0.5614706",
"0.5611486",
"0.5610517",
"0.5605963",
"0.5603503",
"0.5602987",
"0.56014824",
"0.5600388",
"0.5584106",
"0.5580414",
"0.5575903",
"0.55674845",
"0.5559725",
"0.55538267",
"0.5551486",
"0.5541672",
"0.55316067",
"0.55290717",
"0.5510517",
"0.5508515",
"0.5491669",
"0.5488997",
"0.5485782",
"0.5480045",
"0.5468034",
"0.54654616",
"0.5440509",
"0.5435582",
"0.5434164",
"0.54299295",
"0.5428707",
"0.542617",
"0.5426039",
"0.5423271",
"0.54141116",
"0.5411934",
"0.5406266",
"0.539732",
"0.5391363",
"0.53693247",
"0.53678167",
"0.5366184",
"0.5357662",
"0.5354613",
"0.5346491",
"0.5342908",
"0.5336802",
"0.5326213",
"0.53249735",
"0.53230846",
"0.5319096",
"0.5316362",
"0.5316362",
"0.5316362",
"0.531017",
"0.53048277"
] | 0.0 | -1 |
Removes one or more parameters with the specified name. | public function offsetUnset($name)
{
if (is_int($name)) {
parent::offsetUnset($name);
// @codeCoverageIgnoreStart
// This will never be reached, because an exception is always
// thrown.
return;
// @codeCoverageIgnoreEnd
}
unset($this->parameters[strtoupper($name)]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeParameter($name)\n {\n $this->getParameters();\n unset($this->parameters[$name]);\n }",
"public function removeParam($name)\n {\n if (isset($this->params[$name])) {\n unset($this->params[$name]);\n }\n return $this;\n }",
"public function forgetParameter($name)\n {\n $this->parameters();\n unset($this->parameters[$name]);\n }",
"public function __unset($name)\n {\n return $this->removeParam($name);\n }",
"public function removeParameter($name)\n {\n $name = strtolower($name);\n if (isset($this->parameters[$name])) {\n unset($this->parameters[$name]);\n return true;\n }\n return false;\n }",
"public function __unset($name)\n {\n unset($this->_params['args'][$name]);\n }",
"public function __unset($name)\n {\n unset($this->_params['args'][$name]);\n }",
"public function removeParameter($name)\n {\n $name = strtolower($name);\n if (isset($this->parameters[$name])) {\n unset($this->parameters[$name]);\n\n return true;\n }\n\n return false;\n }",
"public function remove($name);",
"public function remove($name);",
"public function remove($name);",
"public function remove($name);",
"public function remove($name);",
"public function remove($name);",
"public function delete(String $name) : ParameterBag\n {\n if ($this->has($name)) {\n unset($this->parameters[$name]);\n }\n\n return $this;\n }",
"public function remove($name)\n {\n unset($this->values[$name]);\n\t}",
"public function __unset($name)\n {\n if (! array_key_exists($name, $this->userParams)) {\n return;\n }\n\n unset($this->userParams[$name]);\n }",
"public function remove(string $name);",
"public function removeParameter(string $name): Query\n {\n $name = $this->sanitizeParameterName($name);\n if (isset($this->parameters[$name])) {\n unset ($this->parameters[$name]);\n }\n return $this;\n }",
"public static function Remove($name);",
"public function removeGetParameter($name)\n {\n if (isset($this->getParams[$name]))\n {\n unset($this->getParams[$name]);\n return true;\n }\n else return false;\n }",
"public function remove($name)\n\t{\n\t\t$this->set($name, null);\n\t}",
"function remove($name) {\n if (isset($this->data[$name])) {\n unset($this->data[$name]);\n }\n }",
"public function clearParams($name = null)\n {\n if (null === $name) {\n $this->_invokeParams = [];\n } elseif (is_string($name) && isset($this->_invokeParams[$name])) {\n unset($this->_invokeParams[$name]);\n } elseif (is_array($name)) {\n foreach ($name as $key) {\n if (is_string($key) && isset($this->_invokeParams[$key])) {\n unset($this->_invokeParams[$key]);\n }\n }\n }\n\n return $this;\n }",
"public function __unset($name)\n {\n $vars = $this->vars();\n if (! isset($vars[$name])) {\n return;\n }\n unset($vars[$name]);\n }",
"function remove($name = '')\n {\n }",
"public function remove(string $name): void;",
"function remove($name) {\n\t\t$this->_settings->remove($name);\n\t}",
"public static function remove($name)\n {\n static::getInstance()->offsetUnset($name);\n }",
"public function removePostParameter($name)\n {\n if (isset($this->postParams[$name]))\n {\n unset($this->postParams[$name]);\n return true;\n }\n else return false;\n }",
"public function remove($parameter);",
"public function Delete($name)\n {\n $this->setParameters(['name' => $name]);\n $this->deleteByParameter();\n $this->resetProperties();\n }",
"public function __unset($name);",
"public function removeElement( $name ) {\n\t\tunset( $this->data[ $name ] );\n\t}",
"public function remove_query_var($name)\n {\n }",
"public function remove($name)\n {\n foreach ((array) $name as $n) {\n unset($this->methods[$n]);\n }\n }",
"public function removeFilter(string $name);",
"public function removeNamedItem($name) { }",
"public function delete($name)\n {\n unset($this->data[$name]);\n }",
"public function __unset($param)\r\n {\r\n $this->params_named->remove($param);\r\n }",
"public function __unset($name)\n {\n $this->var_holder->remove($name);\n }",
"public function delete($name) {\r\n\r\n $this->del($name);\r\n $this->loadSesionVars();\r\n }",
"public function removeOption($name);",
"public function remove($name)\n {\n unset($this->bag[$name]);\n }",
"public function removeFilter(string $name): void;",
"public function __unset($name)\n {\n $this->varHolder->remove($name);\n }",
"public function offsetUnset($name)\n {\n unset($this->vars[$name]);\n }",
"public function removeFilter($name)\n {\n unset($this->filters[$name]);\n }",
"public function remove($name)\n {\n $name = (array) $name;\n $this->data = array_filter($this->data, function ($value) use ($name) {\n return ! in_array($value, $name);\n });\n\n return $this;\n }",
"function deleteConfigParameter($name){\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"DELETE\n\t\tFROM \".$db_table_prefix.\"configuration WHERE name = :name\";\n\n if (!$stmt = $db->prepare($query))\n return false;\n\n $sqlVars[\":name\"] = $name;\n\n if (!$stmt->execute($sqlVars)){\n // Error\n return false;\n }\n\n if ($stmt->rowCount() > 0)\n return true;\n else {\n addAlert(\"danger\", \"No configuration parameter '$name' exists.\");\n return false;\n }\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}",
"public function remove(string $name = '')\n {\n if ('' === $name) {\n unset($this->items);\n return;\n }\n \n if (isset($this->items[$name])) {\n unset($this->items[$name]);\n }\n }",
"public function __unset($name)\n {\n }",
"public function __unset($name)\n {\n }",
"public function __unset($name)\n {\n }",
"public function __unset($name)\n {\n }",
"public function __unset($name)\n {\n }",
"public function __unset($name)\n {\n }",
"public function __unset($name)\n {\n }",
"public function __unset($name)\n {\n }",
"public function __unset( string $name ) {\n\t\t$this->data = array_diff_key( $this->data, [ $name => $this->data[ $name ] ] );\n\t}",
"public function __unset(string $name) {\n\t\tunset($this->data[$name]);\n\t}",
"public function __unset($name)\n {\n $pos = & $this->_data;\n $name = explode($delimiter, $name);\n $cnt = count($name);\n for ($i = 0; $i < $cnt - 1; $i ++) {\n if (!isset($pos[$name[$i]])) return;\n $pos = & $pos[$name[$i]];\n }\n unset($pos);\n }",
"abstract public function removeItem($name);",
"public function remove($name)\r\n {\r\n unset($this->data[$name]);\r\n return $this;\r\n }",
"public function delete($name)\n {\n foreach ($this->content as $key => $val) {\n if ($val['name'] == $name) {\n unset($this->content[$key]);\n $this->content = array_merge($this->content);\n }\n }\n }",
"public function __unset($name)\n {\n $this->unset($name);\n }",
"public function __unset($name)\n {\n return $this->delete($this->uri, $name);\n }",
"public function __unset($name)\n {\n if (array_key_exists($name, $this->_attributes)) {\n unset($this->_attributes[$name]);\n }\n }",
"public function rm($name)\r\n\t{\r\n\t\t$lh = $this->_lock();\r\n\r\n\t\t$val = $this->get();\r\n\t\tif (!is_array($val))\r\n\t\t{\r\n\t\t\t$val = array();\r\n\t\t}\r\n\t\tunset($val[$name]);\r\n\t\t$val = serialize($val);\r\n\r\n\t\treturn $this->_write($val, $lh);\r\n\t}",
"public function __unset($name)\n {\n $this->unset();\n }",
"public function __unset($name)\n {\n \tunset($this->_data[$name]);\n }",
"public function remove($name, $removeObjects = true) {}",
"public function delete($name);",
"public function delete($name);",
"public function delete($name);",
"public function deleteDBVar($name) {\n $name = strtolower($name);\n $configElement = R::findOne($this->_dbConfigTable, 'param = ?', array($name));\n if ($configElement !== NULL) {\n R::trash($configElement);\n }\n }",
"public function offsetUnset($name)\n {\n if (array_key_exists($name, $this->values)) {\n unset($this->values[$name], $this->raw[$name], $this->factories[$name]);\n }\n }",
"public function offsetUnset($name)\n\t{\n\t\t$this->remove ( $name );\n\t}",
"public function remove_permastruct($name)\n {\n }",
"public function remove_data($name)\n\t{\n\t\tunset($this->_data[$name]);\n\t}",
"public function removeAction(string $name)\n {\n // some logic\n }",
"function __unset( $name ) {\n\t\tunset( $this->$name );\n\t}",
"public function remove($name, $strict = false);",
"public function __unset($name)\n {\n if (is_array($this->resource)) {\n\n unset($this->resource[$name]);\n\n return;\n }\n\n unset($this->resource->$name);\n }",
"function __unset($name)\n {\n unset($this->item[$name]);\n }",
"public function delete($name = false);",
"static public function del($name) {}",
"public function __unset($name)\n\t{\n\t\tif(isset($this->_attributes[$name]))\n\t\t\tunset($this->_attributes[$name]);\n\t\telse\n\t\t\tparent::__unset($name);\n\t}",
"public function removeAttribute($name)\n {\n unset($this->attributes[$name]);\n }",
"public function del($name) {\n $this->$name = NULL;\n return $this;\n }",
"function __unset($name)\n {\n $this->clear($name);\n }",
"public function removeRoute($name);",
"public function removeConditionByName($name)\n {\n $toRemoves = $this->getConditions()->filter(function ($item) use ($name) {\n return $item->getName() === $name;\n });\n\n $toRemoves->each(function ($item, $key) use ($name) {\n $this->conditions->forget($key);\n\n $this->getCartItemCollection()->each(function ($item) use ($name) {\n $item->removeConditionByName($name);\n });\n });\n }",
"public function variable_del($name) {\n // TODO\n variable_del($name);\n }",
"public function removeValue(string $name): bool;",
"public function deleteData($name) {\n if (isset($this->data[$name])) {\n unset($this->data[$name]);\n }\n }",
"public function removeValidation(string $name)\n {\n $args = func_get_args();\n return $this->remove('json', 'validation', ...$args);\n }",
"public function deleteP($name) {\n foreach($this->words[$this->wordsIndex]->needUpdateParts as $part) {\n $func = $part['func'];\n $partName = $part['partName'];\n /**\n * @var Document $documentEdit\n */\n $documentEdit = $this->$func($partName);\n $documentEdit->setValue($name, 'p',MDWORD_DELETE);\n }\n }",
"function __unset($name) {\n\t\tunset($this->object[$name]);\n\t}",
"public function unsetFunc($name){\n $statement = $this->db->prepare('DELETE FROM storage WHERE name = :name;');\n $statement->bindValue(':name', $name);\n $statement->execute();\n }"
] | [
"0.856868",
"0.79019105",
"0.7745078",
"0.7701082",
"0.7646328",
"0.7614606",
"0.7614606",
"0.7605631",
"0.7429224",
"0.7429224",
"0.7429224",
"0.7429224",
"0.7429224",
"0.7429224",
"0.74145716",
"0.7387351",
"0.72882324",
"0.71949214",
"0.7140386",
"0.7105685",
"0.69245136",
"0.69144154",
"0.6901731",
"0.6828557",
"0.6785314",
"0.6782343",
"0.67667705",
"0.67655736",
"0.6741921",
"0.6729998",
"0.66940725",
"0.6686177",
"0.6679516",
"0.66648823",
"0.66517246",
"0.6616125",
"0.6611481",
"0.6611222",
"0.6588043",
"0.6552271",
"0.65197134",
"0.6518111",
"0.64910835",
"0.64604783",
"0.64561105",
"0.64207876",
"0.6419687",
"0.64148194",
"0.641036",
"0.64103335",
"0.6409642",
"0.6403523",
"0.6403523",
"0.6403523",
"0.64026433",
"0.64026433",
"0.64022326",
"0.64022326",
"0.64022326",
"0.63817716",
"0.6378478",
"0.63699716",
"0.63542664",
"0.63375866",
"0.6328056",
"0.63268965",
"0.631294",
"0.6309094",
"0.6306475",
"0.63014406",
"0.63",
"0.6298789",
"0.62973213",
"0.62973213",
"0.62973213",
"0.6278521",
"0.6277482",
"0.62589693",
"0.62576324",
"0.6247132",
"0.62458456",
"0.62291545",
"0.6227961",
"0.62274796",
"0.62146366",
"0.6214617",
"0.6205061",
"0.6204931",
"0.62013465",
"0.61946815",
"0.61798155",
"0.61523265",
"0.6147114",
"0.6143281",
"0.6137188",
"0.61272436",
"0.6111571",
"0.6107288",
"0.61051923",
"0.61027074"
] | 0.7324328 | 16 |
/ }}} This method is automatically called when the object is cloned. Specifically, this will ensure all child elements are also cloned. | public function __clone()
{
foreach ($this->parameters as $key => $child) {
$this->parameters[$key] = clone $child;
$this->parameters[$key]->parent = $this;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __clone()\n\t{\n\t\t$this->children=[];\n\t}",
"public function __clone()\n {\n foreach ($this->children as $key => $value) {\n if (is_object($value)) {\n $this->children[$key] = clone $value;\n }\n }\n }",
"public function __clone()\n\t{\n\t\tif ($this->parent !== NULL &&\n\t\t\t!($this->parent instanceof ComponentContainer && $this->parent->isCloning()))\n\t\t{\n\t\t\t$this->setParent(NULL);\n\t\t}\n\t}",
"protected function __clone()\n {\n }",
"private function __clone()\n {\n }",
"private function __clone()\n {\n }",
"protected function __clone() {\n \n }",
"protected function __clone()\n {\n \n }",
"private function __clone() {\n \n }",
"private function __clone() {\n \n }",
"public function __clone()\n {\n $this->reset(TRUE);\n }",
"protected function __clone() { }",
"private function __clone()\n\t{\n\n\t}",
"private function __clone()\n\t{\n\n\t}",
"private function __clone() {\r\n\r\n }",
"protected function __clone() {}",
"protected function __clone() {}",
"protected function __clone() {}",
"protected function __clone() {}",
"protected function __clone() {}",
"protected function __clone() {}",
"protected function __clone() {}",
"protected function __clone()\n {\n }",
"protected function __clone()\n {\n }",
"protected function __clone()\n {\n }",
"protected function __clone()\n {\n }",
"public function __clone() {\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Cloning this class could cause catastrophic disasters!', 'be-table-ship' ), '4.0' );\n\t\t}",
"private function __clone()\n {\n \n }",
"private function __clone()\n {\n \n }",
"protected abstract function cloneEmpty();",
"protected function __clone(){}",
"private function __clone() { \n\n\t}",
"public function __clone() {\n $this->components = Arrays::copy($this->components);\n }",
"protected function __clone()\n {}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone(){}",
"private function __clone() {\r\n\t}",
"final public function __clone()\n {\n return;\n }",
"public function __clone()\n {\n }",
"private function __clone() {\n\t}",
"private function __clone() {\n\t}",
"private function __clone() {\n\t}",
"private function __clone() {\n\t}",
"private function __clone() {\n\t}",
"protected function __clone()\n {\n\n }",
"private function __clone ()\n\t{}",
"private function __clone()\n\t{\n\t}",
"private function __clone()\n\t{\n\t}",
"public function __clone()\n {\n if (is_object($this->collection)) {\n $this->collection = clone $this->collection;\n }\n $this->initialize();\n $this->owner = null;\n $this->snapshot = [];\n $this->changed();\n }",
"private function __clone() {\r\n }",
"final private function __clone()\r\n {\r\n // TODO: Implement __clone() method.\r\n }",
"public function __clone()\n {\n $this->headers = clone $this->headers;\n $this->encoder = clone $this->encoder;\n $this->cacheKey = bin2hex(random_bytes(16)); // set 32 hex values\n $children = [];\n foreach ($this->children as $pos => $child) {\n $children[$pos] = clone $child;\n }\n $this->setChildren($children);\n }",
"private function __clone() {\n }",
"private function __clone() {\n }",
"private function __clone() {\n }",
"private function __clone() {\n }",
"private function __clone() {\n }",
"private function __clone() { }",
"private function __clone() { }",
"private function __clone() { }",
"private function __clone() { }",
"private function __clone() { }",
"private function __clone() { }",
"private function __clone() { }",
"private function __clone() { }",
"private function __clone() { }",
"private function __clone() { }",
"private function __clone() {\n\t\t\treturn false;\n\t\t}",
"private function __clone() {\r\n \r\n }",
"public function __clone() {\n\t\t// Cloning instances of the class is forbidden\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'elementor' ), '1.0.0' );\n\t}",
"private function __clone () {}",
"private function __clone()\r\n {\r\n }",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}",
"private function __clone() {}"
] | [
"0.74635226",
"0.74169743",
"0.69734615",
"0.6656827",
"0.6631805",
"0.6631805",
"0.65919775",
"0.6550796",
"0.6538563",
"0.6538563",
"0.6503462",
"0.6482462",
"0.6472876",
"0.6472876",
"0.6467483",
"0.645982",
"0.645982",
"0.645982",
"0.645982",
"0.645982",
"0.645982",
"0.645982",
"0.64557475",
"0.64557475",
"0.64557475",
"0.64557475",
"0.64439476",
"0.6442682",
"0.6442682",
"0.64391327",
"0.6435581",
"0.6432461",
"0.6427564",
"0.6424586",
"0.6423192",
"0.6423192",
"0.6423192",
"0.6423192",
"0.6423192",
"0.6423192",
"0.6423192",
"0.6423192",
"0.6423192",
"0.6423192",
"0.6423192",
"0.64216274",
"0.64148444",
"0.64116526",
"0.63944125",
"0.63944125",
"0.63944125",
"0.63944125",
"0.63944125",
"0.63876104",
"0.6384984",
"0.6384963",
"0.6384963",
"0.63790035",
"0.637787",
"0.63774014",
"0.6365106",
"0.6363005",
"0.6363005",
"0.6363005",
"0.6363005",
"0.6363005",
"0.63613564",
"0.63613564",
"0.63613564",
"0.63613564",
"0.63613564",
"0.63613564",
"0.63613564",
"0.63613564",
"0.63613564",
"0.63613564",
"0.63609844",
"0.6357246",
"0.6353962",
"0.6348516",
"0.6345319",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704",
"0.6344704"
] | 0.0 | -1 |
Validates the node for correctness. The following options are supported: Node::REPAIR If something is broken, and automatic repair may be attempted. An array is returned with warnings. Every item in the array has the following properties: level (number between 1 and 3 with severity information) message (human readable message) node (reference to the offending node) | public function validate($options = 0)
{
$warnings = [];
// Checking if our value is UTF-8
if (!StringUtil::isUTF8($this->getRawMimeDirValue())) {
$oldValue = $this->getRawMimeDirValue();
$level = 3;
if ($options & self::REPAIR) {
$newValue = StringUtil::convertToUTF8($oldValue);
if (true || StringUtil::isUTF8($newValue)) {
$this->setRawMimeDirValue($newValue);
$level = 1;
}
}
if (preg_match('%([\x00-\x08\x0B-\x0C\x0E-\x1F\x7F])%', $oldValue, $matches)) {
$message = 'Property contained a control character (0x'.bin2hex($matches[1]).')';
} else {
$message = 'Property is not valid UTF-8! '.$oldValue;
}
$warnings[] = [
'level' => $level,
'message' => $message,
'node' => $this,
];
}
// Checking if the propertyname does not contain any invalid bytes.
if (!preg_match('/^([A-Z0-9-]+)$/', $this->name)) {
$warnings[] = [
'level' => $options & self::REPAIR ? 1 : 3,
'message' => 'The propertyname: '.$this->name.' contains invalid characters. Only A-Z, 0-9 and - are allowed',
'node' => $this,
];
if ($options & self::REPAIR) {
// Uppercasing and converting underscores to dashes.
$this->name = strtoupper(
str_replace('_', '-', $this->name)
);
// Removing every other invalid character
$this->name = preg_replace('/([^A-Z0-9-])/u', '', $this->name);
}
}
if ($encoding = $this->offsetGet('ENCODING')) {
if (Document::VCARD40 === $this->root->getDocumentType()) {
$warnings[] = [
'level' => 3,
'message' => 'ENCODING parameter is not valid in vCard 4.',
'node' => $this,
];
} else {
$encoding = (string) $encoding;
$allowedEncoding = [];
switch ($this->root->getDocumentType()) {
case Document::ICALENDAR20:
$allowedEncoding = ['8BIT', 'BASE64'];
break;
case Document::VCARD21:
$allowedEncoding = ['QUOTED-PRINTABLE', 'BASE64', '8BIT'];
break;
case Document::VCARD30:
$allowedEncoding = ['B'];
//Repair vCard30 that use BASE64 encoding
if ($options & self::REPAIR) {
if ('BASE64' === strtoupper($encoding)) {
$encoding = 'B';
$this['ENCODING'] = $encoding;
$warnings[] = [
'level' => 1,
'message' => 'ENCODING=BASE64 has been transformed to ENCODING=B.',
'node' => $this,
];
}
}
break;
}
if ($allowedEncoding && !in_array(strtoupper($encoding), $allowedEncoding)) {
$warnings[] = [
'level' => 3,
'message' => 'ENCODING='.strtoupper($encoding).' is not valid for this document type.',
'node' => $this,
];
}
}
}
// Validating inner parameters
foreach ($this->parameters as $param) {
$warnings = array_merge($warnings, $param->validate($options));
}
return $warnings;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function validate()\n {\n $this->validateNode($this->tree);\n }",
"public function input_actionNodeMomentCreateFail()\n {\n return [\n [\n [\n \n ],\n 'Not a proper http method type, please send a POST'\n ],\n [\n [\n 'node_hash_id' => ''\n ],\n \"Error cannot be created as no node_hash_id was provided, please send a POST with 'node_hash_id'\"\n ],\n [\n [\n 'node_hash_id' => 'node_hash_id value',\n 'cpu_usage' => '',\n ],\n \"Error cannot be created as no cpu_usage was provided, please send a POST with 'cpu_usage'\"\n ],\n [\n [\n 'node_hash_id' => 'node_hash_id value',\n 'cpu_usage' => 'cpu_usage value',\n 'memory_usage' => '',\n ],\n \"Error cannot be created as no memory_usage was provided, please send a POST with 'memory_usage'\"\n ],\n [\n [\n 'node_hash_id' => 'node_hash_id value',\n 'cpu_usage' => 'cpu_usage value',\n 'memory_usage' => 'memory_usage value',\n 'hard_disk_usage' => '',\n ],\n \"Error cannot be created as no hard_disk_usage was provided, please send a POST with 'hard_disk_usage'\"\n ],\n [\n [\n 'node_hash_id' => 'node_hash_id value',\n 'cpu_usage' => 'cpu_usage value',\n 'memory_usage' => 'memory_usage value',\n 'hard_disk_usage' => 'hard_disk_usage value',\n 'temperature' => '',\n ],\n \"Error cannot be created as no temperature was provided, please send a POST with 'temperature'\"\n ],\n [\n [\n 'node_hash_id' => 'node_hash_id value',\n 'cpu_usage' => 'cpu_usage value',\n 'memory_usage' => 'memory_usage value',\n 'hard_disk_usage' => 'hard_disk_usage value',\n 'temperature' => 'temperature value',\n 'weather' => '',\n ],\n \"Error cannot be created as no weather was provided, please send a POST with 'weather'\"\n ],\n ];\n }",
"public function isValidLevelThrowsExceptionOnInvalidLevelIfAskedToDoSoDataProvider()\n {\n return [\n 'negative integer' => [-1],\n 'higher level than expected' => [8],\n 'float' => [1.5],\n 'string' => ['string'],\n 'array' => [[]],\n 'object' => [new \\stdClass()],\n 'boolean FALSE' => [false],\n 'NULL' => [null]\n ];\n }",
"protected function get_errors_description() {\n $errors = array();\n if ($this->options->is_check_errors == true) {\n\n $i = 0;\n $rules_names = $this->get_error_hints_names();\n\n foreach($rules_names as $rule_name) {\n $rule = new $rule_name($this->get_dst_root());\n $rhr = $rule->check_hint();\n\n if (count($rhr->problem_ids) > 0) {\n $errors[$i] = array();\n\n $errors[$i][\"problem\"] = $rhr->problem;\n $errors[$i][\"solve\"] = $rhr->solve;\n $errors[$i][\"problem_ids\"] = $rhr->problem_ids;\n $errors[$i][\"problem_type\"] = $rhr->problem_type;\n $errors[$i][\"problem_indfirst\"] = $rhr->problem_indfirst;\n $errors[$i][\"problem_indlast\"] = $rhr->problem_indlast;\n\n ++$i;\n }\n }\n }\n return $errors;\n }",
"public function check(Node $node);",
"public function healthCheck(): array\n {\n if ( !empty( $this->healthCheckErrors ) ) {\n return $this->healthCheckErrors;\n }\n foreach ( $this->doHealthCheck() as $key => $error ) {\n $return[$key] = [\n 'content' => $error,\n 'class' => 'danger'\n ];\n }\n return $this->healthCheckErrors = $return ?? [];\n }",
"public function violations(): array;",
"public function it_handles_invalid_nodes() {\n\t\t\\WP_Mock::wpPassthruFunction( '__' );\n\n\t\t$node_id = mt_rand( 1, 100 );\n\t\t$settings = array(\n\t\t\t'_type' => 'invalid-node',\n\t\t\t'invalid_node_field' => rand_str(),\n\t\t);\n\n\t\t$subject = new WPML_Cornerstone_Translatable_Nodes();\n\t\t$strings = $subject->get( $node_id, $settings );\n\t\t$this->assertCount( 0, $strings );\n\t}",
"public function it_handles_invalid_nodes() {\n\t\t\\WP_Mock::wpPassthruFunction( '__' );\n\n\t\t$node_id = mt_rand( 1, 100 );\n\t\t$settings = array(\n\t\t\t'_type' => 'invalid-node',\n\t\t\t'invalid_node_field' => rand_str(),\n\t\t);\n\n\t\t$subject = new WPML_Cornerstone_Translatable_Nodes();\n\t\t$strings = $subject->get( $node_id, $settings );\n\t\t$this->assertCount( 0, $strings );\n\t}",
"public function validate() {\n /* Make sure we're dealing with a valid tag */\n $tagValue = $this->node->getValue();\n if ($this->tagInfo === false) {\n array_push($this->errors, \"Invalid Tag [$tagValue]. Suggestions: <br/> \" \n . $this->getMisspelledSuggestion($tagValue, $this->validTags));\n $this->node->addErrors($this->errors);\n return;\n }\n \n /* Check if tag is deprecated */\n if ($this->tagInfo->isTagDeprecated()) {\n /* Deprecated Tag: Add the warning and skip further validation */\n array_push($this->warnings, \"Deprecated Tag \\\"<$tagValue>\\\": \" . $this->tagInfo->getDescription());\n $this->node->addWarnings($this->warnings);\n return;\n }\n \n /* Check if this tag has required attributes */\n if (count($this->tagInfo->getRequiredAttributes() > 0)) {\n $this->validateRequiredAttributes();\n }\n \n /* Check if the tag has attributes set, if so, validate them */\n foreach ($this->node->getAttr() as $att => $val) {\n if (!$this->validateAttributeValue($att,$val)) {\n array_push($this->errors, \"The '$att' attribute has an invalid value. The allowed values are: <br />\" \n . implode(\"<br />\", $this->attributeList->getAttributeInfo($att)->getValues()). \"<br />\");\n }\n }\n \n \n $this->node->addErrors($this->errors);\n $this->node->addWarnings($this->warnings);\n \n }",
"public function check() {\n $field = null;\n $this->_errors = [];\n $fields = $this->_getField();\n\n foreach ($this->_constraints as $constraints) {\n foreach ($fields as $value) {\n switch ($constraints['type']) {\n case self::EQUAL:\n if ($value != $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::DIFFERENT:\n if ($value == $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::MORETHAN:\n if ($value <= $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LESSTHAN:\n if ($value >= $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::BETWEEN:\n if ($value < $constraints['value'][0] || $value > $constraints['value'][1]) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::IN:\n if (!in_array($value, $constraints['value'])) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::NOTIN:\n if (in_array($value, $constraints['value'])) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTH:\n if (strlen($value) != $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTHMIN:\n if (strlen($value) < $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTHMAX:\n if (strlen($value) > $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTHIN:\n if (!in_array(strlen($value), $constraints['value'])) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::LENGTHBETWEEN:\n if (strlen($value) < $constraints['value'][0] || strlen($value) > $constraints['value'][1]) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::REGEX:\n if (!preg_match($constraints['value'], $value)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::URL:\n if (!filter_var($value, FILTER_VALIDATE_URL)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::MAIL:\n if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::INT:\n if (!filter_var($value, FILTER_VALIDATE_INT)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::FLOAT:\n if (!filter_var($value, FILTER_VALIDATE_FLOAT)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::ALPHA:\n if (!preg_match('#^([a-zA-Z]+)$#', $value)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::ALPHANUM:\n if (!preg_match('#^([a-zA-Z0-9]+)$#', $value)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::ALPHADASH:\n if (!preg_match('#^([a-zA-Z0-9_-]+)$#', $value)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::IP:\n if (!filter_var($value, FILTER_VALIDATE_IP)) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::SQL:\n /** @var $value \\Gcs\\Framework\\Core\\Orm\\Entity\\Entity */\n\n $sql = new Sql();\n $sql->query('query-form-validation', $constraints['value']['query']);\n $sql->vars('value', $value);\n\n if (count($constraints['value']['vars']) > 0) {\n $sql->vars($constraints['value']['vars']);\n }\n\n $data = $sql->fetch('query-form-validation', Sql::PARAM_FETCHCOLUMN);\n\n $querySuccess = true;\n\n switch ($constraints['value']['constraint']) {\n case '==':\n if ($data != $constraints['value']['value']) {\n $querySuccess = false;\n }\n break;\n\n case '!=':\n if ($data == $constraints['value']['value']) {\n $querySuccess = false;\n }\n break;\n\n case '>':\n if ($data <= $constraints['value']['value']) {\n $querySuccess = false;\n }\n break;\n\n case '<':\n if ($data >= $constraints['value']['value']) {\n $querySuccess = false;\n }\n break;\n }\n\n if (!$querySuccess) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::CUSTOM:\n /** @var object[] $constraints */\n if ($constraints['value']->filter() == false) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['value']->error()]);\n }\n break;\n }\n }\n\n switch ($constraints['type']) {\n case self::COUNT:\n if (count($fields) != $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::COUNTMIN:\n if (count($fields) < $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::COUNTMAX:\n if (count($fields) > $constraints['value']) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::COUNTIN:\n /** @var array $constraints */\n if (!in_array(count($fields), $constraints['value'])) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::EXIST:\n if (count($fields) == 1 && $fields[0] == null) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n\n case self::NOTEXIST:\n if (count($fields) == 1 && $fields[0] != null) {\n array_push($this->_errors, ['name' => $this->_field, 'field' => $this->_label, 'message' => $constraints['message']]);\n }\n break;\n }\n }\n }",
"public function dp_valid_nodes() {\n\t\treturn array(\n\t\t\tarray( 'alert', 'alert_content', 'Alert Content', 'VISUAL' ),\n\t\t\tarray( 'text', 'text_content', 'Text content', 'VISUAL' ),\n\t\t\tarray( 'quote', 'quote_content', 'Quote content', 'VISUAL' ),\n\t\t\tarray( 'counter', 'counter_number_prefix_content', 'Counter: number prefix', 'LINE' ),\n\t\t\tarray( 'content-area', 'content', 'Content Area: content', 'AREA' ),\n\t\t\tarray( 'breadcrumbs', 'breadcrumbs_home_label_text', 'Breadcrumbs: home label text', 'LINE' ),\n\t\t\tarray( 'audio', 'audio_embed_code', 'Audio: embed code', 'VISUAL' ),\n\t\t\tarray( 'headline', 'text_content', 'Headline text content', 'VISUAL' ),\n\t\t\tarray( 'content-area-off-canvas', 'off_canvas_content', 'Canvas content', 'VISUAL' ),\n\t\t\tarray( 'content-area-modal', 'modal_content', 'Modal content', 'VISUAL' ),\n\t\t\tarray( 'content-area-dropdown', 'dropdown_content', 'Dropdown content', 'VISUAL' ),\n\t\t\tarray( 'button', 'anchor_text_primary_content', 'Anchor text: primary content', 'LINE' ),\n\t\t\tarray( 'video', 'video_embed_code', 'Video: embed code', 'LINE' ),\n\t\t\tarray( 'search-inline', 'search_placeholder', 'Search Inline: placeholder', 'LINE' ),\n\t\t\tarray( 'search-modal', 'search_placeholder', 'Search Modal: placeholder', 'LINE' ),\n\t\t\tarray( 'search-dropdown', 'search_placeholder', 'Search Dropdown: placeholder', 'LINE' ),\n\t\t);\n\t}",
"public function dp_valid_nodes() {\n\t\treturn array(\n\t\t\tarray( 'alert', 'alert_content', 'Alert Content', 'VISUAL' ),\n\t\t\tarray( 'text', 'text_content', 'Text content', 'VISUAL' ),\n\t\t\tarray( 'quote', 'quote_content', 'Quote content', 'VISUAL' ),\n\t\t\tarray( 'counter', 'counter_number_prefix_content', 'Counter: number prefix', 'LINE' ),\n\t\t\tarray( 'content-area', 'content', 'Content Area: content', 'AREA' ),\n\t\t\tarray( 'breadcrumbs', 'breadcrumbs_home_label_text', 'Breadcrumbs: home label text', 'LINE' ),\n\t\t\tarray( 'audio', 'audio_embed_code', 'Audio: embed code', 'VISUAL' ),\n\t\t\tarray( 'headline', 'text_content', 'Headline text content', 'VISUAL' ),\n\t\t\tarray( 'content-area-off-canvas', 'off_canvas_content', 'Canvas content', 'VISUAL' ),\n\t\t\tarray( 'content-area-modal', 'modal_content', 'Modal content', 'VISUAL' ),\n\t\t\tarray( 'content-area-dropdown', 'dropdown_content', 'Dropdown content', 'VISUAL' ),\n\t\t\tarray( 'button', 'anchor_text_primary_content', 'Anchor text: primary content', 'LINE' ),\n\t\t\tarray( 'video', 'video_embed_code', 'Video: embed code', 'LINE' ),\n\t\t\tarray( 'search-inline', 'search_placeholder', 'Search Inline: placeholder', 'LINE' ),\n\t\t\tarray( 'search-modal', 'search_placeholder', 'Search Modal: placeholder', 'LINE' ),\n\t\t\tarray( 'search-dropdown', 'search_placeholder', 'Search Dropdown: placeholder', 'LINE' ),\n\t\t);\n\t}",
"public function validate()\n {\n if ($this->_bypassValidation === true) {\n return;\n }\n \n $result = $this->initValidator()->validateAll();\n if (is_array($result)) {\n throw new Zikula_Exception($result['message'], $result['code'], $result['debugArray']);\n }\n }",
"public function check() {\n return $this->structure->check();\n }",
"public function findProblems()\n {\n $badChars = $badStepLength = $orphans = $wrongDepth = $wrongNumChildren = array();\n $q = $this->qbFactory->getBaseQueryBuilder()->getQuery();\n foreach ($q->getResult() as $node) {\n $bad = false;\n $node = $this->getNode($node);\n foreach (str_split($node->getPath()) as $char) {\n if (false === strpos($this->getAlphabet(), $char)) {\n $badChars[] = $node->getId();\n $bad = true;\n break;\n }\n }\n if ($bad) {\n continue;\n }\n if (strlen($node->getPath()) % $this->getStepLength()) {\n $badStepLength[] = $node->getId();\n continue;\n }\n try {\n $node->getParent(true);\n } catch (NoResultException $e) {\n $orphans[] = $node->getId();\n continue;\n }\n if ($node->getDepth() != strlen($node->getPath()) / $this->getStepLength()) {\n $wrongDepth[] = $node->getId();\n continue;\n }\n\n $qb = $this->qbFactory->getBaseQueryBuilder()->select('COUNT(e)');\n $expr = $qb->expr();\n $andX = $expr->andX();\n $interval = PathHelper::getChildrenPathInterval($node, $node->getPath());\n $andX->add($expr->between('e.' . $this->getPathFieldName(), $expr->literal($interval[0]), $expr->literal($interval[1])));\n $len = $expr->length('e.' . $this->getPathFieldName());\n $quot = $expr->quot($len, $this->getStepLength());\n $andX->add($expr->eq($quot, $node->getDepth() + 1));\n $numChildren = $qb->where($andX)->getQuery()->getSingleScalarResult();\n\n if ($numChildren != $node->getNumberOfChildren()) {\n $wrongNumChildren[] = $node->getId();\n continue;\n }\n }\n return array($badChars, $badStepLength, $orphans, $wrongDepth, $wrongNumChildren);\n }",
"public function isValidNode();",
"private function validateNode(Tree $tree)\n {\n $children = $tree->getChildren();\n for ($i = 0, $len = count($children); $i < $len; ++$i)\n {\n if ($i === ($len - 1))\n {\n break;\n }\n $condition = $children[$i]->getCondition();\n $segmentName = $children[$i]->getSegmentName();\n if (!(isset($condition)))\n {\n throw new RuntimeException('The segment ' . $segmentName . ' is not a default node, but has no valid condition');\n }\n $conditionType = $this->getConditionType($condition);\n if ($conditionType === 'composite')\n {\n $this->validateComposite($condition, $segmentName);\n }\n else if ($conditionType === 'comparison')\n {\n $this->validateComparison($condition, $segmentName);\n }\n $this->validateNode($children[$i]);\n }\n }",
"function validate( $data = FALSE )\r\n {\r\n // validate $data['status']. \"publish\" or \"drawt\" are accepted\r\n if( isset($data['status']) && ( ($data['status'] < 0) || ($data['status'] > 2) ) )\r\n {\r\n trigger_error(\"Wrong 'status' variable: \".$data['status'].\" Only 2 = 'publish' or 1 = 'drawt' are accepted.\\nFILE: \".__FILE__.\"\\nLINE: \".__LINE__, E_USER_ERROR);\r\n return SF_NO_VALID_ACTION;\r\n } \r\n // check if node exists\r\n if(isset($data['node']) && !file_exists(SF_BASE_DIR . 'data/navigation/'.$data['node']))\r\n {\r\n $this->B->$data['error'] = 'Node '.$data['node'].' dosent exists';\r\n return SF_NO_VALID_ACTION; \r\n } \r\n \r\n return SF_IS_VALID_ACTION;\r\n }",
"public function validate() {\n if (!$this->_data) {\n return false;\n }\n\n $fields = $this->getFields();\n $messages = $this->getMessages();\n\n foreach ($this->_data as $field => $value) {\n if (empty($this->_rules[$field])) {\n continue;\n }\n\n foreach ($this->_rules[$field] as $rule => $params) {\n $options = $params['options'];\n $arguments = $options;\n array_unshift($arguments, $value);\n\n // Use G11n if it is available\n if (class_exists('Titon\\G11n\\Utility\\Validate')) {\n $class = 'Titon\\G11n\\Utility\\Validate';\n } else {\n $class = 'Titon\\Utility\\Validate';\n }\n\n if (!call_user_func(array($class, 'hasMethod'), $rule)) {\n throw new InvalidValidationRuleException(sprintf('Validation rule %s does not exist', $rule));\n }\n\n // Prepare messages\n $message = $params['message'];\n\n if (!$message && isset($messages[$rule])) {\n $message = $messages[$rule];\n }\n\n if ($message) {\n $message = String::insert($message, array_map(function($value) {\n return is_array($value) ? implode(', ', $value) : $value;\n }, $options + array(\n 'field' => $field,\n 'title' => $fields[$field]\n )));\n } else {\n throw new InvalidValidationRuleException(sprintf('Error message for rule %s does not exist', $rule));\n }\n\n if (!call_user_func_array(array($class, $rule), $arguments)) {\n $this->addError($field, $message);\n break;\n }\n }\n }\n\n return empty($this->_errors);\n }",
"function validate($data,$schema,$level=1){\r\n\t$schemaFields = array_keys($schema);\r\n\t\r\n\t// Loop through all the fields\r\n\tforeach($schemaFields as $schemaField){\r\n\t\t// Exlude the schema and version fields\r\n\t\tif($schemaField == \"schema\" || $schemaField == \"version\")\r\n\t\t\tcontinue;\r\n\t\t\r\n\t\t// Check if a field is SET\r\n\t\tif(isset($data[$schemaField]) && !is_array($data[$schemaField])){\r\n\t\t\t// Check to see if the data type of the field is according to the specification\r\n\t\t\tif(isset($schema[$schemaField][\"type\"]) && $schema[$schemaField][\"type\"] != \"REGEX\"){\r\n\t\t\t\tif(checkType($data[$schemaField], $schema[$schemaField][\"type\"])){\r\n\t\t\t\t\techo $schemaField.\" is SET and VALID\\r\\n\";\r\n\t\t\t\t}else{\t\t\t\t\t\r\n\t\t\t\t\techo $schemaField.\" is SET but INVALID \\r\\n\";\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\techo $schemaField.\" is SET\\r\\n\";\r\n\t\t\t}\r\n\r\n\t\t// We assume that this means there is a JSON object in the schema containing the nested fields\r\n\t\t}elseif(isset($data[$schemaField]) && is_array($data[$schemaField])){\r\n\t\t\t$level++;\r\n\t\t\t// Recursive function! Be careful. Considering limiting the number of levels appropriate.\r\n\t\t\t$ret = validate($data[$schemaField],$schema[$schemaField],$level);\t\r\n\t\t\tif(!$ret)\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t$level--;\r\n\t\t\techo \"Back at level: \".$level.\"\\r\\n\";\r\n\t\t\r\n\t\t// If the field was not found in the data array, we must verify if it is required or not according to the schema\r\n\t\t}else{\r\n\t\t\tif($schema[$schemaField]['required']){\r\n\t\t\t\t// An error that the field is missing. This should also mean that the Metadata is invalidated.\r\n\t\t\t\techo \"Schema validation error: \".$schemaField.\"-field is required...\\r\\n\";\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// A warning that the current field is missing, but not required. We do nothing at this point\r\n\t\t\techo $schemaField.\" is NOT set\\r\\n\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t// Check for unknown fields described in the metadata but NOT in the schema\r\n\t$dataFields = array_keys($data); // Get keys from the metadata\r\n\t$unknownFields = array_diff($dataFields, $schemaFields); // Return differences between the 2 arrays\r\n\tif($unknownFields){\r\n\t\tforeach($unknownFields as $unknownField){\r\n\t\t\techo $unknownField.\" is an unknown field.\\r\\n\";\r\n\t\t}\r\n\t}\r\n\t\r\n\t// If we get to here, we assume everything is OK\r\n\treturn true;\r\n}",
"public function validateSchema(): void\n {\n $schemaStructure = [\n 'connections' => [\n 'from' => [\n 'host', 'username', 'password'\n ],\n 'to' => [\n 'host', 'username', 'password'\n ]\n ]\n ];\n $this->handleSchemaRequirmentsChecks($schemaStructure);\n }",
"public function validate(Record $record, ?int $minimumLevel = null): array\n {\n $issues = array_merge(\n $this->checkMaxDNSLookups($record),\n $this->checkAllIsLastMechanism($record),\n $this->checkAllAndRedirect($record),\n $this->checkNoPtr($record),\n $this->checkNoValidatedDomain($record),\n $this->checkModifiersPosition($record),\n $this->checkModifiersUniqueness($record),\n $this->checkUnknownModifiers($record)\n );\n if ($minimumLevel !== null) {\n $issues = array_values(\n array_filter(\n $issues,\n static function (Issue $issue) use ($minimumLevel): bool {\n return $issue->getLevel() >= $minimumLevel;\n }\n )\n );\n }\n\n return $issues;\n }",
"public function getWarnings() : array;",
"public function getWarnings()\n {\n return $this->_getChildrenByName('warning');\n }",
"public function validateElement() {\r\n if (!$this->object->validate()) {\r\n /** @var modValidator $validator */\r\n $validator = $this->object->getValidator();\r\n if ($validator->hasMessages()) {\r\n foreach ($validator->getMessages() as $message) {\r\n $this->addFieldError($message['field'], $this->modx->lexicon($message['message']));\r\n }\r\n }\r\n }\r\n }",
"public function getWarnings(): array;",
"function validate() {\n // @todo Remove module_load_include() call when moving to Drupal core.\n module_load_include('inc', 'fapitng', '/includes/fapitng.validate');\n foreach ($this->validate_callbacks as $callback => $info) {\n if (!call_user_func_array($callback, array_merge(array($this->value), $info['arguments']))) {\n $this->errors[] = $info['message'];\n }\n }\n if ($this->errors) {\n $this->request['invalid_elements'][$this->id] = $this;\n }\n $this->validateInputElements($this->children);\n\n if (!empty($this->request['invalid_elements'])) {\n $this->request['rebuild'] = TRUE;\n return FALSE;\n }\n return TRUE;\n }",
"public function errors() : array\n {\n $errors = [];\n foreach ($this->tests as $error => $test) {\n if (!$test($this->getValue())) {\n $errors[] = $error;\n }\n }\n return $errors;\n }",
"public function validate(): array {\n $errors = [];\n if (!Validation::str_longer_than($this->get_title(), 2)) {\n $errors[] = \"Title must be at least 3 characters long\";\n }\n if(!$this->title_is_unique()){\n $errors[] = \"Title already exists in this board\";\n }\n if(is_null($this->get_column()) ){\n $errors[] = \"This column does not exist\";\n }\n return $errors;\n }",
"public static function checkErrors(): array\n {\n $data = self::validateData();\n $errors = [];\n\n if (!empty($data['errorName'])) {\n $errors['errorName'] = $data['errorName'];\n }\n if (!empty($data['errorLastName'])) {\n $errors['errorLastName'] = $data['errorLastName'];\n }\n if (!empty($data['errorEmail'])) {\n $errors['errorEmail'] = $data['errorEmail'];\n }\n if (!empty($data['errorGender'])) {\n $errors['errorGender'] = $data['errorGender'];\n }\n if (!empty($data['errorPassword'])) {\n $errors['errorPassword'] = $data['errorPassword'];\n }\n if (!empty($data['errorBirth'])) {\n $errors['errorBirth'] = $data['errorBirth'];\n }\n\n return $errors;\n }",
"public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if ($this->container['name'] === null) {\r\n $invalidProperties[] = \"'name' can't be null\";\r\n }\r\n if ((mb_strlen($this->container['name']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'name', the character length must be smaller than or equal to 64.\";\r\n }\r\n if ((mb_strlen($this->container['name']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'name', the character length must be bigger than or equal to 1.\";\r\n }\r\n if ($this->container['uri'] === null) {\r\n $invalidProperties[] = \"'uri' can't be null\";\r\n }\r\n if ($this->container['nodes'] === null) {\r\n $invalidProperties[] = \"'nodes' can't be null\";\r\n }\r\n if ($this->container['failAction'] === null) {\r\n $invalidProperties[] = \"'failAction' can't be null\";\r\n }\r\n $allowedValues = $this->getFailActionAllowableValues();\r\n if (!is_null($this->container['failAction']) && !in_array($this->container['failAction'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'failAction', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n $allowedValues = $this->getStateAllowableValues();\r\n if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'state', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n return $invalidProperties;\r\n }",
"public function rules()\n {\n return [\n 'show' => '',\n 'name' => 'required',\n 'group_id' => 'required|array',\n 'route_id' => 'nullable|array',\n 'parent_id' => 'nullable|integer',\n 'host' => 'required',\n 'port' => 'required',\n 'server_port' => 'required',\n 'tls' => 'required',\n 'tags' => 'nullable|array',\n 'rate' => 'required|numeric',\n 'network' => 'required|in:tcp,kcp,ws,http,domainsocket,quic,grpc',\n 'networkSettings' => 'nullable|array',\n 'ruleSettings' => 'nullable|array',\n 'tlsSettings' => 'nullable|array',\n 'dnsSettings' => 'nullable|array'\n ];\n }",
"function checkTree()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$types = array('integer');\n\t\t$query = 'SELECT lft,rgt FROM '.$this->table_tree.' '.\n\t\t\t'WHERE '.$this->tree_pk.' = %s ';\n\t\t\n\t\t$res = $ilDB->queryF($query,$types,array($this->tree_id));\n\t\twhile ($row = $ilDB->fetchObject($res))\n\t\t{\n\t\t\t$lft[] = $row->lft;\n\t\t\t$rgt[] = $row->rgt;\n\t\t}\n\n\t\t$all = array_merge($lft,$rgt);\n\t\t$uni = array_unique($all);\n\n\t\tif (count($all) != count($uni))\n\t\t{\n\t\t\t$message = sprintf('%s::checkTree(): Tree is corrupted!',\n\t\t\t\t\t\t\t get_class($this));\n\n\t\t\t$this->log->write($message,$this->log->FATAL);\n\t\t\t$this->ilErr->raiseError($message,$this->ilErr->WARNING);\n\t\t}\n\n\t\treturn true;\n\t}",
"public function validate(){\r\n\t\t// make validation\r\n\t\t$res = Validator::validate( $this->value, $this->constraints );\r\n\t\tif ( !$res )\r\n\t\t\t$this->has_error = true;\r\n\r\n\t\treturn $res;\r\n\t}",
"public function getWarnings(): array\n {\n return $this->warnings;\n }",
"public function getWarnings(): array\n {\n return $this->warnings;\n }",
"public function invalidTestsProvider()\n\t {\n\t\treturn array(\n\t\t\t\"testing with added mandatory attribute of one of the hierarchy nodes\" => array(\"invalid-1\"),\n\t\t\t\"one of the non-mandatory attributes is wrong\" => array(\"invalid-2\"),\n\t\t\t\"one new mandatory leaf element is added to the schema\" => array(\"invalid-3\"),\n\t\t\t\"non-mandatory attribute of the leaf node is wrong\" => array(\"invalid-4\"),\n\t\t\t\"mandatory attribute of the leaf node has wrong value\" => array(\"invalid-5\"),\n\t\t\t\"mandatory attribute of the leaf node has wrong name\" => array(\"invalid-6\"),\n\t\t );\n\t }",
"public function getViolations(): array\n {\n return $this->violations;\n }",
"public function treeLevelConditionDoesNotMatchFaultyValue() {}",
"public function treeLevelConditionDoesNotMatchFaultyValue() {}",
"function render() {\n foreach ($this->request['invalid_elements'] as $element) {\n foreach ($element->errors as $error) {\n drupal_set_message($error, 'error');\n }\n }\n\n return parent::render();\n }",
"protected function dataConsistencyCheck(Request $request) {\n\n // NOTE: These checks are used in both @store() and @update().\n\n\n //TODO: build out Module rules:\n // -> must be a menu_item\n // -> name must be unique\n // -> route ?? (it's not real so how do we deal with this? can't blank it out since it's needed to store the token; maybe just slugify the name?)\n\n\n $message = ''; // Any Warning message generated after checking here.\n\n\n //TODO: This is a conceptual design consideration. Should the consistency rules decide what \"type\" this is and set it automatically in these cases?\n // 'module' = menu_item = 1, parent_id is empty, children is not empty. (no route required - use module.page->id)\n // 'submenu' = menu_item = 1, parent_id is not empty, children is not empty. (no route required - use submenu.page->id)\n // .\n // But then rules will have to wipe out those \"fake\" routes if the tyep changes to something else.\n // .\n // If this is a module or a submenu, then route_type = '' and route (technically required) will be generated for us;\n // If this is not a route or a submenu then route is required\n\n\n // RESOURCE dropdown and HTTP Method Type checkboxes\n // If RESOURCE dropdown is set -- then all Method Type checkboxes should be checked.\n // If any Method check box is unchecked then the Page Type dropdown should not be RESOURCE.\n\n\n/* DEPRECATED\n // RULE - The the http method checkbox states and set the $request variable for each..\n ///////////////////////////////////////////////////////////////////////////////////////////\n //dd($request);\n if ($request->http_get_head) {$request->merge(['http_get_head' => 1]);} else {$request->merge(['http_get_head' => null]);}\n if ($request->http_put_patch) {$request->merge(['http_put_patch' => 1]);} else {$request->merge(['http_put_patch' => null]);}\n if ($request->http_post) {$request->merge(['http_post' => 1]);} else {$request->merge(['http_post' => null]);}\n if ($request->http_delete) {$request->merge(['http_delete' => 1]);} else {$request->merge(['http_delete' => null]);}\n\n\n //TODO: 5/19/2023 -- still not completely sure these are going to stay in here.\n // Haven't implemented anything in the permission_check yet to use them.\n\n\n // IF it's a resource route then turn them all on.\n\n // Otherwise -- check to ensure that at least one is turned on\n*/\n\n\n /*\n // 0. RULE - custom validation rule mechanism/template.\n ///////////////////////////////////////////////////////////////////////////////////////////\n $input = request()->all();\n Validator::extend('parentId', function($attribute, $value) use (&$input)\n {\n // $attribute is the field name and $value is the form entered (posted) value.\n // dd($attribute, $value, $input);\n return true;\n\n });\n */\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // 1. RULE - Auto-set; When changing an entry from a submenu or module to something else\n // then blank out the route so the validation forces it to be entered.\n // Note: This rule has to run before the Module and Submenu Aut-set rules which can overwrite it!\n if ($request->route == 'module.'.$request->id || $request->route == 'submenu.'.$request->id) {\n // looks like this used to be a module or submenu -- so wipe out the route.\n $request->merge(['route' => '']);\n }\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // 2. RULE - Auto-set; For Modules (set this before the Laravel standard validation).\n if ($request->type == 'module') {\n\n // 2a. RULE - Auto set the module route name to \"module.page_id\".\n if (empty($request->id)) {\n // if we're adding a new record then page is \"will be\" one higher than highest page id\n $q = \"SELECT id from pages ORDER BY id desc LIMIT 1\";\n $result = DB::select($q);\n $page_id = $result[0]->id + 1; // Add 1 to the highest id on file.\n } else {\n $page_id = $request->id;\n }\n // Since routes are required, making up a \"fake\" route for Modules (\"module\" + page_id).\n $request->merge(['route' => 'module'.\".\".$page_id]);\n\n\n // 2b. RULE - Modules must be at the TOP LEVEL (which means they have no parent).\n if ($request->parent_id > 0) {\n // parent_id for modules must be blank or 0.\n $request->merge(['parent_id' => 0]);\n }\n\n }\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // 3. RULE - Auto-set; For Submenus (set this before the Laravel standard validation).\n if ($request->type == 'submenu') {\n\n // Auto set the submenu route name to \"submenu.page_id\".\n if (empty($request->id)) {\n // if we're adding a new record then page is \"will be\" one higher than highest page id\n $q = \"SELECT id from pages ORDER BY id desc LIMIT 1\";\n $result = DB::select($q);\n $page_id = $result[0]->id + 1; // Add 1 to the highest id on file.\n } else {\n $page_id = $request->id;\n }\n // Since routes are required, making up a \"fake\" route for Submenus (\"submenu\" + page_id).\n $request->merge(['route' => 'submenu'.\".\".$page_id]);\n\n }\n\n\n\n\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // 4. Laravel validation rules (with custom messages):\n // Note: run any \"aut-set\" rules before this check.)\n $request->validate(\n [\n // Laravel stock validation rules\n 'name'=> 'required',\n 'route' => 'required',\n //'type' => 'parentId' // just testing, but this custom validation mechanism works.\n // See 0. RULE - custom validation above the Auto-set rules.\n ],\n\n [\n // Custom validation messages:\n 'name.required'=>'All page entries must have a <strong>Name</strong>. Please enter a <strong>Name</strong> to continue.',\n 'route.required'=>'This type of page entry must have a <strong>Route</strong>. Please enter a <strong>Route</strong> to continue.',\n //'type.parent_id'=>'All items other than <strong>Modules</strong> must have a <strong>Parent ID</strong>.',\n ]\n );\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // 5. RULE - remove Font Awesome <i> tags if they were inadvertently copied in to the field.\n // And then strip of the <i> tag and just leave the class by itself.\n // <i class=\"fa-solid fa-wheat-awn\"></i>\n // Note: this is duplicated in the ehLayout::setIcon section and maybe could be combined/simplified.\n $tmp = $request->input('icon');\n $tmp = str_replace('<i class=\"', \"\", $tmp);\n $tmp = str_replace('\"></i>', \"\", $tmp);\n $request->merge(['icon'=>$tmp]);\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // 6. RULE - Normalize the route name before saving,\n // And then replace the 'route' value directly in the $request.\n $request->merge(['route' => ehPage::cleanRouteName($request->route)]);\n\n\n ///////////////////////////////////////////////////////////////////////////////////////////\n // 7. RULE - Check to see if the specified route is defined or not.\n // BUT - do not do this check for submenus or modules since they both use a \"fake\" route.\n // And if not, then create a Warning message for the calling method to include in the flash message.\n $message = '';\n if (\n $request->type != 'module' &&\n $request->type != 'submenu'\n ) { // Note, that if this is a module or submenu, the route is fake (type.page_id).\n\n // For resource routes:\n if ($request->type == 'resource') {\n if (\n !Route::has($request->route.'.index') &&\n !Route::has($request->route.'.create') &&\n !Route::has($request->route.'.store') &&\n !Route::has($request->route.'.update') &&\n !Route::has($request->route.'.show') &&\n !Route::has($request->route.'.destroy')\n ) {\n $message = ' (<strong>Warning!</strong> No Resource routes exist for \"<strong>' . $request->route . '</strong>\".)';\n }\n // For all other, non-resource routes:\n } elseif (!Route::has($request->route)) {\n $message = ' (<strong>Warning!</strong> Route \"<strong>' . $request->route . '</strong>\" does not exist.)';\n }\n }\n return $message;\n\n }",
"public function getProblems(): array;",
"public function _getValidationErrors(): array\n\t{\n\t\t$errs = parent::_getValidationErrors();\n\t\t$validationRules = $this->_getValidationRules();\n\t\tif (null !== ($v = $this->getUrl())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_URL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getIdentifier())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getName())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_NAME] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDisplay())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DISPLAY] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getStatus())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_STATUS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getExperimental())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getPublisher())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_PUBLISHER] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContact())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDate())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DATE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDescription())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DESCRIPTION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getUseContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getRequirements())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getCopyright())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_COPYRIGHT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getCode())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getFhirVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getMapping())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getKind())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_KIND] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getConstrainedType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getAbstract())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_ABSTRACT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getContextType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getBase())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_BASE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getSnapshot())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_SNAPSHOT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDifferential())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_URL])) {\n\t\t\t$v = $this->getUrl();\n\t\t\tforeach ($validationRules[self::FIELD_URL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_URL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_URL])) {\n\t\t\t\t\t\t$errs[self::FIELD_URL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_URL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IDENTIFIER])) {\n\t\t\t$v = $this->getIdentifier();\n\t\t\tforeach ($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_IDENTIFIER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IDENTIFIER])) {\n\t\t\t\t\t\t$errs[self::FIELD_IDENTIFIER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IDENTIFIER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_VERSION])) {\n\t\t\t$v = $this->getVersion();\n\t\t\tforeach ($validationRules[self::FIELD_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_NAME])) {\n\t\t\t$v = $this->getName();\n\t\t\tforeach ($validationRules[self::FIELD_NAME] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_NAME,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_NAME])) {\n\t\t\t\t\t\t$errs[self::FIELD_NAME] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_NAME][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DISPLAY])) {\n\t\t\t$v = $this->getDisplay();\n\t\t\tforeach ($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DISPLAY,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DISPLAY])) {\n\t\t\t\t\t\t$errs[self::FIELD_DISPLAY] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DISPLAY][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_STATUS])) {\n\t\t\t$v = $this->getStatus();\n\t\t\tforeach ($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_STATUS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_STATUS])) {\n\t\t\t\t\t\t$errs[self::FIELD_STATUS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_STATUS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXPERIMENTAL])) {\n\t\t\t$v = $this->getExperimental();\n\t\t\tforeach ($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_EXPERIMENTAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXPERIMENTAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_PUBLISHER])) {\n\t\t\t$v = $this->getPublisher();\n\t\t\tforeach ($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_PUBLISHER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_PUBLISHER])) {\n\t\t\t\t\t\t$errs[self::FIELD_PUBLISHER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_PUBLISHER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTACT])) {\n\t\t\t$v = $this->getContact();\n\t\t\tforeach ($validationRules[self::FIELD_CONTACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DATE])) {\n\t\t\t$v = $this->getDate();\n\t\t\tforeach ($validationRules[self::FIELD_DATE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DATE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DATE])) {\n\t\t\t\t\t\t$errs[self::FIELD_DATE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DATE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DESCRIPTION])) {\n\t\t\t$v = $this->getDescription();\n\t\t\tforeach ($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DESCRIPTION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DESCRIPTION])) {\n\t\t\t\t\t\t$errs[self::FIELD_DESCRIPTION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DESCRIPTION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_USE_CONTEXT])) {\n\t\t\t$v = $this->getUseContext();\n\t\t\tforeach ($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_USE_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_USE_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_REQUIREMENTS])) {\n\t\t\t$v = $this->getRequirements();\n\t\t\tforeach ($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_REQUIREMENTS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_REQUIREMENTS])) {\n\t\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_COPYRIGHT])) {\n\t\t\t$v = $this->getCopyright();\n\t\t\tforeach ($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_COPYRIGHT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_COPYRIGHT])) {\n\t\t\t\t\t\t$errs[self::FIELD_COPYRIGHT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_COPYRIGHT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CODE])) {\n\t\t\t$v = $this->getCode();\n\t\t\tforeach ($validationRules[self::FIELD_CODE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CODE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CODE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CODE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CODE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_FHIR_VERSION])) {\n\t\t\t$v = $this->getFhirVersion();\n\t\t\tforeach ($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_FHIR_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_FHIR_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MAPPING])) {\n\t\t\t$v = $this->getMapping();\n\t\t\tforeach ($validationRules[self::FIELD_MAPPING] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_MAPPING,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MAPPING])) {\n\t\t\t\t\t\t$errs[self::FIELD_MAPPING] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MAPPING][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_KIND])) {\n\t\t\t$v = $this->getKind();\n\t\t\tforeach ($validationRules[self::FIELD_KIND] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_KIND,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_KIND])) {\n\t\t\t\t\t\t$errs[self::FIELD_KIND] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_KIND][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t$v = $this->getConstrainedType();\n\t\t\tforeach ($validationRules[self::FIELD_CONSTRAINED_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONSTRAINED_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ABSTRACT])) {\n\t\t\t$v = $this->getAbstract();\n\t\t\tforeach ($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_ABSTRACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ABSTRACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_ABSTRACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ABSTRACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t$v = $this->getContextType();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT])) {\n\t\t\t$v = $this->getContext();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_BASE])) {\n\t\t\t$v = $this->getBase();\n\t\t\tforeach ($validationRules[self::FIELD_BASE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_BASE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_BASE])) {\n\t\t\t\t\t\t$errs[self::FIELD_BASE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_BASE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_SNAPSHOT])) {\n\t\t\t$v = $this->getSnapshot();\n\t\t\tforeach ($validationRules[self::FIELD_SNAPSHOT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_SNAPSHOT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_SNAPSHOT])) {\n\t\t\t\t\t\t$errs[self::FIELD_SNAPSHOT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_SNAPSHOT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DIFFERENTIAL])) {\n\t\t\t$v = $this->getDifferential();\n\t\t\tforeach ($validationRules[self::FIELD_DIFFERENTIAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DIFFERENTIAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DIFFERENTIAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_TEXT])) {\n\t\t\t$v = $this->getText();\n\t\t\tforeach ($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_TEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_TEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_TEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_TEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTAINED])) {\n\t\t\t$v = $this->getContained();\n\t\t\tforeach ($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_CONTAINED,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTAINED])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTAINED] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTAINED][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXTENSION])) {\n\t\t\t$v = $this->getExtension();\n\t\t\tforeach ($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t$v = $this->getModifierExtension();\n\t\t\tforeach ($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_MODIFIER_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ID])) {\n\t\t\t$v = $this->getId();\n\t\t\tforeach ($validationRules[self::FIELD_ID] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_ID,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ID])) {\n\t\t\t\t\t\t$errs[self::FIELD_ID] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ID][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_META])) {\n\t\t\t$v = $this->getMeta();\n\t\t\tforeach ($validationRules[self::FIELD_META] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_META,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_META])) {\n\t\t\t\t\t\t$errs[self::FIELD_META] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_META][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t$v = $this->getImplicitRules();\n\t\t\tforeach ($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_IMPLICIT_RULES,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_LANGUAGE])) {\n\t\t\t$v = $this->getLanguage();\n\t\t\tforeach ($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_LANGUAGE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_LANGUAGE])) {\n\t\t\t\t\t\t$errs[self::FIELD_LANGUAGE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_LANGUAGE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $errs;\n\t}",
"public function getErrors(): array\n {\n $error = [];\n\n foreach ($this->list as $r) {\n $error[$r->getPropertyPath()] = $r->getMessage();\n }\n\n return $error;\n }",
"public function validate()\n {\n\t# checking default value\n\tif ( $this->default &&\n\t !$this->isValidValue($this->default))\n\t{\n\t $this->_addError(\"invalid datatype of default value '$this->default'\");\n\t}\n\telseif ($this->default)\n\t{\n\t $this->default= $this->retype($this->default);\n\t}\n\n\tforeach($this->errors as $key => $error)\n\t{\n\t $this->errors[$key] = str_replace('%s', $this->getModel()->getName(). '::'.$this->name, $error);\n\t}\n\treturn $this->errors;\n }",
"private function getDeprecationReason($node)\n {\n }",
"protected function checkStructure()\n {\n $structure = $this->getStructure();\n\n foreach ($structure as $field => $opt) {\n if (!array_key_exists($field, $this->data)) {\n continue;\n }\n\n $value = Arr::get($this->data, $field);\n if (is_array($value)) {\n $this->errors[$field][] = Translate::get('validate_wrong_type_data');\n continue;\n }\n\n $value = trim($value);\n $length = (int)$opt->length;\n\n if (!empty($length)) {\n $len = mb_strlen($value);\n if ($len > $length) {\n $this->errors[$field][] = Translate::getSprintf('validate_max_length', $length);\n continue;\n }\n }\n\n if (!$opt->autoIncrement && $opt->default === NULL && !$opt->allowNull && $this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_not_empty');\n continue;\n }\n\n switch ($opt->dataType) {\n case 'int':\n case 'bigint':\n if (!$this->isEmpty($value) && (filter_var($value, FILTER_VALIDATE_INT) === false)) {\n $this->errors[$field][] = Translate::get('validate_int');\n continue 2;\n }\n break;\n\n case 'double':\n if (!is_float($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_double');\n continue 2;\n }\n break;\n\n case 'float':\n if (!is_numeric($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_float');\n continue 2;\n }\n break;\n\n case 'date':\n case 'datetime':\n case 'timestamp':\n if (!$this->isEmpty($value) && !Validate::dateSql($value)) {\n $this->errors[$field][] = Translate::get('validate_sql_date');\n continue 2;\n }\n break;\n\n default:\n continue 2;\n break;\n\n }\n }\n }",
"public function validate()\n\t{\n\t\t$this->errors = [];\n\n\t\t$this->validateConfig();\n\n\t\t// there is no point to continue if config is not valid against the schema\n\t\tif($this->isValid()) {\n\t\t\t$this->validateRepetitions();\n\t\t\t$this->validateMode();\n\t\t\t$this->validateClasses();\n\t\t\t$this->validateTestData();\n\t\t}\n\t}",
"public function errors()\n {\n return $this->getRules()->getMessageBag()->all();\n }",
"public function get_errors($Light = false) {\n if ($Light) {\n foreach (self::$Errors as $Key => $Value) {\n self::$Errors[$Key][3] = '';\n }\n }\n return self::$Errors;\n }",
"public function isValidLevelThrowsExceptionOnInvalidLevelIfAskedToDoSoDataProvider() {}",
"protected function updateValidation()\n {\n return [\n 'todo_name' => ['required', 'string'],\n 'todo_description' => ['required', 'string']\n ];\n }",
"public function validateTree()\n {\n if (!$this->showTree) {\n return;\n }\n\n $this->showSorting = $this->showPagination = false;\n\n if (!$this->model->methodExists('getChildren')) {\n throw new ApplicationException(\n 'To display list as a tree, the specified model must have a method \"getChildren\"'\n );\n }\n\n if (!$this->model->methodExists('getChildCount')) {\n throw new ApplicationException(\n 'To display list as a tree, the specified model must have a method \"getChildCount\"'\n );\n }\n }",
"public static function validate() {}",
"public function getErrors()\n {\n return $this->_getChildrenByName('error');\n }",
"public function validate() {\n\n $validationErrors = [];\n\n // If we have a duplicate site key, complain.\n if (self::values(\"COUNT(*) total\", \"WHERE siteKey = ? AND siteId <> ?\", $this->siteKey, $this->siteId ? $this->siteId : \"\")[0]) {\n $validationErrors[\"siteKey\"][\"unique\"] = new FieldValidationError(\"siteKey\", \"unique\", \"The site key supplied is already in use\");\n }\n\n return $validationErrors;\n }",
"public function rules()\n {\n return [\n 'uniq_id' => 'required|uuid',\n 'badge_id' => 'required|integer',\n 'latitude' => 'required|latitude',\n 'longitude' => 'required|longitude',\n 'exceptionReason' => 'sometimes|string|nullable|max:250'\n ];\n }",
"function invalid(){\r\techo \"<node>\";\r\t\techo \"<count>invalid</count>\";\r\techo \"</node>\";\r\tdie(0);\r}",
"protected function _validate()\r\n {\r\n $errors = parent::_validate();\r\n\r\n if (\r\n $this->user->is_staff &&\r\n (\r\n ($this->user->is_admin && \\XF::visitor()->hasPermission('general', 'warn_admin')) ||\r\n ($this->user->is_moderator && \\XF::visitor()->hasPermission('general', 'warn_mod'))\r\n )\r\n )\r\n {\r\n unset($errors['is_staff']);\r\n }\r\n\r\n return $errors;\r\n }",
"public function get_errors($Light = false) {\n\t\tif ($Light) {\n\t\t\tforeach ($this->Errors as $Key => $Value) {\n\t\t\t\t$this->Errors[$Key][3] = '';\n\t\t\t}\n\t\t}\n\t\treturn $this->Errors;\n\t}",
"public function rules(): array\n {\n return [\n 'parent_id' => ['nullable', 'integer', 'exists:comments,id'],\n 'user_id' => ['required', 'integer', 'exists:users,id'],\n 'post_id' => ['required', 'integer', 'exists:posts,id'],\n 'text' => ['required', 'string']\n ];\n }",
"public function rules()\n {\n return [\n 'braintree_type' => 'required',\n 'braintree_token' => 'required',\n ];\n }",
"public function rules(): array\n {\n return [\n 'parent_id' => ['sometimes', 'nullable', 'integer', 'exists:comments,id'],\n 'user_id' => ['sometimes', 'integer', 'exists:users'],\n 'post_id' => ['sometimes', 'integer', 'exists:posts'],\n 'text' => ['sometimes', 'string']\n ];\n }",
"public function rules()\n {\n return [\n 'level_id' => 'required|numeric',\n 'difficulty' => 'required|numeric|min:1|max:3',\n 'content' => 'required|string',\n 'youtube_url' => 'string',\n 'pdf_url' => 'string',\n 'finish_type' => 'required|numeric|min:0|max:2'\n ];\n }",
"public function getValidationErrorMessages() {}",
"public function validate()\n\t{\n\t\treturn array();\n\t}",
"function quail_server_accessible_content_report_error($error, $field = NULL) {\n $node = menu_get_object();\n if($node->type == 'ac_web_page') {\n \t$highlight_path = '/webpage-accessibility/highlight/';\n }\n else {\n \t$highlight_path = '/accessibility/highlight/';\n }\n $list = '';\n if (is_array($error['problems'])) {\n $items = array();\n foreach ($error['problems'] as $label => $problem) {\n if ($label == 'pass' && $problem === FALSE) {\n $items[] = '<strong>'. t('Test failed') .'</strong>';\n }\n elseif (is_int($label)) {\n $items[] = $problem['element'];\n }\n }\n $list = theme('item_list', $items);\n }\n $field_url = ($field['field'])\n ? '/'. $field['field'] .'/'. $field['delta']\n : '';\n\n if (count($items) > 0) {\n $output = '<div class=\"ac-test ac-test-error\">';\n $output .= theme('image', \n drupal_get_path('module', 'accessible_content') .'/images/error.png',\n t('Test Failed'), t('Test Failed'));\n $output .= '<span class=\"highlight\">';\n $output .= l('Highlight Problems', \n 'node/'. $node->nid . $highlight_path . $error['node']->nid . $field_url);\n $output .= '</span><h4>'. l($error['node']->title, 'node/'. $error['node']->nid) .'</h4>';\n $output .= $list .'</div>';\n }\n elseif (variable_get('ac_error_display', 0)) {\n $output = '<div class=\"ac-test ac-test-ok\">';\n $output .= theme('image', \n drupal_get_path('module', 'accessible_content') .'/images/ok.png',\n t('Test Passed'), t('Test Passed'));\n $output .= '<span class=\"highlight\">';\n $output .= l('Highlight Problems', \n 'node/'. $node->nid .'/accessibility/highlight/'. $error['node']->nid);\n $output .= '</span> <h4>'. l($error['node']->title, 'node/'. $error['node']->nid) .'</h4></div>';\n }\n return $output;\n}",
"public function rules()\n {\n return [\n 'name' => 'required|string|max:255',\n 'path' => 'nullable|string|max:255',\n 'url_alias_id' => 'nullable|exists:url_aliases,id',\n 'target' => 'nullable|string|max:50',\n 'weight' => 'sometimes|numeric',\n 'path_type' => 'sometimes|between:1,2',\n 'data' => 'nullable|array',\n 'data.*.permissions' => 'nullable|exists:permissions,name',\n //'publish' => 'nullable|in:0,1',\n //'parent_id' => 'nullable|exists:menu_items,id',\n ];\n }",
"public static function validateGetRepairtimeNodesByGenartsV2ReturnForArrayConstraintsFromSetGetRepairtimeNodesByGenartsV2Return(array $values = array())\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $getRepairtimeNodesByGenartsV2ResponseGetRepairtimeNodesByGenartsV2ReturnItem) {\n // validation for constraint: itemType\n if (!$getRepairtimeNodesByGenartsV2ResponseGetRepairtimeNodesByGenartsV2ReturnItem instanceof \\StructType\\ExtRepairtimeNodeV2) {\n $invalidValues[] = is_object($getRepairtimeNodesByGenartsV2ResponseGetRepairtimeNodesByGenartsV2ReturnItem) ? get_class($getRepairtimeNodesByGenartsV2ResponseGetRepairtimeNodesByGenartsV2ReturnItem) : sprintf('%s(%s)', gettype($getRepairtimeNodesByGenartsV2ResponseGetRepairtimeNodesByGenartsV2ReturnItem), var_export($getRepairtimeNodesByGenartsV2ResponseGetRepairtimeNodesByGenartsV2ReturnItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('The getRepairtimeNodesByGenartsV2Return property can only contain items of type \\StructType\\ExtRepairtimeNodeV2, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));\n }\n unset($invalidValues);\n return $message;\n }",
"public function rules()\n {\n return [\n 'name' => 'bail|required|string|max:191',\n 'slug' => 'bail|required|string|max:191',\n 'description' => 'bail|nullable|string|max:255',\n 'menu_class' => 'bail|nullable|string|max:191',\n 'menu_position' => 'bail|required|numeric|min:0|max:99',\n 'parent_id' => 'bail|nullable|numeric|exists:menus,id'\n ];\n }",
"public function getErrors()\n {\n $errors = $this->getValue('klarna_validation_errors');\n return $errors ? $errors : array();\n }",
"public function errors() {\n $errors = array();\n foreach ($this->properties as $property) {\n if (!$property->rulesPassed()) {\n $errors[$property->getName()] = $property->getErrors();\n }\n }\n return $errors;\n }",
"private function solveDeps($node)\n {\n $error = false;\n if(!isset($this->resolved[$node['key']])) {\n $this->unresolved[$node['key']] = $node['key'];\n if($node['dependencies']!=null) {\n if(is_array($node['dependencies'])) {\n foreach($node['dependencies'] as $dep) {\n if(!in_array($dep, $this->resolved)) {\n if(in_array($dep, $this->unresolved)) {\n $this->error[$dep] = $dep;\n $error = true;\n } else {\n if(isset($this->scripts[$dep])) {\n $this->solveDeps($this->scripts[$dep]);\n } else {\n $this->error[$dep] = $dep;\n }\n }\n }\n }\n } else {\n if(!in_array($node['dependencies'], $this->resolved)) {\n if(in_array($node['dependencies'], $this->unresolved)) {\n $this->error[$node['dependencies']] = $node['dependencies'];\n $error = true;\n } else {\n if(isset($this->scripts[$node['dependencies']])) {\n $this->solveDeps($this->scripts[$node['dependencies']]);\n } else {\n $this->error[$node['dependencies']] = $node['dependencies'];\n }\n }\n }\n }\n }\n if(!$error) {\n $this->resolved[$node['key']] = $node['key'];\n unset($this->unresolved[$node['key']]);\n }\n }\n }",
"public function rules()\n {\n return [\n 'name' => ['required', 'min:2', 'max:10'],\n 'parent_id' => ['required', 'integer'],\n 'sort' => ['required', 'integer', 'between:0,999'],\n ];\n }",
"protected function getFlattenedValidationErrorMessage() {}",
"public function rules()\n {\n return [\n 'id' => 'bail|required|integer|min:1',\n 'name' => 'bail|required|max:20',\n 'parent_id' => 'bail|required|integer|min:0',\n 'routes' => 'bail|required|max:64',\n 'page' => 'bail|nullable|max:64',\n 'icon' => 'bail|nullable|max:16',\n 'sort' => 'bail|nullable|integer',\n 'menu' => 'bail|nullable|min:0|max:1',\n ];\n }",
"public function rules(): array\n {\n return [\n 'user_name' => ['required', 'string', 'min:4', 'max:255', 'alpha_dash'],\n 'user_email' => ['required', 'string', 'max:255', 'email'],\n 'subject' => ['required', 'string', 'max:255'],\n 'author' => ['required', 'string', 'in:' . implode(',', Message::AUTHORS)],\n 'content' => ['required', 'string', 'max:5592404'],\n 'ftp_login' => ['nullable', 'string', 'max:255', 'required_with:ftp_password'],\n 'ftp_password' => ['nullable', 'string', 'max:255', 'required_with:ftp_login']\n ];\n }",
"public function rules()\n {\n return [\n 'dir' => 'required',\n 'data' => 'required',\n 'name' => 'required',\n 'type' => 'required',\n 'offset' => 'required',\n 'eof' => 'required'\n ];\n }",
"public function getErrors();",
"public function getErrors();",
"public function getErrors();",
"public function getErrors();",
"public function vxTopicCreateCheck($options, $User) {\n\t\t$rt = array();\n\t\t\n\t\t$rt['out_of_money'] = false;\n\t\t\n\t\tswitch ($options['mode']) {\n\t\t\tcase 'board':\n\t\t\t\t$rt['mode'] = 'board';\n\t\t\t\t\n\t\t\t\t$board_id = $rt['board_id'] = $options['board_id'];\n\t\t\t\t\n\t\t\t\t$Node = new Node($rt['board_id'], $this->db);\n\t\t\t\t$Section = new Node($Node->nod_pid, $this->db);\n\t\t\t\tbreak;\n\n\t\t\tcase 'section':\n\t\t\t\t$rt['mode'] = 'section';\n\t\t\t\t\n\t\t\t\t$section_id = $rt['section_id'] = $options['section_id'];\n\t\t\t\t\n\t\t\t\t$Section = new Node($rt['section_id'], $this->db);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$rt['exp_amount'] = 0;\n\t\t$rt['errors'] = 0;\n\t\t\n\t\t$rt['tpc_title_value'] = '';\n\t\t/* tpc_title_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow\n\t\t3 => invalid characters\n\t\t999 => unspecific */\n\t\t$rt['tpc_title_error'] = 0;\n\t\t$rt['tpc_title_error_msg'] = array(1 => '你忘记写标题了', 2 => '你的这个标题太长了', 3 => '你的标题中含有不被允许的字符');\n\t\t\n\t\t$rt['tpc_pid_value'] = 0;\n\t\t$rt['tpc_pid_error'] = 0;\n\t\t$rt['tpc_pid_error_msg'] = array(1 => '请选择一个讨论区');\n\t\t\n\t\t$rt['tpc_description_value'] = '';\n\t\t/* tpc_description_error:\n\t\t0 => no error\n\t\t2 => overflow\n\t\t999 => unspecific */\n\t\t$rt['tpc_description_error'] = 0;\n\t\t$rt['tpc_description_error_msg'] = array(2 => '你的这个描述太长了');\n\t\t\n\t\t$rt['tpc_content_value'] = '';\n\t\t/* tpc_content_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow\n\t\t999 => unspecific */\n\t\t$rt['tpc_content_length'] = 0;\n\t\t$rt['tpc_content_error'] = 0;\n\t\t$rt['tpc_content_error_msg'] = array(1 => '你忘记写内容了', 2 => '你的这篇主题的内容太长了');\n\t\t\n\t\tif (isset($_POST['tpc_title'])) {\n\t\t\t$rt['tpc_title_value'] = make_single_safe($_POST['tpc_title']);\n\t\t\tif (strlen($rt['tpc_title_value']) > 0) {\n\t\t\t\tif (mb_strlen($rt['tpc_title_value'], 'utf-8') > 50) {\n\t\t\t\t\t$rt['tpc_title_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$rt['tpc_title_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['tpc_title_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\t\n\t\tif ($rt['mode'] == 'section') {\n\t\t\tif (isset($_POST['tpc_pid'])) {\n\t\t\t\t$rt['tpc_pid_value'] = intval($_POST['tpc_pid']);\n\t\t\t\t$sql = \"SELECT nod_id FROM babel_node WHERE nod_pid = {$rt['section_id']} AND nod_id = {$rt['tpc_pid_value']}\";\n\t\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\t\tif (mysql_num_rows($rs) != 1) {\n\t\t\t\t\t$rt['tpc_pid_error'] = 1;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t\tmysql_free_result($rs);\n\t\t\t} else {\n\t\t\t\t$rt['tpc_pid_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['tpc_pid_value'] = $rt['board_id'];\n\t\t}\n\t\t\n\t\t\n\t\tif (isset($_POST['tpc_description'])) {\n\t\t\t$rt['tpc_description_value'] = make_multi_safe($_POST['tpc_description']);\n\t\t\tif (strlen($rt['tpc_description_value']) > 1000) {\n\t\t\t\t$rt['tpc_description_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (isset($_POST['tpc_content'])) {\n\t\t\t$rt['tpc_content_value'] = make_multi_safe($_POST['tpc_content']);\n\t\t\t$rt['tpc_content_length'] = mb_strlen($rt['tpc_content_value'], 'UTF-8');\n\t\t\tif ($rt['tpc_content_length'] > 0) {\n\t\t\t\tif ($rt['tpc_content_length'] > 10240) {\n\t\t\t\t\t$rt['tpc_content_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$rt['tpc_content_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['tpc_content_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif ($rt['tpc_content_error'] == 0) {\n\t\t\t$tpc_content_length = mb_strlen($rt['tpc_content_value'], 'utf-8');\n\t\t\tif ($tpc_content_length > 500) {\n\t\t\t\t$rt['exp_amount'] = -(intval(($tpc_content_length / 500) * (BABEL_TPC_PRICE)));\n\t\t\t} else {\n\t\t\t\t$rt['exp_amount'] = -(BABEL_TPC_PRICE);\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['exp_amount'] = -(BABEL_TPC_PRICE);\n\t\t}\n\t\t\n\t\tif ((abs($rt['exp_amount']) * 1.2) > $User->usr_money) {\n\t\t\t$rt['errors']++;\n\t\t\t$rt['out_of_money'] = true; \n\t\t}\n\t\t\n\t\treturn $rt;\n\t}",
"function check()\n {\n return array();\n }",
"public function rules(): array\n {\n return [\n 'slug' => 'required|string',\n 'element_type' => 'required|string',\n 'language_code' => 'required|exists:languages,code',\n ];\n }",
"public function validate()\n {\n foreach ( $this->rules as $key => $rules ) {\n foreach ( $rules as $type => $rule ) {\n if ( $this->hasErrors( $key ) )\n break;\n $this->validateRule( $key, $type, $rule );\n }\n }\n }",
"public function vxUserUpdateCheck() {\n\t\t$rt = array();\n\t\t\n\t\t$rt['errors'] = 0;\n\t\t\n\t\t$rt['usr_nick_value'] = '';\n\t\t/* usr_nick_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (20 mbs)\n\t\t3 => invalid characters\n\t\t4 => conflict\n\t\t999 => unspecific */\n\t\t$rt['usr_nick_error'] = 0;\n\t\t$rt['usr_nick_error_msg'] = array(1 => '你忘记填写昵称了', 2 => '你的昵称太长了,精简一下吧', 3 => '你填写的昵称中包含了不被允许的字符', 4 => '你填写的这个昵称被别人用了');\n\n\t\t$rt['usr_full_value'] = '';\n\t\t/* usr_full_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (30 mbs)\n\t\t999 => unspecific */\n\t\t$rt['usr_full_error'] = 0;\n\t\t$rt['usr_full_error_msg'] = array(2 => '你的真实姓名长度超过了系统限制');\n\t\t\n\t\t$rt['usr_brief_value'] = '';\n\t\t/* usr_brief_error:\n\t\t0 => no error\n\t\t2 => overflow (100 mbs)\n\t\t*/\n\t\t$rt['usr_brief_error'] = 0;\n\t\t$rt['usr_brief_error_msg'] = array(2 => '你的自我简介太长了,精简一下吧');\n\t\t\n\t\t$rt['usr_gender_value'] = 9;\n\t\t\n\t\t$rt['usr_addr_value'] = '';\n\t\t/* usr_addr_error:\n\t\t0 => no error\n\t\t2 => overflow (100 mbs)\n\t\t*/\n\t\t$rt['usr_addr_error'] = 0;\n\t\t$rt['usr_addr_error_msg'] = array(2 => '你的家庭住址长度超过了系统限制');\n\t\t\n\t\t$rt['usr_telephone_value'] = '';\n\t\t/* usr_addr_error:\n\t\t0 => no error\n\t\t2 => overflow (40 mbs)\n\t\t*/\n\t\t$rt['usr_telephone_error'] = 0;\n\t\t$rt['usr_telephone_error_msg'] = array(2 => '你的电话号码长度超过了系统限制');\n\t\t\n\t\t$rt['usr_identity_value'] = '';\n\t\t/* usr_identity_error:\n\t\t0 => no error\n\t\t3 => invalid\n\t\t*/\n\t\t$rt['usr_identity_error'] = 0;\n\t\t$rt['usr_identity_error_msg'] = array(3 => '身份证号码无效');\n\t\t\n\t\t$rt['pswitch'] = 'a';\n\t\t\n\t\t$rt['usr_password_value'] = '';\n\t\t$rt['usr_confirm_value'] = '';\n\t\t/* usr_password_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters\n\t\t4 => not identical\n\t\t5 => modify empty\n\t\t999 => unspecific */\n\t\t$rt['usr_password_error'] = 0;\n\t\t$rt['usr_password_touched'] = 0;\n\t\t$rt['usr_password_error_msg'] = array(1 => '你忘记填写密码了', 2 => '你的这个密码太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配', 5 => '你修改密码时需要将新密码输入两遍');\n\t\t/* usr_confirm_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters(should not reach here in final rendering)\n\t\t4 => not identical\n\t\t5 => modify empty\n\t\t999 => unspecific */\n\t\t$rt['usr_confirm_error'] = 0;\n\t\t$rt['usr_confirm_touched'] = 0;\n\t\t$rt['usr_confirm_error_msg'] = array(1 => '你忘记填写密码确认了', 2 => '你的这个密码确认太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配', 5 => '你修改密码时需要将新密码输入两遍');\n\t\t\n\t\t/* S check: usr_width */\n\t\t\n\t\t$rt['usr_width_value'] = 0;\n\t\t$x = simplexml_load_file(BABEL_PREFIX . '/res/valid_width.xml');\n\t\t$w = $x->xpath('/array/width');\n\t\t$ws = array();\n\t\twhile(list( , $width) = each($w)) {\n\t\t\t$ws[] = strval($width);\n\t\t}\n\t\t$rt['usr_width_array'] = $ws;\n\t\tif (isset($_POST['usr_width'])) {\n\t\t\t$rt['usr_width_value'] = intval($_POST['usr_width']);\n\t\t\tif (!in_array($rt['usr_width_value'], $ws)) {\n\t\t\t\t$rt['usr_width_value'] = 800;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_width_value'] = 800;\n\t\t}\n\t\t\n\t\t/* E check: usr_width */\n\t\t\n\t\t/* S check: usr_nick */\n\t\t\n\t\tif (isset($_POST['usr_nick'])) {\n\t\t\t$rt['usr_nick_value'] = make_single_safe($_POST['usr_nick']);\n\t\t\tif (strlen($rt['usr_nick_value']) == 0) {\n\t\t\t\t$rt['usr_nick_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\tif (mb_strlen($rt['usr_nick_value'], 'UTF-8') > 20) {\n\t\t\t\t\t$rt['usr_nick_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_valid_nick($rt['usr_nick_value'])) {\n\t\t\t\t\t\t$rt['usr_nick_error'] = 3;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_nick_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif ($rt['usr_nick_error'] == 0) {\n\t\t\t$sql = \"SELECT usr_nick FROM babel_user WHERE usr_nick = '\" . $rt['usr_nick_value'] . \"' AND usr_id != \" . $this->User->usr_id;\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) > 0) {\n\t\t\t\t$rt['usr_nick_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t}\n\t\t\n\t\t/* E check: usr_nick */\n\n\t\t/* S check: usr_full */\n\t\t\n\t\tif (isset($_POST['usr_full'])) {\n\t\t\t$rt['usr_full_value'] = make_single_safe($_POST['usr_full']);\n\t\t\tif (mb_strlen($rt['usr_full_value'], 'UTF-8') > 30) {\n\t\t\t\t$rt['usr_full_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* E check: usr_full */\n\t\t\n\t\t/* S check: usr_gender */\n\t\t\n\t\tif (isset($_POST['usr_gender'])) {\n\t\t\t$rt['usr_gender_value'] = intval($_POST['usr_gender']);\n\t\t\tif (!in_array($rt['usr_gender_value'], array(0,1,2,5,6,9))) {\n\t\t\t\t$rt['usr_gender_value'] = 9;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_gender_value'] = 9;\n\t\t}\n\t\t\n\t\t/* E check: usr_gender */\n\t\t\n\t\t/* S check: usr_addr */\n\t\t\n\t\tif (isset($_POST['usr_addr'])) {\n\t\t\t$rt['usr_addr_value'] = make_single_safe($_POST['usr_addr']);\n\t\t\tif (mb_strlen($rt['usr_addr_value'], 'UTF-8') > 100) {\n\t\t\t\t$rt['usr_addr_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* E check: usr_addr */\n\t\t\n\t\t/* S check: usr_telephone */\n\t\t\n\t\tif (isset($_POST['usr_telephone'])) {\n\t\t\t$rt['usr_telephone_value'] = make_single_safe($_POST['usr_telephone']);\n\t\t\tif (mb_strlen($rt['usr_telephone_value'], 'UTF-8') > 40) {\n\t\t\t\t$rt['usr_telephone_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* E check: usr_telephone */\n\t\t\n\t\t/* S check: usr_identity */\n\t\t\n\t\tif (isset($_POST['usr_identity'])) {\n\t\t\t$rt['usr_identity_value'] = make_single_safe($_POST['usr_identity']);\n\t\t\tif (mb_strlen($rt['usr_identity_value'], 'UTF-8') > 0) {\n\t\t\t\tif (in_array(mb_strlen($rt['usr_identity_value'], 'UTF-8'), array(15, 18))) {\n\t\t\t\t\tif (!preg_match('/[a-zA-Z0-9]+/', $rt['usr_identity_value'])) {\n\t\t\t\t\t\t$rt['usr_identity_error'] = 3;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* E check: usr_identity */\n\t\t\n\t\t/* S check: usr_brief */\n\t\t\n\t\tif (isset($_POST['usr_brief'])) {\n\t\t\t$rt['usr_brief_value'] = make_single_safe($_POST['usr_brief']);\n\t\t\tif (mb_strlen($rt['usr_brief_value'], 'UTF-8') > 0) {\n\t\t\t\tif (mb_strlen($rt['usr_brief_value'], 'UTF-8') > 100) {\n\t\t\t\t\t$rt['usr_brief_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* E check: usr_brief */\n\t\t\n\t\t/* S check: usr_password and usr_confirm */\n\t\t\n\t\tif (isset($_POST['usr_password'])) {\n\t\t\t$rt['usr_password_value'] = $_POST['usr_password'];\n\t\t\tif (strlen($rt['usr_password_value']) == 0) {\n\t\t\t\t$rt['usr_password_touched'] = 0;\n\t\t\t} else {\n\t\t\t\t$rt['usr_password_touched'] = 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_password_touched'] = 0;\n\t\t}\n\t\t\n\t\tif (isset($_POST['usr_confirm'])) {\n\t\t\t$rt['usr_confirm_value'] = $_POST['usr_confirm'];\n\t\t\tif (strlen($rt['usr_confirm_value']) == 0) {\n\t\t\t\t$rt['usr_confirm_touched'] = 0;\n\t\t\t} else {\n\t\t\t\t$rt['usr_confirm_touched'] = 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_confirm_touched'] = 0;\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_touched'] == 0) && ($rt['usr_confirm_touched'] == 0)) {\n\t\t\t$rt['pswitch'] = 'a';\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_touched'] == 1) && ($rt['usr_confirm_touched'] == 1)) {\n\t\t\t$rt['pswitch'] = 'b';\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_touched'] == 1) && ($rt['usr_confirm_touched'] == 0)) {\n\t\t\t$rt['pswitch'] = 'c';\n\t\t}\n\t\t\t\n\t\tif (($rt['usr_password_touched'] == 0) && ($rt['usr_confirm_touched'] == 1)) {\n\t\t\t$rt['pswitch'] = 'd';\n\t\t}\n\t\t\n\t\tswitch ($rt['pswitch']) {\n\t\t\tdefault:\n\t\t\tcase 'a':\n\t\t\t\t/* nothing will happen */\n\t\t\t\tbreak;\n\t\t\tcase 'b':\n\t\t\t\t/* a lot check here */\n\t\t\t\tif (strlen($rt['usr_password_value']) > 32) {\n\t\t\t\t\t$rt['usr_password_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif (strlen($rt['usr_confirm_value']) > 32) {\n\t\t\t\t\t$rt['usr_confirm_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (($rt['usr_password_error'] == 0) && ($rt['usr_confirm_error'] == 0)) {\n\t\t\t\t\tif ($rt['usr_password_value'] != $rt['usr_confirm_value']) {\n\t\t\t\t\t\t$rt['usr_confirm_error'] = 4;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t$rt['usr_confirm_error'] = 5;\n\t\t\t\t$rt['errors']++;\n\t\t\t\tbreak;\n\t\t\tcase 'd':\n\t\t\t\t$rt['usr_password_error'] = 5;\n\t\t\t\t$rt['errors']++;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $rt;\n\t}",
"public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if ([] !== ($vs = $this->getDataRequirement())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_DATA_REQUIREMENT, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getEncounter())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ENCOUNTER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getEvaluationMessage())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_EVALUATION_MESSAGE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getModuleCanonical())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_CANONICAL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getModuleCodeableConcept())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getModuleUri())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_URI] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getNote())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOccurrenceDateTime())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOutputParameters())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_OUTPUT_PARAMETERS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPerformer())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PERFORMER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getReasonCode())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getReasonReference())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getRequestIdentifier())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REQUEST_IDENTIFIER] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getResult())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RESULT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSubject())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUBJECT] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_DATA_REQUIREMENT])) {\n $v = $this->getDataRequirement();\n foreach($validationRules[self::FIELD_DATA_REQUIREMENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_DATA_REQUIREMENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DATA_REQUIREMENT])) {\n $errs[self::FIELD_DATA_REQUIREMENT] = [];\n }\n $errs[self::FIELD_DATA_REQUIREMENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ENCOUNTER])) {\n $v = $this->getEncounter();\n foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_ENCOUNTER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ENCOUNTER])) {\n $errs[self::FIELD_ENCOUNTER] = [];\n }\n $errs[self::FIELD_ENCOUNTER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EVALUATION_MESSAGE])) {\n $v = $this->getEvaluationMessage();\n foreach($validationRules[self::FIELD_EVALUATION_MESSAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_EVALUATION_MESSAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EVALUATION_MESSAGE])) {\n $errs[self::FIELD_EVALUATION_MESSAGE] = [];\n }\n $errs[self::FIELD_EVALUATION_MESSAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_CANONICAL])) {\n $v = $this->getModuleCanonical();\n foreach($validationRules[self::FIELD_MODULE_CANONICAL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CANONICAL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_CANONICAL])) {\n $errs[self::FIELD_MODULE_CANONICAL] = [];\n }\n $errs[self::FIELD_MODULE_CANONICAL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT])) {\n $v = $this->getModuleCodeableConcept();\n foreach($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CODEABLE_CONCEPT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_CODEABLE_CONCEPT])) {\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = [];\n }\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_URI])) {\n $v = $this->getModuleUri();\n foreach($validationRules[self::FIELD_MODULE_URI] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_URI, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_URI])) {\n $errs[self::FIELD_MODULE_URI] = [];\n }\n $errs[self::FIELD_MODULE_URI][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_NOTE])) {\n $v = $this->getNote();\n foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_NOTE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_NOTE])) {\n $errs[self::FIELD_NOTE] = [];\n }\n $errs[self::FIELD_NOTE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) {\n $v = $this->getOccurrenceDateTime();\n foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) {\n $errs[self::FIELD_OCCURRENCE_DATE_TIME] = [];\n }\n $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OUTPUT_PARAMETERS])) {\n $v = $this->getOutputParameters();\n foreach($validationRules[self::FIELD_OUTPUT_PARAMETERS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OUTPUT_PARAMETERS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OUTPUT_PARAMETERS])) {\n $errs[self::FIELD_OUTPUT_PARAMETERS] = [];\n }\n $errs[self::FIELD_OUTPUT_PARAMETERS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PERFORMER])) {\n $v = $this->getPerformer();\n foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_PERFORMER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PERFORMER])) {\n $errs[self::FIELD_PERFORMER] = [];\n }\n $errs[self::FIELD_PERFORMER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REASON_CODE])) {\n $v = $this->getReasonCode();\n foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REASON_CODE])) {\n $errs[self::FIELD_REASON_CODE] = [];\n }\n $errs[self::FIELD_REASON_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REASON_REFERENCE])) {\n $v = $this->getReasonReference();\n foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REASON_REFERENCE])) {\n $errs[self::FIELD_REASON_REFERENCE] = [];\n }\n $errs[self::FIELD_REASON_REFERENCE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REQUEST_IDENTIFIER])) {\n $v = $this->getRequestIdentifier();\n foreach($validationRules[self::FIELD_REQUEST_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REQUEST_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REQUEST_IDENTIFIER])) {\n $errs[self::FIELD_REQUEST_IDENTIFIER] = [];\n }\n $errs[self::FIELD_REQUEST_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RESULT])) {\n $v = $this->getResult();\n foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_RESULT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RESULT])) {\n $errs[self::FIELD_RESULT] = [];\n }\n $errs[self::FIELD_RESULT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS])) {\n $v = $this->getStatus();\n foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS])) {\n $errs[self::FIELD_STATUS] = [];\n }\n $errs[self::FIELD_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUBJECT])) {\n $v = $this->getSubject();\n foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_SUBJECT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUBJECT])) {\n $errs[self::FIELD_SUBJECT] = [];\n }\n $errs[self::FIELD_SUBJECT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }",
"public function rules() : array\n {\n return [\n 'id' => 'required|string',\n 'moderation_declined_reason' => 'integer|in:' . implode(',', array_keys(CharityOrganization::availableParams('moderation_declined_reason'))),\n ];\n }",
"abstract public function GetProblems();",
"public function rules()\n {\n return [\n 'name' => 'required|string',\n 'description' => 'required|string',\n 'max_level' => 'required|integer',\n 'bonus_per_level' => 'required',\n 'effect_type' => 'required|integer',\n 'hours_per_level' => 'required|integer',\n 'parent_skill_id' => 'nullable|integer',\n 'unlocks_at_level' => 'nullable|integer',\n 'is_locked' => 'nullable',\n 'is_parent' => 'nullable',\n ];\n }",
"public function getChecks()\n {\n $result = (version_compare(phpversion(), '5.2.8', '>=')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'PHP version', $result, \"PHP version 5.2.8 or higher is needed. A latest PHP version is always recommended.\");\n\n $current = ini_get('memory_limit');\n $result = (version_compare($current, '255M', '>')) ? self::CHECK_OK : self::CHECK_WARNING;\n $this->addResult('system', 'PHP memory', $result, \"The minimum requirement for Magento itself is 256Mb. Current memory: \".$current);\n\n $result = (function_exists('json_decode')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'JSON', $result, 'The JSON-extension for PHP is needed');\n\n $result = (function_exists('curl_init')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'CURL', $result, 'The CURL-extension for PHP is needed');\n\n $result = (function_exists('simplexml_load_string')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'SimpleXML', $result, 'The SimpleXML-extension for PHP is needed');\n\n $result = (in_array('ssl', stream_get_transports())) ? self::CHECK_OK : self::CHECK_WARNING;\n $this->addResult('system', 'OpenSSL', $result, 'PHP support for OpenSSL is needed if you want to use HTTPS');\n\n $result = (function_exists('iconv')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'iconv', $result, 'The iconv-extension for PHP is needed');\n\n $result = (ini_get('safe_mode')) ? self::CHECK_ERROR : self::CHECK_OK;\n $this->addResult('system', 'Safe Mode', $result, 'PHP Safe Mode is strongly outdated and not supported by either Joomla! or Magento');\n\n $result = (ini_get('magic_quotes_gpc')) ? self::CHECK_ERROR : self::CHECK_OK;\n $this->addResult('system', 'Magic Quotes GPC', $result, 'Magic Quotes GPC is outdated and should be disabled');\n\n $remote_domain = 'api.yireo.com';\n $result = (@fsockopen($remote_domain, 80, $errno, $errmsg, 5)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Firewall', $result, 'Firewall needs to allow outgoing access on port 80.');\n\n $logfile = Mage::helper('vm2mage')->getDebugLog();\n $result = (@is_writable($logfile)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Logfile', $result, 'Logfile \"'.$logfile.'\" should be writable');\n\n $import_dir = Mage::getBaseDir('media').DS.'import';\n if(!is_dir($import_dir)) @mkdir($import_dir);\n $result = (@is_writable($import_dir)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Import folder', $result, 'Import-folder \"'.$import_dir.'\" should be writable');\n\n $catalog_dir = Mage::getBaseDir('media').DS.'catalog';\n if(!is_dir($catalog_dir)) @mkdir($catalog_dir);\n $result = (@is_writable($catalog_dir)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Catalog folder', $result, 'Catalog-folder \"'.$catalog_dir.'\" should be writable');\n\n $collection = Mage::getResourceModel('api/user_collection');\n $result = ($collection->count() > 0) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'API-user', $result, 'You should create an API-user with API resource-access');\n\n return $this->system_checks;\n }",
"public function testHasConstraintWarning()\n {\n // false\n $this->fixture = new ValidationReport(\n array( // results\n new ValidationResult(\n $this->nodeFactory->createNamedNode('http://focusNode/'),\n $this->nodeFactory->createNamedNode('http://resultPath/'),\n new Severity('sh:Warning'),\n $this->nodeFactory->createNamedNode('sh:MinMaxCountConstraintComponent'),\n $this->nodeFactory->createNamedNode('http://value')\n )\n )\n );\n\n $this->assertTrue($this->fixture->hasConstraintWarning());\n }",
"public function provideInvalidConfiguration(): array\n {\n return [\n [\n \"Cryptor names should be unique. 'foo' name is duplicated\",\n [\n 'cryptors' => [\n 'rsa' => ['foo' => []],\n 'aes' => [\n 'foo' => [\n 'key_size' => Fixtures::bits(),\n 'key_path' => $this->existentKeyFile,\n 'binary_output' => true\n ]\n ],\n ],\n ],\n ],\n [\n 'The child node \"key_size\" at path \"gtt_crypt.cryptors.aes.foo\" must be configured',\n [\n 'cryptors' => [\n 'rsa' => ['foo' => []],\n 'aes' => [\n 'foo' => []\n ],\n ],\n ],\n ],\n [\n sprintf('Installed version of defuse/php-encryption package provide only %d bits key size', Fixtures::bits()),\n [\n 'cryptors' => [\n 'rsa' => ['foo' => []],\n 'aes' => [\n 'foo' => [\n 'key_size' => 999,\n ]\n ],\n ],\n ],\n ],\n [\n 'The child node \"key_path\" at path \"gtt_crypt.cryptors.aes.foo\" must be configured',\n [\n 'cryptors' => [\n 'rsa' => ['foo' => []],\n 'aes' => [\n 'foo' => [\n 'key_size' => Fixtures::bits(),\n ]\n ],\n ],\n ],\n ],\n [\n 'The child node \"binary_output\" at path \"gtt_crypt.cryptors.aes.foo\" must be configured',\n [\n 'cryptors' => [\n 'rsa' => ['foo' => []],\n 'aes' => [\n 'foo' => [\n 'key_size' => Fixtures::bits(),\n 'key_path' => $this->existentKeyFile,\n ]\n ],\n ],\n ],\n ],\n ];\n }",
"public function getErrors(): array;",
"public function getErrors(): array;",
"public function getErrors(): array;",
"public function getViolations(): array\n {\n $messages = [];\n foreach ($this->violations as $violation) {\n $param = preg_replace('/[^0-9a-zA-Z_\\-\\s]/', '', $violation->getPropertyPath());\n $messages[] = [$param => $violation->getMessage()];\n }\n\n return $messages;\n }"
] | [
"0.56747454",
"0.52841043",
"0.51420605",
"0.50204235",
"0.50131696",
"0.49983007",
"0.49960715",
"0.49330246",
"0.49330246",
"0.49193683",
"0.4826556",
"0.4786994",
"0.4786994",
"0.47321263",
"0.47202098",
"0.4678487",
"0.46487617",
"0.462426",
"0.4620259",
"0.46194282",
"0.4613978",
"0.46135855",
"0.45965767",
"0.4589336",
"0.45844245",
"0.45798105",
"0.4551037",
"0.45489234",
"0.4539613",
"0.45380563",
"0.45374504",
"0.4520531",
"0.45077696",
"0.44995102",
"0.44903713",
"0.44880775",
"0.44880775",
"0.448749",
"0.44765025",
"0.44659257",
"0.44649804",
"0.4451967",
"0.44386065",
"0.4436684",
"0.4425315",
"0.4416908",
"0.44151393",
"0.44138893",
"0.44138244",
"0.44098887",
"0.43808067",
"0.43699056",
"0.4369639",
"0.43582812",
"0.43562952",
"0.43506074",
"0.4349596",
"0.43490013",
"0.43475768",
"0.43391085",
"0.4338073",
"0.4336348",
"0.4336299",
"0.43332395",
"0.4323486",
"0.43223095",
"0.43148023",
"0.43093538",
"0.4300531",
"0.42957884",
"0.42888024",
"0.42857936",
"0.42803678",
"0.4278058",
"0.42699653",
"0.4266788",
"0.42643526",
"0.42607486",
"0.42494866",
"0.4249157",
"0.4240301",
"0.4240301",
"0.4240301",
"0.4240301",
"0.4239076",
"0.42347312",
"0.42313337",
"0.423063",
"0.42298287",
"0.42277753",
"0.42260557",
"0.42258838",
"0.4220163",
"0.42166644",
"0.42149544",
"0.42142308",
"0.42118034",
"0.42118034",
"0.42118034",
"0.42103302"
] | 0.45355937 | 31 |
Call this method on a document if you're done using it. It's intended to remove all circular references, so PHP can easily clean it up. | public function destroy()
{
parent::destroy();
foreach ($this->parameters as $param) {
$param->destroy();
}
$this->parameters = [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __destruct() {\n unset($this->domDocument); \n }",
"public function __destruct()\n\t{\n\t\t//Remove temporal files\n\t\tif (isset($this->generated_documents['url_docx']) AND file_exists($this->generated_documents['url_docx']))\n\t\t{\n\t\t\tsystem('rm '.$this->generated_documents['url_docx']);\n\t\t}\n\t\tif (isset($this->generated_documents['url_pdf']) AND file_exists($this->generated_documents['url_pdf']))\n\t\t{\n\t\t\tsystem('rm '.$this->generated_documents['url_pdf']);\n\t\t}\n\t}",
"function cleanup()\n {\n if (is_object( $this->roottag )) {\n $this->roottag->clear_subtags();\n }\n }",
"public function unloadDocument() {\n\t\tphpQuery::unloadDocuments($this->getDocumentID());\n\t}",
"public function unloadDocument() {\n\t\tphpQuery::unloadDocuments($this->getDocumentID());\n\t}",
"public function __destruct() {\n\t\tif ( $this->documentsDb !== null )\n\t\t\t$this->oDbr->freeResult( $this->documentsDb );\n\t}",
"public function cleanup()\n\t{\n\t\t$this->getObject()->cleanup();\n\t}",
"public static function freeCache(\\SetaPDF_Core_Document $document) {}",
"public static function freeCache(\\SetaPDF_Core_Document $document) {}",
"public static function freeCache(\\SetaPDF_Core_Document $document) {}",
"public function __destroy()\n\t{\n\t\t$this->Obj_Doc->disconnectWorksheets();\n\t\tunset($this->Obj_Doc);\n\t\t$this->Obj_Doc = false;\n\t}",
"public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->collection);\n\t\t}",
"function cleanup()\n {\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezsphinx\" );\n $db->query( \"DELETE FROM ezsphinx_pathnodes\" );\n $db->commit();\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"public function destroy(Document $document)\n {\n //\n }",
"function __safeDeleteDocument() {\n\t\ttry {\n\t\t\t$this->solr->deleteById($this->__createDocId());\n\t\t\t$this->solr->commit();\n\t\t\t$this->solr->optimize();\t\n\t\t} catch (Exception $e) {\n\t\t\t$this->log($e, 'solr');\n\t\t}\n\t}",
"public function onAfterUnpublish() {\n $this->doDeleteDocumentIfInSearch();\n }",
"public function clearMemberReferrals()\n\t{\n\t\t$this->collMemberReferrals = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function clearAutotoc()\n {\n unset(self::$tocifiers[$this->owner]);\n }",
"private function cascadeRemove($document, array &$visited)\n {\n $class = $this->dm->getClassMetadata(get_class($document));\n foreach ($class->fieldMappings as $mapping) {\n if ( ! isset($mapping['embedded']) && ! $mapping['isCascadeRemove']) {\n continue;\n }\n if (isset($mapping['embedded'])) {\n $relatedDocuments = $class->reflFields[$mapping['fieldName']]->getValue($document);\n if (($relatedDocuments instanceof Collection || is_array($relatedDocuments))) {\n // If its a PersistentCollection initialization is intended! No unwrap!\n foreach ($relatedDocuments as $relatedDocument) {\n $this->cascadeRemove($relatedDocument, $visited);\n }\n } elseif ($relatedDocuments !== null) {\n $this->cascadeRemove($relatedDocuments, $visited);\n }\n } elseif (isset($mapping['reference'])) {\n $relatedDocuments = $class->reflFields[$mapping['fieldName']]->getValue($document);\n if (($relatedDocuments instanceof Collection || is_array($relatedDocuments))) {\n // If its a PersistentCollection initialization is intended! No unwrap!\n foreach ($relatedDocuments as $relatedDocument) {\n $this->doRemove($relatedDocument, $visited);\n }\n } elseif ($relatedDocuments !== null) {\n $this->doRemove($relatedDocuments, $visited);\n }\n }\n }\n }",
"public function detach($document);",
"public function __destruct()\n {\n unset($this->index);\n unset($this->objectList);\n unset($this->objectListKeys);\n }",
"public function cleanup()\n {\n }",
"public function cleanup() {\n\t\t//TODO\n\t}",
"public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->metadata);\n\t\t\tunset($this->models);\n\t\t\tunset($this->translators);\n\t\t}",
"public function clear() {\n $this->_documentBoost = FALSE;\n\n $this->_fields = array();\n $this->_fieldBoosts = array();\n }",
"public function finishDocument();",
"public function __destruct()\n {\n unset($this->binaryReaderEntity);\n }",
"protected function cleanup() {\n\t\tif(isset($this->data['attachment'])) {\n\t\t\tunlink($this->data['attachment']);\n\t\t}\n\t\tparent::cleanup();\n\t}",
"public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collBiblioAuthors) {\n foreach ($this->collBiblioAuthors as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collBiblioTopics) {\n foreach ($this->collBiblioTopics as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collItems) {\n foreach ($this->collItems as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collAuthors) {\n foreach ($this->collAuthors as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collTopics) {\n foreach ($this->collTopics as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collBiblioAuthors = null;\n $this->collBiblioTopics = null;\n $this->collItems = null;\n $this->collAuthors = null;\n $this->collTopics = null;\n $this->aPublisher = null;\n $this->aLanguage = null;\n $this->aPlace = null;\n $this->aFrequency = null;\n $this->aUser = null;\n }",
"public function __destruct() {\n //echo 'alert(\"destruct\")'; echo '</script>';\n unset($this->domDocument);\n }",
"protected function __del__() { }",
"public function DeleteReference() {\n\t\t\t$this->objReference->Delete();\n\t\t}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function processSoftReferences() {}",
"public function __destruct() {\n\t\tif ( $this->aFiles !== null )\n\t\t\tunset( $this->aFiles );\n\t}",
"public function __destruct()\n {\n if ($this->iterator) {\n librdf_free_iterator($this->iterator);\n }\n }",
"public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collMonths) {\n foreach ($this->collMonths as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collFileCats) {\n foreach ($this->collFileCats as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collDocCats) {\n foreach ($this->collDocCats as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collBookks) {\n foreach ($this->collBookks as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collAccounts) {\n foreach ($this->collAccounts as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collReports) {\n foreach ($this->collReports as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collProjects) {\n foreach ($this->collProjects as $o) {\n $o->clearAllReferences($deep);\n }\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collMonths instanceof PropelCollection) {\n $this->collMonths->clearIterator();\n }\n $this->collMonths = null;\n if ($this->collFileCats instanceof PropelCollection) {\n $this->collFileCats->clearIterator();\n }\n $this->collFileCats = null;\n if ($this->collDocCats instanceof PropelCollection) {\n $this->collDocCats->clearIterator();\n }\n $this->collDocCats = null;\n if ($this->collBookks instanceof PropelCollection) {\n $this->collBookks->clearIterator();\n }\n $this->collBookks = null;\n if ($this->collAccounts instanceof PropelCollection) {\n $this->collAccounts->clearIterator();\n }\n $this->collAccounts = null;\n if ($this->collReports instanceof PropelCollection) {\n $this->collReports->clearIterator();\n }\n $this->collReports = null;\n if ($this->collProjects instanceof PropelCollection) {\n $this->collProjects->clearIterator();\n }\n $this->collProjects = null;\n }",
"protected function tearDown()\n\t{\n\t\tJDocument::$_buffer = null;\n\t\tunset($this->object);\n\t\tparent::tearDown();\n\t}",
"public function __destruct()\r\n\t{\r\n\t\t@unlink($this->targetFile);\r\n\t\tif (strcmp($this->referenceFile, $this->outputReferenceFile) !== 0)\r\n\t\t\t@unlink($this->referenceFile);\r\n\t}",
"public function clearAuthors()\n {\n $this->collAuthors = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function cleanup()\n\t{\n\t}",
"public function cleanup()\n\t{\n\t\t\n\t}",
"function __destructor() {\n /**\n * Re-enable foreign key checks \n */\n if ($this->disableForeignKeyChecks === true) {\n mysqli_query($this->conn, 'SET foreign_key_checks = 1');\n }\n }",
"protected function doDeleteDocument() {\n try{\n $this->service->remove($this->owner);\n }\n catch(NotFoundException $e)\n {\n trigger_error(\"Deleted document not found in search index.\", E_USER_NOTICE);\n }\n\n }",
"public function onAfterDelete() {\n if (!($this->owner instanceof \\SiteTree))\n {\n $this->doDeleteDocumentIfInSearch();\n }\n }",
"public function __destruct()\n {\n if ($this->uri) {\n librdf_free_uri($this->uri);\n }\n }",
"public function __destruct() {\n $this->save(null);\n }",
"public function delete() {\n // Find document ID.\n if (!$this->find()) {\n debugging('Failed to find ousearch document');\n return false;\n }\n self::wipe_document($this->id);\n }",
"public function reset()\n {\n $this->dompdfInstance = null;\n }",
"public function unsetDocumentReference($index)\n {\n unset($this->documentReference[$index]);\n }",
"public function __destruct()\n {\n $this->clear();\n }",
"public function __destruct()\n {\n $this->clear();\n }"
] | [
"0.6715091",
"0.6527338",
"0.65180194",
"0.63943803",
"0.63943803",
"0.6382288",
"0.6350902",
"0.62970805",
"0.62970805",
"0.6295955",
"0.62802106",
"0.6266954",
"0.622233",
"0.62058187",
"0.62058187",
"0.62058187",
"0.62058187",
"0.62058187",
"0.6150407",
"0.6129441",
"0.61213934",
"0.6086688",
"0.6085512",
"0.6066397",
"0.60652703",
"0.60627437",
"0.60385525",
"0.60345113",
"0.6014953",
"0.5972065",
"0.5970212",
"0.5947522",
"0.59228194",
"0.5916339",
"0.59145606",
"0.59106034",
"0.5900736",
"0.5900736",
"0.5900736",
"0.5900736",
"0.5900736",
"0.5900736",
"0.5900736",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58985966",
"0.58963966",
"0.58963966",
"0.58963966",
"0.58963966",
"0.58963966",
"0.58963966",
"0.58726096",
"0.58700997",
"0.58624065",
"0.5862289",
"0.5832005",
"0.5826909",
"0.58262014",
"0.5808249",
"0.57796925",
"0.57699674",
"0.57673156",
"0.5766115",
"0.57613534",
"0.5750976",
"0.57484514",
"0.5740749",
"0.57373047",
"0.57359093",
"0.57359093"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
\App\Models\Surat::create([
'id' => 1,
'id_user' => 2,
'username' => 'user001',
'validator' => '',
'kode_surat' => 'BEMUIC',
'tanggal_masuk_surat' => '2021-02-07',
'nomor_surat' => 11,
'lampiran' => '1 (satu) lembar',
'perihal' => 'Peminjaman Tempat',
'nama_kegiatan' => 'seminar',
'tanggal_surat' => '2021-04-28',
'waktu' => 120,
'tempat' => 'Gedung Seminar Universitas Unggul Menang',
'tanggal_pinjam' => '2021-05-01',
'tanggal_kembali' => '2021/05/02',
'up_surat' => 'Kepala Bagian Sarana dan Prasarana
Universitas Unggul Menang Kota Bandung',
'status_surat' => 'pending',
'update_by' => '',
'notes' => '',
'created_at' => '2021-02-07 17:14:20',
'updated_at' => '2021-02-07 17:14:20'
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8014072",
"0.7980389",
"0.7977261",
"0.79545176",
"0.7951285",
"0.7949779",
"0.79447794",
"0.79427236",
"0.7938544",
"0.7937133",
"0.7933888",
"0.7892658",
"0.78813094",
"0.7879304",
"0.78790134",
"0.7875582",
"0.78718805",
"0.7870327",
"0.7851507",
"0.78506047",
"0.7841656",
"0.7834773",
"0.782799",
"0.7819246",
"0.7809116",
"0.7803176",
"0.7802559",
"0.7800953",
"0.7799208",
"0.77958846",
"0.77905864",
"0.7788729",
"0.7786444",
"0.7778857",
"0.7777666",
"0.7765372",
"0.77626014",
"0.7762562",
"0.77622634",
"0.77615577",
"0.7760895",
"0.77596897",
"0.7757152",
"0.7753893",
"0.77497184",
"0.77495176",
"0.77468747",
"0.77301675",
"0.77291715",
"0.772798",
"0.7716827",
"0.77145964",
"0.7714208",
"0.7713344",
"0.77125347",
"0.771253",
"0.7711237",
"0.77112275",
"0.77108705",
"0.7710304",
"0.7705747",
"0.77048707",
"0.770442",
"0.77041996",
"0.77028614",
"0.77021116",
"0.77008957",
"0.7698864",
"0.76987725",
"0.7697583",
"0.76966494",
"0.76945114",
"0.7692977",
"0.7691408",
"0.76907796",
"0.7688464",
"0.7687695",
"0.7686974",
"0.7686826",
"0.76851374",
"0.7684132",
"0.7679417",
"0.7678492",
"0.76778567",
"0.76769906",
"0.76728696",
"0.7671034",
"0.76692134",
"0.7668971",
"0.7668952",
"0.7666531",
"0.7662757",
"0.7662455",
"0.76616526",
"0.765996",
"0.7656754",
"0.765413",
"0.76537156",
"0.76526105",
"0.76523715",
"0.7652133"
] | 0.0 | -1 |
constructor with $db as database connection | public function __construct($db){
$this->conn = $db;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __construct($db) {\n $this->db = $db;\n }",
"function __construct($db) {\r\n\t\t$this->db = $db;\r\n\t}",
"public function __construct($db) {\r\n\r\n $this->conn = $db;\r\n\r\n }",
"public function __construct($db) {\n $this->conn = $db;\n }",
"public function __construct($db) {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db) {\r\n $this->conn = $db;\r\n }",
"public function __construct($db)\r\n {\r\n $this->conn = $db;\r\n }",
"public function __construct($db) \n\t{\n\t\t$this->db = $db->getConn(); \n\t}",
"public function __construct($db) {\n $this->db = $db;\n }",
"public function __construct($db)\r\n {\r\n $this->conn = $db;\r\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db) {\n $this->_db = $db;\n }",
"public function __construct(&$db) {\n $this->db = $db;\n }",
"public function __construct(&$db) {\n $this->db = $db;\n }",
"public function __construct(&$db) {\n $this->db = $db;\n }",
"public function __construct($db) {\n\t\t\t$this->conn = $db;\n\t\t}",
"public function __construct($db) {\n $this->conn = $db;\n }",
"public function __construct($db) {\n $this->conn = $db;\n }",
"public function __construct($db) {\n $this->conn = $db;\n }",
"public function __construct($db) {\n $this->conn = $db;\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct($db)\n\t{\n\t\t$this->conn = $db;\n\t}",
"public function __construct($db) {\n\t\t$this->db = $db;\n\t}",
"public function __construct($db) {\n $this->_db = $db;\n }",
"public function __construct($db) {\n $this->_db = $db;\n }",
"public function __construct($db)\n {\n $this->db = $db;\n }",
"public function __construct($db)\n {\n $this->db = $db;\n }",
"public function __construct($db)\n {\n $this->db = $db;\n }",
"public function __construct($db)\r\n {\r\n $this->conn = $db;\r\n }",
"public function __construct($db)\n {\n $this->conn = $db;\n }",
"public function __construct(&$db)\r\n {\r\n $this->_db = $db;\r\n }",
"public function __construct($db){\r\n $this->db = $db;\r\n }",
"public function __construct($db=null)\n {\n $this->db = $db;\n }",
"public function __construct($db){\n\t\t$this->conn = $db;\n\t}",
"public function __construct($db){\n\t\t$this->conn = $db;\n\t}",
"public function __construct($db){\n\t\t$this->conn = $db;\n\t}",
"public function __construct($db){\n\t\t$this->conn = $db;\n\t}",
"function __construct($db) {\n\t\t\n\t\t// set db object to given db object\n\t\t$this->db = $db;\n\t\t\n\t}",
"public function __construct($db){\n $this->conn = $db;\n }",
"public function __construct($db){\n\t\t\t$this->conn = $db;\n\t\t}",
"public function __construct($db){\n\t\t\t$this->conn = $db;\n\t\t}",
"public function __construct($db){\n $this->conn = $db;\n \n }",
"public function __construct($db){\n $this->conn = $db;\n \t}",
"public function __construct($db){\n $this->conn = $db;\n \t}",
"public function __construct($db){\r\n \t$this->conn = $db;\r\n }",
"public function __construct($db) {\n\t\t\t$this->myDB = $db;\n\t\t}"
] | [
"0.887094",
"0.8836854",
"0.8794315",
"0.8782656",
"0.8782656",
"0.87762517",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8769251",
"0.8766189",
"0.87605137",
"0.87567043",
"0.87561655",
"0.87505203",
"0.87446517",
"0.87446517",
"0.87446517",
"0.87418157",
"0.87323743",
"0.87323743",
"0.87323743",
"0.87268746",
"0.8717069",
"0.8717069",
"0.8717069",
"0.8711909",
"0.87075186",
"0.8702426",
"0.87023294",
"0.8700695",
"0.8700695",
"0.86997926",
"0.8695736",
"0.8695736",
"0.8693924",
"0.86638135",
"0.8661487",
"0.86138576",
"0.86036575",
"0.8598794",
"0.8598794",
"0.8598794",
"0.8598794",
"0.85930413",
"0.8577493",
"0.8576936",
"0.8576936",
"0.8568375",
"0.8566628",
"0.8566628",
"0.8555083",
"0.8549572"
] | 0.0 | -1 |
used when signing in | function readOne(){
// query to read single record
$query = "SELECT * from companies where username='$this->username' AND password = '$this->password'";
// prepare query statement
$stmt = $this->conn->prepare( $query );
// execute query
$stmt->execute();
// get retrieved row
$row = $stmt->fetch(PDO::FETCH_ASSOC);
// set values to object properties
$this->cid = $row['cid'];
$this->name = $row['name'];
$this->email = $row['email'];
$this->latitude = $row['latitude'];
$this->longitude = $row['longitude'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function signIn() {\n\t\t\n\t\t$newVoucher = VoucherProvider::getVoucher();\n\t}",
"private function login(){\n \n }",
"private function _signInRequested()\n {\n if ($this->model->signIn($_POST['username'], $_POST['password'])) {\n $this->utility->redirect('write');\n } else {\n $this->view->display($this->model);\n }\n }",
"public function api_entry_signin() {\n //parent::returnWithErr(\"Opps. ipray service is expired... sorry.\");\n parent::validateParams(array('email', 'password'));\n\n $users = $this->Mdl_Users->getAll(\"email\", $_POST[\"email\"]);\n\n if (count($users) == 0) parent::returnWithErr(\"User not found.\");\n\n $user = $users[0];\n\n if (!$user->verified) parent::returnWithErr(\"This account is not verified yet.\");\n if ($user->suspended) parent::returnWithErr(\"This account is under suspension.\");\n if ($user->password != md5($_POST[\"password\"])) parent::returnWithErr(\"Invalid password.\");\n\n parent::returnWithoutErr(\"Signin succeed.\", $user);\n }",
"public function saveSignIn()\n {\n $this->has_signed_in_once = true;\n $this->last_signin = date('Y-m-d H:i:s');\n $this->save();\n }",
"public function auth_user()\n {\n //echo $this->id;\n //echo $this->username. ' is authenticated';\n }",
"public function authentication()\n {\n }",
"abstract protected function auth();",
"public function checkSignedIn() {\n\t if (!empty($this->user) && $this->user !== 'anon.') {\n\t $this->addAlias($this->getIdentifier(), $this->user);\n\t }\n\t}",
"function sign_in() {\n load_similar_content('sign_in');\n $this -> data['content'] = $this -> load -> view('front/sections/section_sign_in', $this -> data, TRUE);\n\n $this -> load -> view('front/default', $this -> data);\n }",
"function authGet() { }",
"private function check_login(){\n if (isset($_SESSION['email'])){\n $this->email=$_SESSION['email'];\n\t\t\t$this->role=$_SESSION['role'];\n\t\t\t$this->id=$_SESSION['id'];\n $this->signed_in=true;\n }\n else{\n unset($this->email);\n $this->signed_in=false;\n }\n }",
"protected function loginIfRequested() {}",
"public function use_authentication()\n {\n }",
"public function login();",
"public function login();",
"function signIn(){\n\t\t\tglobal $db;\n\t\t\tglobal $json;\n\n\t\t\tinclude_once(\"security.php\");\n\t\t\t\n\t\t\tif($this->username == \"\" || $this->password == null){\n\t\t\t\t$json->invalidRequest();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$userInfo = $db->prepare('SELECT * FROM user WHERE Username = :username');\n\t\t\t\t$userInfo->bindParam(':username', $this->username);\n\t\t\t\t$userInfo->execute();\n\t\t\t\t\n\t\t\t\t//Check if user exists\n\t\t\t\tif($userInfo->rowCount() == 0){\n\t\t\t\t\t$json->notFound(\"User\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t//If exists, pull Password hash and verify against inserted password\n\t\t\t\t\tforeach($userInfo as $row) {\n\t\t\t\t\t\tif($row['Password'] === crypt($this->password, $row['Password'])){\n\t\t\t\t\t\t\t//correct username & password combination\n\t\t\t\t\t\t\techo '{ \"User\" : { \"Id\" : '.$row['Id'].', \"Username\" : \"'.$row['Username'].'\", \"Subject\" : '.$row['Subject'].', \"Admin\" : '.$row['Admin'].', \"ApiKey\" : \"'.$row['ApiKey'].'\" } }';\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$json->unauthorizedInvalidPassword();\n\t\t\t\t\t\t\treturn;\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}",
"protected function loginAuthenticate(){\n\n\t\t\n\t}",
"public function signIn()\n {\n // Only sign in once\n if( true === $this->isSignedIn() ) {\n return;\n }\n\n // Submit the sign-in web form\n $signInPage = new Atc_Mail_Transport_OutlookWeb_Browser_WebPage_SignIn( $this );\n $signInPage->postSignInForm();\n\n // We are now signed into Outlook\n $this->_setIsSignedInFlag( true );\n }",
"public function signIn(){\n\t\t$this->view->render($this,'signIn');\n\t}",
"private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }",
"private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }",
"private function compare_with_login()\n {\n }",
"public function login()\n {\n }",
"public function login()\n {\n }",
"function SubmitLoginDetails()\n\t{\n\t\t// Login logic is handled by Application::CheckAuth method\n\t\tAuthenticatedUser()->CheckAuth();\n\t}",
"public function UserIsSignedInOrRecirectToSignIn() {\n\t\t\n\t\tif(!isset($_SESSION['accountUser'])) { \n\t\t\trequire(TP_PAGESPATH . '/pages_login/PLogin.php');\n\t\t}\n\t}",
"public function onLogin()\n {\n return true;\n }",
"public function onLogin()\n {\n return true;\n }",
"public function login(){\n\n }",
"public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\n\t\t}\n\t}",
"function auth(){\n\t\t//TODO auth implementieren\n\t\treturn true;\n\t}",
"public function sign_in()\n\t{\n\t\t$post = $this->input->post();\n\t\t// debug($post, 1);\n\t\t$is_ok = $this->accounts->login($post);\n\t\t// debug($is_ok, 1);\n\t\tredirect(base_url());\n\t\t// if ($is_ok) {\n\t\t// \t/*direct to the home when login success*/\n\t\t// \tredirect(base_url());\n\t\t// } else {\n\t\t// \t$this->load->view('welcome_message');\n\t\t// }\n\t}",
"function external_auth()\n\t{\n\t\t//Check for get(google auth) as most of the logins should be that only\n\t\t//If not, check for post(fb and normal)\n\n\t\t$user_info = $this->_process_user_info();\n\t\t//var_dump($this->input->get('code'));\n\t\t\t\n\t\t$email = $user_info['email'];//trim($this->input->post('email'));\n\t\t$username = $user_info['username']; //trim($this->input->post('username'));\n\t\t\n\t\tif($this->users->is_email_available($email))\n\t\t{\n\t\t\t//First time fb_Login, create new user\n\t\t\t$this->_external_register($email, $username);\n\t\t}\n\n\t\t//get the user by email\n\t\t$user = $this->users->get_user_by_email($email);\n\n\t\t//Sign-in\n\t\t$this->_external_login($user->id, $user->username);\n\t}",
"public function getAuth();",
"public function getAuth();",
"public function authHospital(){\n\n\t}",
"protected function getBackendUserAuthentication() {}",
"protected function getBackendUserAuthentication() {}",
"protected function getBackendUserAuthentication() {}",
"function login() { }",
"protected function getBackendUserAuthentication() {}",
"protected function getBackendUserAuthentication() {}",
"function auth();",
"public function signin() {\n\n /* if (auth()->attempt(request(['email', 'password'])) == false) {\n \n }\n return redirect()->to('/account'); */\n\n $data = $this->validate(request(), [\n 'email' => 'required|string|email|max:255',\n 'password' => 'required|string',\n ]);\n\n if (Auth::attempt(['email' => $data['email'], 'password' => $data['password']])) {\n // Authentication passed...\n return redirect()->to('/account');\n } else {\n return back()->withErrors([\n 'message' => 'The email or password is incorrect, please try again'\n ]);\n }\n }",
"public function is_logged_in() {\n\n\t}",
"protected function facebookAuthenticate(){\n\n\t\t\n\t}",
"public function postSignIn()\n\t{\n\t\treturn $this->users->postSignIn(Input::all());\n\t}",
"public function signin()\n\t{\n $user = new User();\n\n // If user can succesfully signin then signin\n if ($user->signin(Database::connection(), $_POST['username'], $_POST['password']))\n {\n $_SESSION['id'] = $user->id;\n return True;\n }\n\n return False;\n\t}",
"public function rememberMe()\n\t{\n\t\t// TODO\n\t}",
"public function sign_in() {\n\t\t$login_to_cp = 1;\n\t\t$account_type = $this->translator->getParamVal('account_type', '_POST', ACCOUNT_TYPE_CUSTOMER);\n\t\tunset($_SESSION['account'], $_SESSION['person'], $_SESSION['is_authorized']);\n\t\t$result = call( 'auth_person',\n\t\t\t\t\t\tarray ( 'email'\t\t\t=> $this->translator->getParamVal('email', '_POST'),\n\t\t\t\t\t\t\t\t'password'\t\t=> $_POST['password'],\t## password may contain escapeable symbols\n\t\t\t\t\t\t\t\t'ip'\t\t\t=> $this->translator->getClientIp(),\n\t\t\t\t\t\t\t\t'sid'\t\t\t=> $this->translator->getParamVal('sid', '_POST'),\n\t\t\t\t\t\t\t\t'login_to_cp'\t=> $login_to_cp), 'HSPC/API/Person');\n\t\t$transport = get_api_transport();\n\t\tif($transport->fault) {\n\t\t\t$this->handle_signin_error($transport);\n\t\t} else if(is_array($result)) {\n\t\t\t$_SESSION['person'] = $result['person'];\n\n\t\t\tif($login_to_cp && $result['sid']) {\n\t\t\t\t$_SESSION['sid'] = $result['sid'];\n\t\t\t}\n\n\t\t\tif(is_array($_SESSION['person']['account_list'])) {\n\t\t\t\tforeach($_SESSION['person']['account_list'] AS $key => $value) {\n\t\t\t\t\tif(preg_match('/'.$value['type'].'/', $account_type)) {\n\t\t\t\t\t\t$_SESSION['account'] = $value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(isset($_SESSION['account']) && $_SESSION['account']) {\n\t\t\t$_SESSION['is_authorized'] = true;\n\t\t\t$_SESSION['credentials']['account_password'] = $_POST['password'];\n\t\t\tif(!isset($_SESSION['credentials']['password']) || !$_SESSION['credentials']['password']) {\n\t\t\t\t$_SESSION['credentials']['password'] = $_POST['password'];\n\t\t\t\t$_SESSION['credentials']['password_source'] = 'use_account';\n\t\t\t}\n\t\t\tget_domain_list();\n\t\t\tload_domain_contacts();\n\t\t\t$this->error->add(MC_SUCCESS, 'YOU_BEEN_LOGGED_IN');\n\t\t\treturn true;\n\t\t} else {\n\t\t\tunset($_SESSION['person']);\n\t\t\tif(!$this->error->has(MC_ERROR)) {\n\t\t\t\t$this->error->add(MC_ERROR, 'LOGIN_INVALID');\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"protected function sign(&$data)\n {\n $data['affiliateUserName'] = $this->username;\n $data['affiliatePassword'] = $this->password;\n }",
"public function setAuthenticated();",
"public function signin($userID)\n {\n $this->CI->session->signin = true;\n $this->CI->session->userID = (int) $userID;\n }",
"public function auth(){\n if(empty($_COOKIE[\"utoken\"])){\n $cookie_value = $this->uuid();\n $this->utoken = $cookie_value;\n $this->setHeader($this->utoken);\n }else{\n $this->utoken = $_COOKIE[\"utoken\"];\n $this->setHeader($this->utoken);\n }\n }",
"public function loggedIn()\n {\n $user = new User([\n 'first_name' => 'Janez',\n 'last_name' => 'Novak',\n 'birth_date' => Carbon::create(2000, 1, 1, 0, 0, 0),\n 'gender' => Code::MALE()->id,\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'phone_number' => '123456789',\n 'post' => Postcode::wherePostcode(1000)->first()->id,\n 'address' => 'Dunajska',\n 'zz_card_number' => str_random(30),\n ]);\n $user->confirmEmail();\n $user->save();\n\n Auth::attempt([\n 'email' => $user->email,\n 'password' => 'password',\n ]);\n }",
"public function doAuthentication();",
"public function checkAuth();",
"public function checkAuth();",
"function login() {\n \t$this->set('indata',$this->data);\n\t\tif(empty($this->data)){\n\t\t\t$this->pageTitle = 'Log in';\n\t\t\t$cookie = $this->Cookie->read('Auth.User');\n\t\t}\n }",
"function login_init() {\n\n\t\t\t$current_user_id = get_current_user_id();\n\n\t\t\tif ( $current_user_id ) {\n\n\t\t\t\t$is_merge = false;\n\t\t\t\tif ( isset( $_REQUEST[\"isMerge\"] ) && $current_user_id !== null ) {\n\t\t\t\t\tif ( $_REQUEST[\"isMerge\"] === 1 || $_REQUEST[\"isMerge\"] === '1' ) {\n\t\t\t\t\t\t$is_merge = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$linkid_user_id = get_user_meta( $current_user_id, self::WP_USER_META_VALUE_LINKID_USER_ID, true );\n\n\t\t\t\tif ( $is_merge && trim( $linkid_user_id ) ) {\n\n\t\t\t\t\t// generate the response\n\t\t\t\t\t$response = json_encode( Link_WP_LinkID_PollResult::createFromError(\n\t\t\t\t\t\t__( \"Unable to start merging. Logged in user already linked to linkID account\", \"link-linkid\" ),\n\t\t\t\t\t\tfalse ) );\n\n\t\t\t\t\t// response output\n\t\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\t\techo $response;\n\n\t\t\t\t\tdie();\n\n\t\t\t\t} else if ( ! $is_merge && trim( $linkid_user_id ) ) {\n\n\t\t\t\t\t// generate the response\n\t\t\t\t\t$response = json_encode( Link_WP_LinkID_PollResult::createFromError(\n\t\t\t\t\t\t__( \"Unable to start login. User already logged in. Please wait while you are being redirected.\", \"link-linkid\" ),\n\t\t\t\t\t\tfalse, false, true, $this->get_redirect_url( wp_get_current_user() ) ) );\n\n\t\t\t\t\t// response output\n\t\t\t\t\theader( \"Content-Type: application/json\" );\n\t\t\t\t\techo $response;\n\n\t\t\t\t\tdie();\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$linkIDAuthnSession = Link_WP_LinkID::start_authn_request();\n\n\t\t\t// generate the response\n\t\t\t$response = json_encode( Link_WP_LinkID_PollResult::createFromAuthnSession( $linkIDAuthnSession ) );\n\n\t\t\t// response output\n\t\t\theader( \"Content-Type: application/json\" );\n\t\t\techo $response;\n\n\t\t\tdie();\n\t\t}",
"function authenticate() {}",
"function user_loggedin(){\n\t$app = \\Jolt\\Jolt::getInstance();\n\tif( !$app->store('user') ){\n\t\treturn false;\n\t}\n\treturn true;\n//\t$app->redirect( $app->getBaseUri().'/login',!$app->store('user') );\n}",
"function user_logged_in($user_id) {\n \n }",
"function LoggedIn() {\n\t\treturn $this->Get('UserDetails');\n\t}",
"public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }",
"public function signIn(){\n \t// check if user has accepted cookies\n \tif(isset($_COOKIE['isUsingCookies']) && $_COOKIE['isUsingCookies'] == true && isset($_POST['remember_me'])){\n \t\tunset($_POST['remember_me']);\n \t\tsetcookie('remember_me', true, time()+60*60*24*365);\n \t}\n\n \t// encode the request content in json\n\t\tjson_encode($_POST);\n\n\t\t// request the user from the API that possesses the entered email\n\t\t// prepares the resquest\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/user/email/\" . $_POST['email']);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t// send the request\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\n\n\t\tif($output != '[]'){\n\t\t\t$output = json_decode($output, true)[0];\n\t\t\tvar_dump($output);\n\n\t\t\t// if the password is correct, connect the user\n\t\t\tif($output['password'] == hash('sha256', $_POST['password'])){\n\t\t\t\tsession_start();\n\t\t\t\t$_SESSION['first_name'] = $output['first_name'];\n\t\t\t\t$_SESSION['last_name'] = $output['last_name'];\n\t\t\t\t$_SESSION['email'] = $output['email'];\n\t\t\t\t$_SESSION['id_user'] = $output['id_user'];\n\t\t\t\t$_SESSION['campus_name'] = $output['campus_name'];\n\t\t\t\t$_SESSION['status'] = $output['status'];\n\n\t\t\t\t// if the user has accepted cookies, registers the users data into cookies\n\t\t\t\tif(isset($_COOKIE['isUsingCookies']) && $_COOKIE['isUsingCookies'] == true){\n\t\t\t\t\tsetcookie('first_name', $_SESSION['first_name'], time()+60*60*24*365);\n\t\t\t\t\tsetcookie('last_name', $_SESSION['last_name'], time()+60*60*24*365);\n\t\t\t\t\tsetcookie('email', $_SESSION['email'], time()+60*60*24*365);\n\t\t\t\t\tsetcookie('id_user', $_SESSION['id_user'], time()+60*60*24*365);\n\t\t\t\t\tsetcookie('campus_name', $_SESSION['campus_name'], time()+60*60*24*365);\n\t\t\t\t\tsetcookie('status', $_SESSION['status'], time()+60*60*24*365);\n\t\t\t\t}\n\t\t\t\t// if the user is not in the database, returns an error\n\t\t\t}else{\n\t\t\t\treturn redirect()->route('signIn', 'notRegistered');\n\t\t\t}\n\n\t\t\t// open the home view\n\t\t\treturn redirect('/');\n\t\t}\n\n\t\t// if the user is not in the database, returns an error\n\t\treturn redirect()->route('signIn', 'notRegistered');\n\t}",
"function checkSignedIn() {\n\tglobal $muse; // App settings & database\n\t// Only let logged in people come through\n\tif( !$_SESSION['signedIn'] ) {\n\t\taddNarrativeToXML(\"You have been signed out. Please <a href=\\\"signin.php\\\">sign in</a> to continue.\");\n\t\techo $muse['xml']->saveXML();\n\t\texit();\n\t}\n}",
"public function _check_login()\n {\n\n }",
"public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }",
"public static function AuthID()\r\n {\r\n if (!isset($_SESSION[\"ed\"])) {\r\n (new CodeFlirt\\Handlers)->trackUser();\r\n echo '<meta http-equiv=\"refresh\" content=\"0; url=' . (new CodeFlirt\\Handlers)->path(\"login\") . '\">';\r\n return false;\r\n }\r\n if (isset($_SESSION[\"ed\"]) && !empty($_SESSION[\"ed\"])) {\r\n //Import from Encryption\r\n $Encryption = new Encryption();\r\n\r\n $user_public_key = $_SESSION[\"ed\"];\r\n\r\n //Here _Profilepage_ is a decryption key\r\n $user_email_address = md5($Encryption->decrypt($user_public_key, \"_ProfilePage_\"));\r\n\r\n $user_private_key = (new CodeFlirt\\Fetch)->data('users', 'user_private_key', \"user_email_address='$user_email_address'\");\r\n\r\n if ($user_private_key == false) {\r\n echo '<meta http-equiv=\"refresh\" content=\"0; url=' . (new CodeFlirt\\Handlers)->path(\"login\") . '\">';\r\n return;\r\n } else {\r\n return $user_private_key;\r\n }\r\n } else {\r\n echo '<meta http-equiv=\"refresh\" content=\"0; url=' . (new CodeFlirt\\Handlers)->path(\"login\") . '\">';\r\n return;\r\n }\r\n }",
"public function authenticate() {}",
"public function isSigned(){\n\t\tif(isset($_POST['signed'])) { // comes from login form\n\t\t\t$attributes = array('email'=>$_POST['email'],'password'=>md5($_POST['password']));\n\t\t\t// parent::checkFields($attributes);\n\t\t\t$this->user->setAttributes($attributes);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function login(){\n echo $this->name . ' logged in';\n }",
"public function authenticate();",
"public function authenticate();",
"public function authenticate();",
"public function login(){\n\n }",
"public function get_auth_string()\n {\n }",
"function logginRequired(){\n\n}",
"public function auth()\n {\n\n if (Auth::attempt(['email' => $this->request->header('email'), 'password' => $this->request->header('password')])) {\n $this->user = Auth::user();\n\n } else {\n echo json_encode(['error' => 'Unauthorised']);\n die();\n }\n }",
"public function logInRegisterPage();",
"public function auth()\n {\n $email = $this->loginEntry->input('email');\n $password = $this->commonFunction->generateHash($this->loginEntry->input('pass'));\n \n $info = $this->userDetail->getDetail($email, $password);\n if (count($info) == 1) \n {\n $this->commonFunction->setSession($info->id, $info->user_name);\n return redirect('/dashboard'); \n } \n echo '<script language=\"javascript\">';\n echo 'alert(\"Username/Password does not match.\")';\n echo '</script>';\n return redirect('/login');\n }",
"public function SignIn()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new MemberIdentity($this->memberName,$this->memberPasswd);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===MemberIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*7 : 0; // 7 days\n\t\t\tYii::app()->user->SignIn($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }",
"public function is_signed_in(){\n \n return $this->signed_in; \n }",
"private function isSingIn()\n\t{\n\t\tif ($this->session->isLoggon && $this->session->isAdmin) {\n\t\t\treturn true;\n\t\t}\n\t\tredirect('service/sign-out', 'refresh');\n\t}",
"function loggedIn() {\n\t\t\treturn $this->logged_in();\n\t\t}",
"function logged_in() {\n\treturn current_user()->logged_in();\n}",
"public function __construct()\n {\n parent::__construct();\n $this->isSignin();\n }",
"public function processLogin(): void;",
"public function getName(){\n return \"signin\";\n }",
"public function monitorSigninForm() {\n\t\t$this->monitorView->displayLoginForm();\n\t}",
"protected function loggedIn() {\n \treturn User::loggedIn();\n }",
"public function onSignin()\n {\n try {\n /*\n * Validate input\n */\n $data = post();\n $rules = [];\n\n $rules['login'] = 'required|email|between:6,255';\n\n $rules['password'] = 'required|between:6,255';\n\n if (!array_key_exists('login', $data)) {\n $data['login'] = post('username', post('email'));\n }\n\n $validation = Validator::make($data, $rules);\n if ($validation->fails()) {\n throw new ValidationException($validation);\n }\n\n /*\n * Authenticate user\n */\n $credentials = [\n 'login' => array_get($data, 'login'),\n 'password' => array_get($data, 'password')\n ];\n\n Event::fire('rainlab.user.beforeAuthenticate', [$this, $credentials]);\n\n $user = Auth::authenticate($credentials, true);\n if ($user->isBanned()) {\n Auth::logout();\n throw new AuthException(/*Sorry, this user is currently not activated. Please contact us for further assistance.*/'rainlab.user::lang.account.banned');\n }\n\n /*\n * Redirect\n */\n if ($redirect = $this->makeRedirection(true)) {\n return $redirect;\n }\n }\n catch (Exception $ex) {\n if (Request::ajax()) throw $ex;\n else Flash::error($ex->getMessage());\n }\n }",
"public function authentication(): void\n {\n $userData = $this->getValidated([\n 'name',\n 'password',\n ]);\n\n $user = $this->getUserByName($userData['name']);\n\n if (password_verify($userData['password'], $user->password)) {\n NotificationService::sendInfo('Hello! You are logged in as ' . $user->name);\n $_SESSION['name'] = $user->name;\n $this->redirect(APP_URL);\n }\n\n NotificationService::sendError('failed authentication!');\n $_SESSION['login_modal_show'] = ' show';\n $this->redirect(APP_URL);\n }",
"public function login()\n {\n $customerData = Mage::getSingleton('customer/session')->getCustomer();\n $defaultprofile = Mage::getModel('beautyprofiler/beutyprofiler')->getCollection()->addFieldToSelect('profile_id')->addFieldToFilter('is_default', array('is_default'=>1))->addFieldToFilter('customer_entity_id', array('customer_entity_id'=>$customerData->getId()))->load();\n $profile_id = $defaultprofile->getData()[0]['profile_id'];\n // $profile_id = 300;\n Mage::getSingleton('customer/session')->setBeautyProfileId($profile_id);\n /*Check if current login customer have default profile or not*/\n $getprofile = Mage::getModel('beautyprofiler/beutyprofiler')->getCollection()->addFieldToSelect('profile_id')->addFieldToFilter('customer_entity_id', array('customer_entity_id'=>$customerData->getId()))->load();\n if(count($getprofile->getData()) == 0)\n {\n Mage::getSingleton('customer/session')->setNoprofile('yes');\n }\n Mage::getSingleton('customer/session')->setIncompleteprofile('yes');\n Mage::getSingleton('customer/session')->setRegisterprofile('yes');\n }",
"private function isLoggedin()\n\t{\n\t\t$this->idletime = 18000;\n\n\t\tif ((time()-$_SESSION['timestamp'])>$this->idletime)\n\t\t{\n\t\t\t$message = \"You are signed out from the previous session ! Please try sign in again!\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telseif($this->logged_in() == false)\n\t\t{\n\t\t\t$message = \"Invalid session !! Please try sign in again.\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\t}",
"function loginBegin()\r\n\t{\r\n\t\t// if we have extra perm\r\n\t\tif( isset( $this->config[\"scope\"] ) && ! empty( $this->config[\"scope\"] ) )\r\n\t\t{\r\n\t\t\t$this->scope = $this->scope . \", \". $this->config[\"scope\"];\r\n\t\t}\r\n\r\n\t\t// get the login url \r\n\t\t$url = $this->api->getLoginUrl( array( 'scope' => $this->scope, 'redirect_uri' => $this->endpoint ) );\r\n\r\n\t\t// redirect to facebook\r\n\t\tHybrid_Auth::redirect( $url ); \r\n\t}",
"function loggedin() {return $this->login_state!=0;}",
"public function getLogin();"
] | [
"0.7127255",
"0.70592296",
"0.68540746",
"0.6777229",
"0.67323905",
"0.6672759",
"0.66717154",
"0.6583958",
"0.6581492",
"0.655704",
"0.6515096",
"0.6509866",
"0.6502137",
"0.64895",
"0.6471277",
"0.6471277",
"0.64657104",
"0.64610934",
"0.64397854",
"0.64232033",
"0.640978",
"0.640969",
"0.6403128",
"0.63869643",
"0.63869643",
"0.6385105",
"0.63841665",
"0.63460445",
"0.63460445",
"0.63291353",
"0.63161695",
"0.63084805",
"0.6300615",
"0.62760144",
"0.62595004",
"0.62595004",
"0.62588304",
"0.6258627",
"0.6257732",
"0.6257732",
"0.6257443",
"0.6257038",
"0.6256967",
"0.6254469",
"0.6254421",
"0.6253727",
"0.6242784",
"0.6238356",
"0.62361175",
"0.6227757",
"0.6225726",
"0.6223953",
"0.6223146",
"0.6215904",
"0.6214876",
"0.6213618",
"0.61929065",
"0.61717325",
"0.61717325",
"0.616404",
"0.61630183",
"0.6159461",
"0.6157369",
"0.614355",
"0.61419684",
"0.6134481",
"0.61323464",
"0.61317146",
"0.6125644",
"0.6123923",
"0.6119395",
"0.61140645",
"0.6113341",
"0.61097986",
"0.6101595",
"0.6101595",
"0.6101595",
"0.60951006",
"0.607976",
"0.6077088",
"0.60765296",
"0.60759103",
"0.60599524",
"0.6059563",
"0.6057985",
"0.6055034",
"0.6043172",
"0.6039323",
"0.603915",
"0.60382116",
"0.60378456",
"0.60361135",
"0.60294735",
"0.602748",
"0.6025513",
"0.6021469",
"0.6014789",
"0.6014348",
"0.60089844",
"0.60011953",
"0.5999893"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.